quixotic-gol 0.1.15 → 0.1.16
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/index.js +1 -1
- package/dist/index.mjs +6 -12
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3501,7 +3501,7 @@ const Oa = Tr(function({
|
|
|
3501
3501
|
}, et) {
|
|
3502
3502
|
const N = ft(null), { layout: $, cancel: nt, isLoading: it, error: A } = Sa(), R = ft(null), U = ft(null), W = ft(null), P = ft(14), f = ft(1e3), b = ft(!1), y = ft(null), D = ft(null), X = ft(null), S = ft(null), z = ft(w);
|
|
3503
3503
|
return z.current = w, Vr(et, () => ({
|
|
3504
|
-
zoomIn: (G =
|
|
3504
|
+
zoomIn: (G = 20) => {
|
|
3505
3505
|
var v, L;
|
|
3506
3506
|
if (!R.current || !U.current || !W.current) return;
|
|
3507
3507
|
const p = Kt(W.current), h = 1 + G / 100, C = p.k * h, E = at(U.current), Y = ((v = N.current) == null ? void 0 : v.clientWidth) || 1, g = ((L = N.current) == null ? void 0 : L.clientHeight) || 1;
|
|
@@ -3511,7 +3511,7 @@ const Oa = Tr(function({
|
|
|
3511
3511
|
[Y / 2, g / 2]
|
|
3512
3512
|
);
|
|
3513
3513
|
},
|
|
3514
|
-
zoomOut: (G =
|
|
3514
|
+
zoomOut: (G = 20) => {
|
|
3515
3515
|
var v, L;
|
|
3516
3516
|
if (!R.current || !U.current || !W.current) return;
|
|
3517
3517
|
const p = Kt(W.current), h = 1 - G / 100, C = Math.max(0.1, p.k * h), E = at(U.current), Y = ((v = N.current) == null ? void 0 : v.clientWidth) || 1, g = ((L = N.current) == null ? void 0 : L.clientHeight) || 1;
|
|
@@ -3618,23 +3618,17 @@ const Oa = Tr(function({
|
|
|
3618
3618
|
x,
|
|
3619
3619
|
Z
|
|
3620
3620
|
), R.current = Y.zoomBehavior, U.current = Y.svgElement, W.current = Y.gElement, P.current = Y.baseFontSize, f.current = Y.viewBoxWidth, K && U.current && U.current.addEventListener("click", (g) => {
|
|
3621
|
-
const
|
|
3622
|
-
bubbles: !0,
|
|
3623
|
-
cancelable: !0,
|
|
3624
|
-
clientX: g.clientX,
|
|
3625
|
-
clientY: g.clientY,
|
|
3626
|
-
view: window
|
|
3627
|
-
}), M = document.elementsFromPoint(g.clientX, g.clientY).find((F) => {
|
|
3621
|
+
const L = document.elementsFromPoint(g.clientX, g.clientY).find((F) => {
|
|
3628
3622
|
var q;
|
|
3629
3623
|
return !((q = U.current) != null && q.contains(F)) && F !== U.current;
|
|
3630
|
-
})
|
|
3631
|
-
M && M.dispatchEvent(v), document.body.dispatchEvent(new MouseEvent("click", {
|
|
3624
|
+
}), M = new MouseEvent("click", {
|
|
3632
3625
|
bubbles: !0,
|
|
3633
3626
|
cancelable: !0,
|
|
3634
3627
|
clientX: g.clientX,
|
|
3635
3628
|
clientY: g.clientY,
|
|
3636
3629
|
view: window
|
|
3637
|
-
})
|
|
3630
|
+
});
|
|
3631
|
+
(L || document.body).dispatchEvent(M);
|
|
3638
3632
|
}), W.current) {
|
|
3639
3633
|
const g = W.current.getBBox();
|
|
3640
3634
|
D.current = { x: g.x, y: g.y, width: g.width, height: g.height };
|