@knowvah/dot-engine 1.4.0 → 1.6.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 +36 -1
- package/dist/api/geometry.d.ts.map +1 -1
- package/dist/api.js +13 -1
- package/dist/api.js.map +2 -2
- package/dist/index.js +13 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/src/api/geometry.ts +48 -4
package/dist/index.js
CHANGED
|
@@ -53441,6 +53441,8 @@ function snapshotEdge(edge, flipY) {
|
|
|
53441
53441
|
if (tailLabel !== void 0) geom.tailLabel = tailLabel;
|
|
53442
53442
|
const headLabel = placedLabelPos(edge.info.head_label, flipY);
|
|
53443
53443
|
if (headLabel !== void 0) geom.headLabel = headLabel;
|
|
53444
|
+
const xlabel = placedLabelPos(edge.info.xlabel, flipY);
|
|
53445
|
+
if (xlabel !== void 0) geom.xlabel = xlabel;
|
|
53444
53446
|
const { sp, ep } = arrowAttachPoints(edge, flipY);
|
|
53445
53447
|
if (sp !== void 0) geom.sp = sp;
|
|
53446
53448
|
if (ep !== void 0) geom.ep = ep;
|
|
@@ -53448,7 +53450,7 @@ function snapshotEdge(edge, flipY) {
|
|
|
53448
53450
|
}
|
|
53449
53451
|
function snapshotCluster(sg, yAxis, flipY) {
|
|
53450
53452
|
const bb = sg.info.bb;
|
|
53451
|
-
|
|
53453
|
+
const geom = {
|
|
53452
53454
|
name: sg.name,
|
|
53453
53455
|
x: bb.ll.x,
|
|
53454
53456
|
// 'up' keeps the lower-left y; 'down' flips the upper-right y to the
|
|
@@ -53457,6 +53459,16 @@ function snapshotCluster(sg, yAxis, flipY) {
|
|
|
53457
53459
|
width: bb.ur.x - bb.ll.x,
|
|
53458
53460
|
height: bb.ur.y - bb.ll.y
|
|
53459
53461
|
};
|
|
53462
|
+
const lab = sg.info.label;
|
|
53463
|
+
if (lab !== void 0) {
|
|
53464
|
+
geom.label = {
|
|
53465
|
+
x: lab.pos.x,
|
|
53466
|
+
y: flipY(lab.pos.y),
|
|
53467
|
+
width: lab.dimen.x,
|
|
53468
|
+
height: lab.dimen.y
|
|
53469
|
+
};
|
|
53470
|
+
}
|
|
53471
|
+
return geom;
|
|
53460
53472
|
}
|
|
53461
53473
|
function collectClusters3(sg, yAxis, flipY, out) {
|
|
53462
53474
|
for (const c of sg.info.clust ?? []) {
|