@logicflow/core 1.1.29 → 1.1.31
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/logic-flow.js +45 -48
- package/dist/logic-flow.min.js +1 -1
- package/dist/style/index.css +2 -2
- package/package.json +1 -1
- package/types/LogicFlow.d.ts +8 -1
- package/types/model/edge/PolylineEdgeModel.d.ts +1 -1
- package/types/view/edge/BaseEdge.d.ts +4 -4
- package/types/view/edge/PolylineEdge.d.ts +1 -1
package/dist/logic-flow.js
CHANGED
|
@@ -22413,7 +22413,7 @@ var defaultTheme = {
|
|
|
22413
22413
|
stroke: 'red',
|
|
22414
22414
|
strokeDasharray: '10 10',
|
|
22415
22415
|
strokeDashoffset: '100%',
|
|
22416
|
-
animationName: '
|
|
22416
|
+
animationName: 'lf_animate_dash',
|
|
22417
22417
|
animationDuration: '20s',
|
|
22418
22418
|
animationIterationCount: 'infinite',
|
|
22419
22419
|
animationTimingFunction: 'linear',
|
|
@@ -22712,6 +22712,11 @@ var isMultipleSelect = function isMultipleSelect(e, editConfigModel) {
|
|
|
22712
22712
|
isMultiple = e.shiftKey;
|
|
22713
22713
|
break;
|
|
22714
22714
|
|
|
22715
|
+
case 'ctrl':
|
|
22716
|
+
isMultiple = e.ctrlKey; // Mac上ctrl + 点击节点会触发上下文菜单,所以ctrl尽量用在非Mac系统
|
|
22717
|
+
|
|
22718
|
+
break;
|
|
22719
|
+
|
|
22715
22720
|
default:
|
|
22716
22721
|
isMultiple = false;
|
|
22717
22722
|
break;
|
|
@@ -24797,7 +24802,7 @@ var PolylineEdgeModel_PolylineEdgeModel = (PolylineEdgeModel_class = /*#__PURE__
|
|
|
24797
24802
|
});
|
|
24798
24803
|
}
|
|
24799
24804
|
|
|
24800
|
-
this.
|
|
24805
|
+
this.updatePointsAfterDrag(draginngPointList);
|
|
24801
24806
|
this.draginngPointList = draginngPointList;
|
|
24802
24807
|
this.setText(Object.assign({}, this.text, this.textPosition));
|
|
24803
24808
|
return {
|
|
@@ -24872,10 +24877,9 @@ var PolylineEdgeModel_PolylineEdgeModel = (PolylineEdgeModel_class = /*#__PURE__
|
|
|
24872
24877
|
}
|
|
24873
24878
|
}
|
|
24874
24879
|
|
|
24875
|
-
|
|
24876
|
-
this.updatePointsAfterDrage(draginngPointList); // step3: 调整到对应外框的位置后,执行updatePointsAfterDrage,找到当前线段和图形的准确交点
|
|
24880
|
+
this.updatePointsAfterDrag(draginngPointList); // step3: 调整到对应外框的位置后,执行updatePointsAfterDrag,找到当前线段和图形的准确交点
|
|
24877
24881
|
|
|
24878
|
-
this.
|
|
24882
|
+
this.draggingPointList = draginngPointList;
|
|
24879
24883
|
} else if (direction === SegmentDirection.VERTICAL) {
|
|
24880
24884
|
// 垂直,仅调整x坐标, 与水平调整同理
|
|
24881
24885
|
pointsList[startIndex] = {
|
|
@@ -24923,9 +24927,8 @@ var PolylineEdgeModel_PolylineEdgeModel = (PolylineEdgeModel_class = /*#__PURE__
|
|
|
24923
24927
|
}
|
|
24924
24928
|
}
|
|
24925
24929
|
|
|
24926
|
-
|
|
24927
|
-
this.
|
|
24928
|
-
this.draginngPointList = _draginngPointList;
|
|
24930
|
+
this.updatePointsAfterDrag(_draginngPointList);
|
|
24931
|
+
this.draggingPointList = _draginngPointList;
|
|
24929
24932
|
}
|
|
24930
24933
|
|
|
24931
24934
|
this.setText(Object.assign({}, this.text, this.textPosition));
|
|
@@ -24941,7 +24944,7 @@ var PolylineEdgeModel_PolylineEdgeModel = (PolylineEdgeModel_class = /*#__PURE__
|
|
|
24941
24944
|
key: "dragAppendEnd",
|
|
24942
24945
|
value: function dragAppendEnd() {
|
|
24943
24946
|
if (this.draginngPointList) {
|
|
24944
|
-
var pointsList = points2PointsList(this.points); // 更新pointsList,重新渲染appendWidth
|
|
24947
|
+
var pointsList = pointFilter(points2PointsList(this.points)); // 更新pointsList,重新渲染appendWidth
|
|
24945
24948
|
|
|
24946
24949
|
this.pointsList = pointsList.map(function (i) {
|
|
24947
24950
|
return i;
|
|
@@ -24963,8 +24966,8 @@ var PolylineEdgeModel_PolylineEdgeModel = (PolylineEdgeModel_class = /*#__PURE__
|
|
|
24963
24966
|
*/
|
|
24964
24967
|
|
|
24965
24968
|
}, {
|
|
24966
|
-
key: "
|
|
24967
|
-
value: function
|
|
24969
|
+
key: "updatePointsAfterDrag",
|
|
24970
|
+
value: function updatePointsAfterDrag(pointsList) {
|
|
24968
24971
|
// 找到准确的连接点后,更新points, 更新边,同时更新依赖points的箭头
|
|
24969
24972
|
var list = this.updateCrossPoints(pointsList);
|
|
24970
24973
|
this.points = list.map(function (point) {
|
|
@@ -25010,7 +25013,7 @@ var PolylineEdgeModel_PolylineEdgeModel = (PolylineEdgeModel_class = /*#__PURE__
|
|
|
25010
25013
|
enumerable: true,
|
|
25011
25014
|
writable: true,
|
|
25012
25015
|
initializer: null
|
|
25013
|
-
}), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "initPoints", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "initPoints"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "updatePoints", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "updatePoints"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "updateStartPoint", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "updateStartPoint"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "moveStartPoint", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "moveStartPoint"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "updateEndPoint", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "updateEndPoint"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "moveEndPoint", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "moveEndPoint"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "dragAppendStart", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "dragAppendStart"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "dragAppendSimple", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "dragAppendSimple"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "dragAppend", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "dragAppend"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "dragAppendEnd", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "dragAppendEnd"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "
|
|
25016
|
+
}), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "initPoints", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "initPoints"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "updatePoints", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "updatePoints"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "updateStartPoint", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "updateStartPoint"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "moveStartPoint", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "moveStartPoint"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "updateEndPoint", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "updateEndPoint"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "moveEndPoint", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "moveEndPoint"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "dragAppendStart", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "dragAppendStart"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "dragAppendSimple", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "dragAppendSimple"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "dragAppend", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "dragAppend"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "dragAppendEnd", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "dragAppendEnd"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "updatePointsAfterDrag", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "updatePointsAfterDrag"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "getAdjustStart", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "getAdjustStart"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "getAdjustEnd", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "getAdjustEnd"), PolylineEdgeModel_class.prototype), PolylineEdgeModel_applyDecoratedDescriptor(PolylineEdgeModel_class.prototype, "updateAfterAdjustStartAndEnd", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(PolylineEdgeModel_class.prototype, "updateAfterAdjustStartAndEnd"), PolylineEdgeModel_class.prototype)), PolylineEdgeModel_class);
|
|
25014
25017
|
|
|
25015
25018
|
// CONCATENATED MODULE: ./src/algorithm/index.ts
|
|
25016
25019
|
// 各类算法的实现
|
|
@@ -26525,8 +26528,7 @@ var GraphModel_GraphModel = (GraphModel_class = /*#__PURE__*/function () {
|
|
|
26525
26528
|
return a.zIndex - b.zIndex;
|
|
26526
26529
|
}); // 只显示可见区域的节点和边
|
|
26527
26530
|
|
|
26528
|
-
var showElements = [];
|
|
26529
|
-
var topElementIdx = -1; // todo: 缓存, 优化计算效率
|
|
26531
|
+
var showElements = []; // todo: 缓存, 优化计算效率
|
|
26530
26532
|
|
|
26531
26533
|
var visibleLt = [-VisibleMoreSpace, -VisibleMoreSpace];
|
|
26532
26534
|
var visibleRb = [this.width + VisibleMoreSpace, this.height + VisibleMoreSpace];
|
|
@@ -26535,20 +26537,10 @@ var GraphModel_GraphModel = (GraphModel_class = /*#__PURE__*/function () {
|
|
|
26535
26537
|
var currentItem = elements[i]; // 如果节点不在可见区域,且不是全元素显示模式,则隐藏节点。
|
|
26536
26538
|
|
|
26537
26539
|
if (currentItem.visible && (!this.partial || currentItem.isSelected || this.isElementInArea(currentItem, visibleLt, visibleRb, false, false))) {
|
|
26538
|
-
if (currentItem.zIndex === ElementMaxzIndex) {
|
|
26539
|
-
topElementIdx = showElements.length;
|
|
26540
|
-
}
|
|
26541
|
-
|
|
26542
26540
|
showElements.push(currentItem);
|
|
26543
26541
|
}
|
|
26544
26542
|
}
|
|
26545
26543
|
|
|
26546
|
-
if (topElementIdx !== -1) {
|
|
26547
|
-
var lastElement = showElements[showElements.length - 1];
|
|
26548
|
-
showElements[showElements.length - 1] = showElements[topElementIdx];
|
|
26549
|
-
showElements[topElementIdx] = lastElement;
|
|
26550
|
-
}
|
|
26551
|
-
|
|
26552
26544
|
return showElements;
|
|
26553
26545
|
}
|
|
26554
26546
|
/**
|
|
@@ -29512,7 +29504,7 @@ var Graph_Graph = src_observer(Graph_class = /*#__PURE__*/function (_Component)
|
|
|
29512
29504
|
graphModel: graphModel
|
|
29513
29505
|
}), adjustEdge ? Object(preact_module["g" /* h */])(BezierAdjustOverlay_BezierAdjustOverlay, {
|
|
29514
29506
|
graphModel: graphModel
|
|
29515
|
-
}) : '',
|
|
29507
|
+
}) : '', options.snapline !== false ? Object(preact_module["g" /* h */])(SnaplineOverlay_SnaplineOverlay, {
|
|
29516
29508
|
snaplineModel: snaplineModel
|
|
29517
29509
|
}) : ''), Object(preact_module["g" /* h */])(ToolOverlay_ToolOverlay, {
|
|
29518
29510
|
graphModel: graphModel,
|
|
@@ -29637,7 +29629,8 @@ var DnD_Dnd = /*#__PURE__*/function () {
|
|
|
29637
29629
|
var nodeData = currentNode.getData();
|
|
29638
29630
|
|
|
29639
29631
|
_this.lf.graphModel.eventCenter.emit(EventType.NODE_DND_ADD, {
|
|
29640
|
-
data: nodeData
|
|
29632
|
+
data: nodeData,
|
|
29633
|
+
e: e
|
|
29641
29634
|
});
|
|
29642
29635
|
});
|
|
29643
29636
|
|
|
@@ -35334,7 +35327,7 @@ var BaseEdge_BaseEdge = /*#__PURE__*/function (_Component) {
|
|
|
35334
35327
|
_this.toFront();
|
|
35335
35328
|
});
|
|
35336
35329
|
|
|
35337
|
-
BaseEdge_defineProperty(BaseEdge_assertThisInitialized(_this), "
|
|
35330
|
+
BaseEdge_defineProperty(BaseEdge_assertThisInitialized(_this), "getIsDragging", function () {
|
|
35338
35331
|
return false;
|
|
35339
35332
|
});
|
|
35340
35333
|
|
|
@@ -35416,7 +35409,7 @@ var BaseEdge_BaseEdge = /*#__PURE__*/function (_Component) {
|
|
|
35416
35409
|
|
|
35417
35410
|
return Object(preact_module["g" /* h */])("g", null, Object(preact_module["g" /* h */])("defs", null, Object(preact_module["g" /* h */])("marker", {
|
|
35418
35411
|
id: "marker-start-".concat(id),
|
|
35419
|
-
refX: refX,
|
|
35412
|
+
refX: -refX,
|
|
35420
35413
|
refY: refY,
|
|
35421
35414
|
overflow: "visible",
|
|
35422
35415
|
orient: "auto",
|
|
@@ -35519,7 +35512,7 @@ var BaseEdge_BaseEdge = /*#__PURE__*/function (_Component) {
|
|
|
35519
35512
|
isSelected = _this$props8$model.isSelected,
|
|
35520
35513
|
isHitable = _this$props8$model.isHitable,
|
|
35521
35514
|
graphModel = _this$props8.graphModel;
|
|
35522
|
-
var
|
|
35515
|
+
var isDragging = this.getIsDragging();
|
|
35523
35516
|
var adjustEdgeStartAndEnd = graphModel.editConfigModel.adjustEdgeStartAndEnd,
|
|
35524
35517
|
animation = graphModel.animation; // performance 只允许出现一条edge有动画
|
|
35525
35518
|
|
|
@@ -35532,7 +35525,7 @@ var BaseEdge_BaseEdge = /*#__PURE__*/function (_Component) {
|
|
|
35532
35525
|
onMouseOver: this.setHoverON,
|
|
35533
35526
|
onMouseEnter: this.setHoverON,
|
|
35534
35527
|
onMouseLeave: this.setHoverOFF
|
|
35535
|
-
}, this.getShape(), this.getAppend(), isShowAnimation && this.getAnimation(), this.getText(), this.getArrow()), adjustEdgeStartAndEnd && isSelected && !
|
|
35528
|
+
}, this.getShape(), this.getAppend(), isShowAnimation && this.getAnimation(), this.getText(), this.getArrow()), adjustEdgeStartAndEnd && isSelected && !isDragging ? this.getAdjustPoints() : '');
|
|
35536
35529
|
}
|
|
35537
35530
|
}]);
|
|
35538
35531
|
|
|
@@ -35953,7 +35946,7 @@ var PolylineEdge_PolylineEdge = /*#__PURE__*/function (_BaseEdge) {
|
|
|
35953
35946
|
_this.appendInfo = appendInfo;
|
|
35954
35947
|
});
|
|
35955
35948
|
|
|
35956
|
-
PolylineEdge_defineProperty(PolylineEdge_assertThisInitialized(_this), "
|
|
35949
|
+
PolylineEdge_defineProperty(PolylineEdge_assertThisInitialized(_this), "getIsDragging", function () {
|
|
35957
35950
|
return _this.isDraging;
|
|
35958
35951
|
});
|
|
35959
35952
|
|
|
@@ -37119,18 +37112,17 @@ var TextEditTool_TextEdit = src_observer(TextEditTool_class = (_temp = _class2 =
|
|
|
37119
37112
|
|
|
37120
37113
|
|
|
37121
37114
|
var graphModel = this.props.graphModel;
|
|
37122
|
-
var eventCenter = graphModel.eventCenter
|
|
37123
|
-
|
|
37124
|
-
|
|
37125
|
-
|
|
37115
|
+
var eventCenter = graphModel.eventCenter;
|
|
37116
|
+
eventCenter.on("".concat(EventType.GRAPH_TRANSFORM, ",").concat(EventType.NODE_CLICK, ",").concat(EventType.BLANK_CLICK, " "), function () {
|
|
37117
|
+
var textEditElement = graphModel.textEditElement,
|
|
37118
|
+
_graphModel$editConfi = graphModel.editConfigModel,
|
|
37119
|
+
edgeTextEdit = _graphModel$editConfi.edgeTextEdit,
|
|
37120
|
+
nodeTextEdit = _graphModel$editConfi.nodeTextEdit; // fix #826, 保留之前的文本可以编辑点击空白才设置为不可编辑。如果以后有其他需求再改。
|
|
37126
37121
|
|
|
37127
|
-
|
|
37128
|
-
|
|
37129
|
-
|
|
37130
|
-
|
|
37131
|
-
}
|
|
37132
|
-
});
|
|
37133
|
-
}
|
|
37122
|
+
if ((edgeTextEdit || nodeTextEdit) && textEditElement) {
|
|
37123
|
+
graphModel.textEditElement.setElementState(ElementState.DEFAULT);
|
|
37124
|
+
}
|
|
37125
|
+
});
|
|
37134
37126
|
}
|
|
37135
37127
|
}, {
|
|
37136
37128
|
key: "componentDidUpdate",
|
|
@@ -38008,7 +38000,7 @@ var LogicFlow_LogicFlow = /*#__PURE__*/function () {
|
|
|
38008
38000
|
keyboard: options.keyboard
|
|
38009
38001
|
}); // 不可编辑模式没有开启,且没有关闭对齐线
|
|
38010
38002
|
|
|
38011
|
-
if (
|
|
38003
|
+
if (options.snapline !== false) {
|
|
38012
38004
|
this.snaplineModel = new SnaplineModel_SnaplineModel(this.graphModel);
|
|
38013
38005
|
snaplineTool(this.graphModel.eventCenter, this.snaplineModel);
|
|
38014
38006
|
} // 先初始化默认内置快捷键
|
|
@@ -38216,15 +38208,17 @@ var LogicFlow_LogicFlow = /*#__PURE__*/function () {
|
|
|
38216
38208
|
* 将图形选中
|
|
38217
38209
|
* @param id 选择元素ID
|
|
38218
38210
|
* @param multiple 是否允许多选,如果为true,不会将上一个选中的元素重置
|
|
38211
|
+
* @param toFront 是否将选中的元素置顶,默认为true
|
|
38219
38212
|
*/
|
|
38220
38213
|
|
|
38221
38214
|
}, {
|
|
38222
38215
|
key: "selectElementById",
|
|
38223
38216
|
value: function selectElementById(id) {
|
|
38224
38217
|
var multiple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
38218
|
+
var toFront = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
38225
38219
|
this.graphModel.selectElementById(id, multiple);
|
|
38226
38220
|
|
|
38227
|
-
if (!multiple) {
|
|
38221
|
+
if (!multiple && toFront) {
|
|
38228
38222
|
this.graphModel.toFront(id);
|
|
38229
38223
|
}
|
|
38230
38224
|
}
|
|
@@ -38751,10 +38745,13 @@ var LogicFlow_LogicFlow = /*#__PURE__*/function () {
|
|
|
38751
38745
|
edges.forEach(function (edge) {
|
|
38752
38746
|
var sourceId = edge.sourceNodeId;
|
|
38753
38747
|
var targetId = edge.targetNodeId;
|
|
38754
|
-
if (nodeIdMap[sourceId])
|
|
38755
|
-
if (nodeIdMap[targetId])
|
|
38748
|
+
if (nodeIdMap[sourceId]) sourceId = nodeIdMap[sourceId];
|
|
38749
|
+
if (nodeIdMap[targetId]) targetId = nodeIdMap[targetId];
|
|
38756
38750
|
|
|
38757
|
-
var edgeModel = _this3.graphModel.addEdge(edge)
|
|
38751
|
+
var edgeModel = _this3.graphModel.addEdge(LogicFlow_objectSpread(LogicFlow_objectSpread({}, edge), {}, {
|
|
38752
|
+
sourceNodeId: sourceId,
|
|
38753
|
+
targetNodeId: targetId
|
|
38754
|
+
}));
|
|
38758
38755
|
|
|
38759
38756
|
elements.edges.push(edgeModel);
|
|
38760
38757
|
});
|
|
@@ -39210,7 +39207,7 @@ var LogicFlow_LogicFlow = /*#__PURE__*/function () {
|
|
|
39210
39207
|
value: function renderRawData(graphRawData) {
|
|
39211
39208
|
this.graphModel.graphDataToModel(formatData(graphRawData));
|
|
39212
39209
|
|
|
39213
|
-
if (
|
|
39210
|
+
if (this.options.history !== false) {
|
|
39214
39211
|
this.history.watch(this.graphModel);
|
|
39215
39212
|
}
|
|
39216
39213
|
|