@flowgram.ai/free-layout-core 0.2.1 → 0.2.2
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/esm/index.js +25 -33
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +23 -31
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1390,17 +1390,15 @@ var WorkflowLinesManager = class {
|
|
|
1390
1390
|
toNode?.removeLine(line);
|
|
1391
1391
|
line.validate();
|
|
1392
1392
|
});
|
|
1393
|
-
line.
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
})
|
|
1403
|
-
);
|
|
1393
|
+
line.onDispose(() => {
|
|
1394
|
+
if (available) {
|
|
1395
|
+
this.onAvailableLinesChangeEmitter.fire({
|
|
1396
|
+
type: "DELETE_LINE" /* DELETE_LINE */,
|
|
1397
|
+
toJSON: () => line.toJSON(),
|
|
1398
|
+
entity: line
|
|
1399
|
+
});
|
|
1400
|
+
}
|
|
1401
|
+
});
|
|
1404
1402
|
if (available) {
|
|
1405
1403
|
this.onAvailableLinesChangeEmitter.fire({
|
|
1406
1404
|
type: "ADD_LINE" /* ADD_LINE */,
|
|
@@ -1881,26 +1879,20 @@ var WorkflowDocument = class extends import_document7.FlowDocument {
|
|
|
1881
1879
|
entity: node,
|
|
1882
1880
|
toJSON: () => this.toNodeJSON(node)
|
|
1883
1881
|
});
|
|
1884
|
-
node.
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
const parentTransform = node.parent.getData(import_document7.FlowNodeTransformData);
|
|
1899
|
-
setTimeout(() => {
|
|
1900
|
-
parentTransform.fireChange();
|
|
1901
|
-
}, 0);
|
|
1902
|
-
})
|
|
1903
|
-
);
|
|
1882
|
+
node.onDispose(() => {
|
|
1883
|
+
if (!node.parent || node.parent.flowNodeType === import_document7.FlowNodeBaseType.ROOT) {
|
|
1884
|
+
return;
|
|
1885
|
+
}
|
|
1886
|
+
const parentTransform = node.parent.getData(import_document7.FlowNodeTransformData);
|
|
1887
|
+
parentTransform.fireChange();
|
|
1888
|
+
});
|
|
1889
|
+
node.onDispose(() => {
|
|
1890
|
+
this.fireContentChange({
|
|
1891
|
+
type: "DELETE_NODE" /* DELETE_NODE */,
|
|
1892
|
+
entity: node,
|
|
1893
|
+
toJSON: () => this.toNodeJSON(node)
|
|
1894
|
+
});
|
|
1895
|
+
});
|
|
1904
1896
|
}
|
|
1905
1897
|
if (json.blocks) {
|
|
1906
1898
|
this.renderJSON(
|