squarified 0.6.2 → 1.0.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/plugin.d.mts +1 -0
- package/dist/plugin.d.ts +1 -0
- package/dist/plugin.js +16 -1
- package/dist/plugin.mjs +16 -1
- package/package.json +1 -1
package/dist/plugin.d.mts
CHANGED
package/dist/plugin.d.ts
CHANGED
package/dist/plugin.js
CHANGED
|
@@ -75,11 +75,19 @@ const presetHighlightPlugin = domEvent.definePlugin({
|
|
|
75
75
|
meta.highlight?.reset();
|
|
76
76
|
meta.highlight?.update();
|
|
77
77
|
meta.highlight?.setZIndexForHighlight();
|
|
78
|
+
meta.highlightSeq = (meta.highlightSeq ?? 0) + 1;
|
|
78
79
|
return;
|
|
79
80
|
}
|
|
80
81
|
const [x, y, w, h] = module.layout;
|
|
81
82
|
const effectiveRadius = Math.min(module.config.rectRadius, w / 4, h / 4);
|
|
83
|
+
meta.highlightSeq = (meta.highlightSeq ?? 0) + 1;
|
|
84
|
+
const thisSeq = meta.highlightSeq;
|
|
82
85
|
domEvent.smoothFrame((_, cleanup)=>{
|
|
86
|
+
if (meta.highlightSeq !== thisSeq) {
|
|
87
|
+
meta.highlight?.setZIndexForHighlight();
|
|
88
|
+
cleanup();
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
83
91
|
cleanup();
|
|
84
92
|
meta.highlight?.reset();
|
|
85
93
|
const mask = domEvent.createRoundBlock(x, y, w, h, {
|
|
@@ -117,7 +125,8 @@ const presetHighlightPlugin = domEvent.definePlugin({
|
|
|
117
125
|
}
|
|
118
126
|
},
|
|
119
127
|
meta: {
|
|
120
|
-
highlight: null
|
|
128
|
+
highlight: null,
|
|
129
|
+
highlightSeq: 0
|
|
121
130
|
}
|
|
122
131
|
});
|
|
123
132
|
|
|
@@ -477,6 +486,9 @@ function updateViewport(pluginContext, { stateManager: state, component, matrix
|
|
|
477
486
|
highlight.highlight.reset();
|
|
478
487
|
highlight.highlight.setZIndexForHighlight();
|
|
479
488
|
}
|
|
489
|
+
if (highlight) {
|
|
490
|
+
highlight.highlightSeq = (highlight.highlightSeq ?? 0) + 1;
|
|
491
|
+
}
|
|
480
492
|
component.cleanup();
|
|
481
493
|
const { width, height } = component.render.options;
|
|
482
494
|
component.layoutNodes = component.calculateLayoutNodes(component.data, {
|
|
@@ -629,6 +641,9 @@ const presetZoomablePlugin = domEvent.definePlugin({
|
|
|
629
641
|
highlight.highlight.reset();
|
|
630
642
|
highlight.highlight.setZIndexForHighlight();
|
|
631
643
|
}
|
|
644
|
+
if (highlight) {
|
|
645
|
+
highlight.highlightSeq = (highlight.highlightSeq ?? 0) + 1;
|
|
646
|
+
}
|
|
632
647
|
component.cleanup();
|
|
633
648
|
component.layoutNodes = component.calculateLayoutNodes(component.data, {
|
|
634
649
|
w: width * matrix.a,
|
package/dist/plugin.mjs
CHANGED
|
@@ -73,11 +73,19 @@ const presetHighlightPlugin = definePlugin({
|
|
|
73
73
|
meta.highlight?.reset();
|
|
74
74
|
meta.highlight?.update();
|
|
75
75
|
meta.highlight?.setZIndexForHighlight();
|
|
76
|
+
meta.highlightSeq = (meta.highlightSeq ?? 0) + 1;
|
|
76
77
|
return;
|
|
77
78
|
}
|
|
78
79
|
const [x, y, w, h] = module.layout;
|
|
79
80
|
const effectiveRadius = Math.min(module.config.rectRadius, w / 4, h / 4);
|
|
81
|
+
meta.highlightSeq = (meta.highlightSeq ?? 0) + 1;
|
|
82
|
+
const thisSeq = meta.highlightSeq;
|
|
80
83
|
smoothFrame((_, cleanup)=>{
|
|
84
|
+
if (meta.highlightSeq !== thisSeq) {
|
|
85
|
+
meta.highlight?.setZIndexForHighlight();
|
|
86
|
+
cleanup();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
81
89
|
cleanup();
|
|
82
90
|
meta.highlight?.reset();
|
|
83
91
|
const mask = createRoundBlock(x, y, w, h, {
|
|
@@ -115,7 +123,8 @@ const presetHighlightPlugin = definePlugin({
|
|
|
115
123
|
}
|
|
116
124
|
},
|
|
117
125
|
meta: {
|
|
118
|
-
highlight: null
|
|
126
|
+
highlight: null,
|
|
127
|
+
highlightSeq: 0
|
|
119
128
|
}
|
|
120
129
|
});
|
|
121
130
|
|
|
@@ -475,6 +484,9 @@ function updateViewport(pluginContext, { stateManager: state, component, matrix
|
|
|
475
484
|
highlight.highlight.reset();
|
|
476
485
|
highlight.highlight.setZIndexForHighlight();
|
|
477
486
|
}
|
|
487
|
+
if (highlight) {
|
|
488
|
+
highlight.highlightSeq = (highlight.highlightSeq ?? 0) + 1;
|
|
489
|
+
}
|
|
478
490
|
component.cleanup();
|
|
479
491
|
const { width, height } = component.render.options;
|
|
480
492
|
component.layoutNodes = component.calculateLayoutNodes(component.data, {
|
|
@@ -627,6 +639,9 @@ const presetZoomablePlugin = definePlugin({
|
|
|
627
639
|
highlight.highlight.reset();
|
|
628
640
|
highlight.highlight.setZIndexForHighlight();
|
|
629
641
|
}
|
|
642
|
+
if (highlight) {
|
|
643
|
+
highlight.highlightSeq = (highlight.highlightSeq ?? 0) + 1;
|
|
644
|
+
}
|
|
630
645
|
component.cleanup();
|
|
631
646
|
component.layoutNodes = component.calculateLayoutNodes(component.data, {
|
|
632
647
|
w: width * matrix.a,
|