@zoneflow/renderer-dom 0.0.5 → 0.0.7
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/engines/drawEngine.js +16 -2
- package/package.json +2 -2
|
@@ -34,10 +34,21 @@ function sortZonesForRender(params) {
|
|
|
34
34
|
zone,
|
|
35
35
|
index,
|
|
36
36
|
depth: getZoneDepth(params.input.model, zone.zoneId),
|
|
37
|
+
zOrder: params.input.layoutModel.zoneLayoutsById[zone.zoneId]?.zOrder ?? index,
|
|
37
38
|
}))
|
|
38
|
-
.sort((a, b) => a.depth - b.depth || a.index - b.index)
|
|
39
|
+
.sort((a, b) => a.depth - b.depth || a.zOrder - b.zOrder || a.index - b.index)
|
|
39
40
|
.map((entry) => entry.zone);
|
|
40
41
|
}
|
|
42
|
+
function sortPathsForRender(params) {
|
|
43
|
+
return Object.values(params.pathsById)
|
|
44
|
+
.map((path, index) => ({
|
|
45
|
+
path,
|
|
46
|
+
index,
|
|
47
|
+
zOrder: params.input.layoutModel.pathLayoutsById[path.pathId]?.zOrder ?? index,
|
|
48
|
+
}))
|
|
49
|
+
.sort((a, b) => a.zOrder - b.zOrder || a.index - b.index)
|
|
50
|
+
.map((entry) => entry.path);
|
|
51
|
+
}
|
|
41
52
|
function resolvePathDisplayName(params) {
|
|
42
53
|
const trimmed = params.name.trim();
|
|
43
54
|
if (trimmed)
|
|
@@ -701,7 +712,10 @@ export const domDrawEngine = {
|
|
|
701
712
|
});
|
|
702
713
|
zoneLayer.appendChild(zoneEl);
|
|
703
714
|
}
|
|
704
|
-
for (const pathVisual of
|
|
715
|
+
for (const pathVisual of sortPathsForRender({
|
|
716
|
+
input,
|
|
717
|
+
pathsById: pipeline.graphLayout.pathsById,
|
|
718
|
+
})) {
|
|
705
719
|
const visibility = pipeline.visibility.pathVisibilityById[pathVisual.pathId];
|
|
706
720
|
if (!visibility?.shouldRenderNode ||
|
|
707
721
|
!pathVisual.rect ||
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zoneflow/renderer-dom",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Low-level DOM renderer engines for Zoneflow.",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dist"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@zoneflow/core": "0.0.
|
|
22
|
+
"@zoneflow/core": "0.0.7"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsc -p tsconfig.json",
|