MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / selectedReportAnnotationRange

Function selectedReportAnnotationRange

deployments/desktop/static/desktop.js:2880–2894  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2878 }
2879
2880 function selectedReportAnnotationRange() {
2881 const body = $("reportViewerBody");
2882 const selection = window.getSelection();
2883 if (body && selection && selection.rangeCount > 0 && !selection.isCollapsed) {
2884 const range = selection.getRangeAt(0);
2885 if (body.contains(range.commonAncestorContainer)) {
2886 return range.cloneRange();
2887 }
2888 }
2889 const saved = state.reportAnnotationRange;
2890 if (body && saved && body.contains(saved.commonAncestorContainer)) {
2891 return saved.cloneRange();
2892 }
2893 return null;
2894 }
2895
2896 function applyReportAnnotation(command, value) {
2897 const body = $("reportViewerBody");

Callers 1

applyReportAnnotationFunction · 0.85

Calls 1

$Function · 0.70

Tested by

no test coverage detected