Lutz Roeder 4 giorni fa
parent
commit
43d51e6762
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7 0
      source/view.js

+ 7 - 0
source/view.js

@@ -2649,6 +2649,13 @@ view.Block = class {
     }
 
     async measure() {
+        for (const edge of this._graph.edges.values()) {
+            if (edge.label.labelElement) {
+                const box = edge.label.labelElement.getBBox();
+                edge.label.width = box.width;
+                edge.label.height = box.height;
+            }
+        }
         await this._graph.measure();
         await this._graph.layout();
         const padding = 10;