@d-i-t-a/reader 2.3.18 → 2.4.0
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/dist/esm/index.js
CHANGED
|
@@ -55224,8 +55224,16 @@ var TextHighlighter = class _TextHighlighter {
|
|
|
55224
55224
|
this.hasEventListener = true;
|
|
55225
55225
|
}
|
|
55226
55226
|
async mousedown(ev) {
|
|
55227
|
+
var _a;
|
|
55227
55228
|
lastMouseDownX = ev.clientX;
|
|
55228
55229
|
lastMouseDownY = ev.clientY;
|
|
55230
|
+
if ((_a = this.properties) == null ? void 0 : _a.preventScrollOnSelection) {
|
|
55231
|
+
const wrapper = findRequiredElement(
|
|
55232
|
+
document,
|
|
55233
|
+
"#iframe-wrapper"
|
|
55234
|
+
);
|
|
55235
|
+
wrapper.style.overflow = "hidden";
|
|
55236
|
+
}
|
|
55229
55237
|
}
|
|
55230
55238
|
async mouseup(ev) {
|
|
55231
55239
|
if (Math.abs(lastMouseDownX - ev.clientX) < 3 && Math.abs(lastMouseDownY - ev.clientY) < 3) {
|
|
@@ -55441,10 +55449,18 @@ var TextHighlighter = class _TextHighlighter {
|
|
|
55441
55449
|
}
|
|
55442
55450
|
}
|
|
55443
55451
|
toolboxHide() {
|
|
55452
|
+
var _a;
|
|
55444
55453
|
let toolbox = document.getElementById("highlight-toolbox");
|
|
55445
55454
|
if (toolbox)
|
|
55446
55455
|
toolbox.style.display = "none";
|
|
55447
55456
|
this.selectionMenuClosed();
|
|
55457
|
+
if ((_a = this.properties) == null ? void 0 : _a.preventScrollOnSelection) {
|
|
55458
|
+
const wrapper = findRequiredElement(
|
|
55459
|
+
document,
|
|
55460
|
+
"#iframe-wrapper"
|
|
55461
|
+
);
|
|
55462
|
+
wrapper.style.overflow = "auto";
|
|
55463
|
+
}
|
|
55448
55464
|
}
|
|
55449
55465
|
// Use short timeout to let the selection updated to 'finish', otherwise some
|
|
55450
55466
|
// browsers can get wrong or incomplete selection data.
|