@ngroznykh/papirus 0.3.2 → 0.3.3
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/papirus.js
CHANGED
|
@@ -8104,7 +8104,7 @@ class SvgExporter {
|
|
|
8104
8104
|
const padding = options.padding ?? 20;
|
|
8105
8105
|
const includeBackground = options.includeBackground ?? true;
|
|
8106
8106
|
const backgroundColor = options.backgroundColor ?? "#ffffff";
|
|
8107
|
-
const edgeLabelOffset = options.edgeLabelOffset
|
|
8107
|
+
const edgeLabelOffset = options.edgeLabelOffset;
|
|
8108
8108
|
const bounds = getContentBounds({
|
|
8109
8109
|
nodes: this.renderer.nodes.values(),
|
|
8110
8110
|
edges: this.renderer.edges.values(),
|
|
@@ -8392,9 +8392,10 @@ class SvgExporter {
|
|
|
8392
8392
|
}
|
|
8393
8393
|
getEdgeLabelPoint(edge, edgeLabelOffset) {
|
|
8394
8394
|
const midpoint = this.getPathMidpoint(edge);
|
|
8395
|
+
const effectiveOffset = edgeLabelOffset ?? edge.labelOffset ?? 0;
|
|
8395
8396
|
return {
|
|
8396
8397
|
x: midpoint.x,
|
|
8397
|
-
y: midpoint.y +
|
|
8398
|
+
y: midpoint.y + effectiveOffset
|
|
8398
8399
|
};
|
|
8399
8400
|
}
|
|
8400
8401
|
renderTextLabel(text, point, style = {}) {
|