@hmcts/media-viewer 4.2.39-redact → 4.2.39-redact-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
|
@@ -2105,12 +2105,6 @@ class HighlightCreateDirective {
|
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
2107
2107
|
getSelectionRectangles(range) {
|
|
2108
|
-
if (this.toolbarEvents.redactionMode.getValue()) {
|
|
2109
|
-
const boundingRect = range.getBoundingClientRect();
|
|
2110
|
-
if (boundingRect && boundingRect.width > 0 && boundingRect.height > 0) {
|
|
2111
|
-
return [boundingRect];
|
|
2112
|
-
}
|
|
2113
|
-
}
|
|
2114
2108
|
return range.getClientRects();
|
|
2115
2109
|
}
|
|
2116
2110
|
createTextRectangle(rect, parentRect) {
|
|
@@ -2145,7 +2139,10 @@ class HighlightCreateDirective {
|
|
|
2145
2139
|
const selectionRectangles = [];
|
|
2146
2140
|
for (let i = 0; i < clientRects.length; i++) {
|
|
2147
2141
|
const selectionRectangle = this.createTextRectangle(clientRects[i], parentRect);
|
|
2148
|
-
const findSelectionRectangle = selectionRectangles.find((rect) => rect.width === selectionRectangle.width
|
|
2142
|
+
const findSelectionRectangle = selectionRectangles.find((rect) => rect.width === selectionRectangle.width
|
|
2143
|
+
&& rect.height === selectionRectangle.height
|
|
2144
|
+
&& rect.x === selectionRectangle.x
|
|
2145
|
+
&& rect.y === selectionRectangle.y);
|
|
2149
2146
|
if (!findSelectionRectangle) {
|
|
2150
2147
|
selectionRectangles.push(selectionRectangle);
|
|
2151
2148
|
}
|