@logicflow/core 1.1.30 → 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
CHANGED
|
@@ -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;
|
|
@@ -29499,7 +29504,7 @@ var Graph_Graph = src_observer(Graph_class = /*#__PURE__*/function (_Component)
|
|
|
29499
29504
|
graphModel: graphModel
|
|
29500
29505
|
}), adjustEdge ? Object(preact_module["g" /* h */])(BezierAdjustOverlay_BezierAdjustOverlay, {
|
|
29501
29506
|
graphModel: graphModel
|
|
29502
|
-
}) : '',
|
|
29507
|
+
}) : '', options.snapline !== false ? Object(preact_module["g" /* h */])(SnaplineOverlay_SnaplineOverlay, {
|
|
29503
29508
|
snaplineModel: snaplineModel
|
|
29504
29509
|
}) : ''), Object(preact_module["g" /* h */])(ToolOverlay_ToolOverlay, {
|
|
29505
29510
|
graphModel: graphModel,
|
|
@@ -29624,7 +29629,8 @@ var DnD_Dnd = /*#__PURE__*/function () {
|
|
|
29624
29629
|
var nodeData = currentNode.getData();
|
|
29625
29630
|
|
|
29626
29631
|
_this.lf.graphModel.eventCenter.emit(EventType.NODE_DND_ADD, {
|
|
29627
|
-
data: nodeData
|
|
29632
|
+
data: nodeData,
|
|
29633
|
+
e: e
|
|
29628
29634
|
});
|
|
29629
29635
|
});
|
|
29630
29636
|
|
|
@@ -35403,7 +35409,7 @@ var BaseEdge_BaseEdge = /*#__PURE__*/function (_Component) {
|
|
|
35403
35409
|
|
|
35404
35410
|
return Object(preact_module["g" /* h */])("g", null, Object(preact_module["g" /* h */])("defs", null, Object(preact_module["g" /* h */])("marker", {
|
|
35405
35411
|
id: "marker-start-".concat(id),
|
|
35406
|
-
refX: refX,
|
|
35412
|
+
refX: -refX,
|
|
35407
35413
|
refY: refY,
|
|
35408
35414
|
overflow: "visible",
|
|
35409
35415
|
orient: "auto",
|
|
@@ -37994,7 +38000,7 @@ var LogicFlow_LogicFlow = /*#__PURE__*/function () {
|
|
|
37994
38000
|
keyboard: options.keyboard
|
|
37995
38001
|
}); // 不可编辑模式没有开启,且没有关闭对齐线
|
|
37996
38002
|
|
|
37997
|
-
if (
|
|
38003
|
+
if (options.snapline !== false) {
|
|
37998
38004
|
this.snaplineModel = new SnaplineModel_SnaplineModel(this.graphModel);
|
|
37999
38005
|
snaplineTool(this.graphModel.eventCenter, this.snaplineModel);
|
|
38000
38006
|
} // 先初始化默认内置快捷键
|
|
@@ -38739,10 +38745,13 @@ var LogicFlow_LogicFlow = /*#__PURE__*/function () {
|
|
|
38739
38745
|
edges.forEach(function (edge) {
|
|
38740
38746
|
var sourceId = edge.sourceNodeId;
|
|
38741
38747
|
var targetId = edge.targetNodeId;
|
|
38742
|
-
if (nodeIdMap[sourceId])
|
|
38743
|
-
if (nodeIdMap[targetId])
|
|
38748
|
+
if (nodeIdMap[sourceId]) sourceId = nodeIdMap[sourceId];
|
|
38749
|
+
if (nodeIdMap[targetId]) targetId = nodeIdMap[targetId];
|
|
38744
38750
|
|
|
38745
|
-
var edgeModel = _this3.graphModel.addEdge(edge)
|
|
38751
|
+
var edgeModel = _this3.graphModel.addEdge(LogicFlow_objectSpread(LogicFlow_objectSpread({}, edge), {}, {
|
|
38752
|
+
sourceNodeId: sourceId,
|
|
38753
|
+
targetNodeId: targetId
|
|
38754
|
+
}));
|
|
38746
38755
|
|
|
38747
38756
|
elements.edges.push(edgeModel);
|
|
38748
38757
|
});
|
|
@@ -39198,7 +39207,7 @@ var LogicFlow_LogicFlow = /*#__PURE__*/function () {
|
|
|
39198
39207
|
value: function renderRawData(graphRawData) {
|
|
39199
39208
|
this.graphModel.graphDataToModel(formatData(graphRawData));
|
|
39200
39209
|
|
|
39201
|
-
if (
|
|
39210
|
+
if (this.options.history !== false) {
|
|
39202
39211
|
this.history.watch(this.graphModel);
|
|
39203
39212
|
}
|
|
39204
39213
|
|