@knowvah/dot-engine 1.4.0 → 1.5.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/api/geometry.d.ts +20 -0
- package/dist/api/geometry.d.ts.map +1 -1
- package/dist/api.js +11 -1
- package/dist/api.js.map +2 -2
- package/dist/index.js +11 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/src/api/geometry.ts +31 -1
package/dist/index.js
CHANGED
|
@@ -53448,7 +53448,7 @@ function snapshotEdge(edge, flipY) {
|
|
|
53448
53448
|
}
|
|
53449
53449
|
function snapshotCluster(sg, yAxis, flipY) {
|
|
53450
53450
|
const bb = sg.info.bb;
|
|
53451
|
-
|
|
53451
|
+
const geom = {
|
|
53452
53452
|
name: sg.name,
|
|
53453
53453
|
x: bb.ll.x,
|
|
53454
53454
|
// 'up' keeps the lower-left y; 'down' flips the upper-right y to the
|
|
@@ -53457,6 +53457,16 @@ function snapshotCluster(sg, yAxis, flipY) {
|
|
|
53457
53457
|
width: bb.ur.x - bb.ll.x,
|
|
53458
53458
|
height: bb.ur.y - bb.ll.y
|
|
53459
53459
|
};
|
|
53460
|
+
const lab = sg.info.label;
|
|
53461
|
+
if (lab !== void 0) {
|
|
53462
|
+
geom.label = {
|
|
53463
|
+
x: lab.pos.x,
|
|
53464
|
+
y: flipY(lab.pos.y),
|
|
53465
|
+
width: lab.dimen.x,
|
|
53466
|
+
height: lab.dimen.y
|
|
53467
|
+
};
|
|
53468
|
+
}
|
|
53469
|
+
return geom;
|
|
53460
53470
|
}
|
|
53461
53471
|
function collectClusters3(sg, yAxis, flipY, out) {
|
|
53462
53472
|
for (const c of sg.info.clust ?? []) {
|