@soomo/text-annotator 3.0.0-staging.42 → 3.0.0-staging.44
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.
|
@@ -2242,10 +2242,9 @@ const bo = (t, e, n) => {
|
|
|
2242
2242
|
c = void 0;
|
|
2243
2243
|
return;
|
|
2244
2244
|
}
|
|
2245
|
-
if (w.timeStamp - ((d == null ? void 0 : d.timeStamp) || w.timeStamp) < 1e3 && !c && x(d || w), !c)
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
p.clear(), f.deleteAnnotation(c.annotation);
|
|
2245
|
+
if (w.timeStamp - ((d == null ? void 0 : d.timeStamp) || w.timeStamp) < 1e3 && !c && x(d || w), !c) return;
|
|
2246
|
+
if (O.isCollapsed) {
|
|
2247
|
+
f.getAnnotation(c.annotation) && (p.clear(), f.deleteAnnotation(c.annotation));
|
|
2249
2248
|
return;
|
|
2250
2249
|
}
|
|
2251
2250
|
const T = O.getRangeAt(0), g = _e(T, t);
|
|
@@ -2279,12 +2278,10 @@ const bo = (t, e, n) => {
|
|
|
2279
2278
|
const { selected: C } = p;
|
|
2280
2279
|
(C.length !== 1 || C[0].id !== S.id) && p.userSelect(S.id, w);
|
|
2281
2280
|
} else p.isEmpty() || p.clear();
|
|
2282
|
-
};
|
|
2283
|
-
document.getSelection();
|
|
2284
|
-
const L = w.timeStamp - d.timeStamp;
|
|
2281
|
+
}, L = w.timeStamp - d.timeStamp;
|
|
2285
2282
|
setTimeout(() => {
|
|
2286
2283
|
const g = document.getSelection();
|
|
2287
|
-
g != null && g.isCollapsed && L < 300 ?
|
|
2284
|
+
g != null && g.isCollapsed && L < 300 ? B() : c && p.userSelect(c.annotation, w);
|
|
2288
2285
|
});
|
|
2289
2286
|
};
|
|
2290
2287
|
document.addEventListener("pointerup", h);
|