@logicflow/core 1.1.20 → 1.1.23
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
|
@@ -20392,7 +20392,7 @@ var pick = _flatRest(function(object, paths) {
|
|
|
20392
20392
|
|
|
20393
20393
|
|
|
20394
20394
|
|
|
20395
|
-
var _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16;
|
|
20395
|
+
var _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17;
|
|
20396
20396
|
|
|
20397
20397
|
|
|
20398
20398
|
|
|
@@ -20426,7 +20426,7 @@ var SilentConfig = {
|
|
|
20426
20426
|
nodeTextDraggable: false,
|
|
20427
20427
|
edgeTextDraggable: false
|
|
20428
20428
|
};
|
|
20429
|
-
var EditConfigModel_keys = ['isSilentMode', 'stopZoomGraph', 'stopScrollGraph', 'stopMoveGraph', 'adjustEdge', 'adjustEdgeMiddle', 'adjustEdgeStartAndEnd', 'adjustNodePosition', 'hideAnchors', 'hoverOutline', 'nodeSelectedOutline', 'edgeSelectedOutline', 'nodeTextEdit', 'edgeTextEdit', 'nodeTextDraggable', 'edgeTextDraggable', 'multipleSelectKey'];
|
|
20429
|
+
var EditConfigModel_keys = ['isSilentMode', 'stopZoomGraph', 'stopScrollGraph', 'stopMoveGraph', 'adjustEdge', 'adjustEdgeMiddle', 'adjustEdgeStartAndEnd', 'adjustNodePosition', 'hideAnchors', 'hoverOutline', 'nodeSelectedOutline', 'edgeSelectedOutline', 'nodeTextEdit', 'edgeTextEdit', 'nodeTextDraggable', 'edgeTextDraggable', 'multipleSelectKey', 'autoExpand'];
|
|
20430
20430
|
/**
|
|
20431
20431
|
* 页面编辑配置
|
|
20432
20432
|
*/
|
|
@@ -20468,6 +20468,8 @@ var EditConfigModel_EditConfigModel = (_class = /*#__PURE__*/function () {
|
|
|
20468
20468
|
|
|
20469
20469
|
_initializerDefineProperty(this, "edgeTextDraggable", _descriptor16, this);
|
|
20470
20470
|
|
|
20471
|
+
_initializerDefineProperty(this, "autoExpand", _descriptor17, this);
|
|
20472
|
+
|
|
20471
20473
|
EditConfigModel_defineProperty(this, "multipleSelectKey", '');
|
|
20472
20474
|
|
|
20473
20475
|
EditConfigModel_defineProperty(this, "defaultConfig", {});
|
|
@@ -20511,7 +20513,8 @@ var EditConfigModel_EditConfigModel = (_class = /*#__PURE__*/function () {
|
|
|
20511
20513
|
nodeTextEdit: this.nodeTextEdit,
|
|
20512
20514
|
edgeTextEdit: this.edgeTextEdit,
|
|
20513
20515
|
nodeTextDraggable: this.nodeTextDraggable,
|
|
20514
|
-
edgeTextDraggable: this.edgeTextDraggable
|
|
20516
|
+
edgeTextDraggable: this.edgeTextDraggable,
|
|
20517
|
+
autoExpand: this.autoExpand
|
|
20515
20518
|
};
|
|
20516
20519
|
lodash_es_assign(conf, silentConfig);
|
|
20517
20520
|
} // 如果不传,默认undefined表示允许文本编辑
|
|
@@ -20647,6 +20650,13 @@ var EditConfigModel_EditConfigModel = (_class = /*#__PURE__*/function () {
|
|
|
20647
20650
|
initializer: function initializer() {
|
|
20648
20651
|
return false;
|
|
20649
20652
|
}
|
|
20653
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class.prototype, "autoExpand", [mobx_module["C" /* observable */]], {
|
|
20654
|
+
configurable: true,
|
|
20655
|
+
enumerable: true,
|
|
20656
|
+
writable: true,
|
|
20657
|
+
initializer: function initializer() {
|
|
20658
|
+
return true;
|
|
20659
|
+
}
|
|
20650
20660
|
}), _applyDecoratedDescriptor(_class.prototype, "updateEditConfig", [mobx_module["k" /* action */]], Object.getOwnPropertyDescriptor(_class.prototype, "updateEditConfig"), _class.prototype)), _class);
|
|
20651
20661
|
|
|
20652
20662
|
|
|
@@ -23399,7 +23409,7 @@ var getMinIndex = function getMinIndex() {
|
|
|
23399
23409
|
|
|
23400
23410
|
|
|
23401
23411
|
|
|
23402
|
-
var BaseEdgeModel_class, BaseEdgeModel_descriptor, BaseEdgeModel_descriptor2, BaseEdgeModel_descriptor3, BaseEdgeModel_descriptor4, BaseEdgeModel_descriptor5, BaseEdgeModel_descriptor6, BaseEdgeModel_descriptor7, BaseEdgeModel_descriptor8, BaseEdgeModel_descriptor9, BaseEdgeModel_descriptor10, BaseEdgeModel_descriptor11, BaseEdgeModel_descriptor12, BaseEdgeModel_descriptor13, BaseEdgeModel_descriptor14, BaseEdgeModel_descriptor15, BaseEdgeModel_descriptor16,
|
|
23412
|
+
var BaseEdgeModel_class, BaseEdgeModel_descriptor, BaseEdgeModel_descriptor2, BaseEdgeModel_descriptor3, BaseEdgeModel_descriptor4, BaseEdgeModel_descriptor5, BaseEdgeModel_descriptor6, BaseEdgeModel_descriptor7, BaseEdgeModel_descriptor8, BaseEdgeModel_descriptor9, BaseEdgeModel_descriptor10, BaseEdgeModel_descriptor11, BaseEdgeModel_descriptor12, BaseEdgeModel_descriptor13, BaseEdgeModel_descriptor14, BaseEdgeModel_descriptor15, BaseEdgeModel_descriptor16, BaseEdgeModel_descriptor17, _descriptor18, _descriptor19;
|
|
23403
23413
|
|
|
23404
23414
|
|
|
23405
23415
|
|
|
@@ -23478,7 +23488,7 @@ var BaseEdgeModel_BaseEdgeModel = (BaseEdgeModel_class = /*#__PURE__*/function (
|
|
|
23478
23488
|
|
|
23479
23489
|
BaseEdgeModel_defineProperty(this, "modelType", ModelType.EDGE);
|
|
23480
23490
|
|
|
23481
|
-
BaseEdgeModel_initializerDefineProperty(this, "state",
|
|
23491
|
+
BaseEdgeModel_initializerDefineProperty(this, "state", BaseEdgeModel_descriptor17, this);
|
|
23482
23492
|
|
|
23483
23493
|
BaseEdgeModel_defineProperty(this, "additionStateData", void 0);
|
|
23484
23494
|
|
|
@@ -24126,7 +24136,7 @@ var BaseEdgeModel_BaseEdgeModel = (BaseEdgeModel_class = /*#__PURE__*/function (
|
|
|
24126
24136
|
initializer: function initializer() {
|
|
24127
24137
|
return 0;
|
|
24128
24138
|
}
|
|
24129
|
-
}),
|
|
24139
|
+
}), BaseEdgeModel_descriptor17 = BaseEdgeModel_applyDecoratedDescriptor(BaseEdgeModel_class.prototype, "state", [mobx_module["C" /* observable */]], {
|
|
24130
24140
|
configurable: true,
|
|
24131
24141
|
enumerable: true,
|
|
24132
24142
|
writable: true,
|
|
@@ -26385,21 +26395,14 @@ var GraphModel_GraphModel = (GraphModel_class = /*#__PURE__*/function () {
|
|
|
26385
26395
|
this.transformModel = new TransformModel_TransfromModel(this.eventCenter);
|
|
26386
26396
|
this.theme = theme_updateTheme(options.style);
|
|
26387
26397
|
this.edgeType = options.edgeType || 'polyline';
|
|
26388
|
-
|
|
26389
|
-
if (!options.width) {
|
|
26390
|
-
options.width = container.getBoundingClientRect().width;
|
|
26391
|
-
}
|
|
26392
|
-
|
|
26393
|
-
if (!options.height) {
|
|
26394
|
-
options.height = container.getBoundingClientRect().height;
|
|
26395
|
-
}
|
|
26396
|
-
|
|
26397
26398
|
this.width = options.width;
|
|
26398
26399
|
this.height = options.height;
|
|
26399
26400
|
this.animation = animation_updateAnimation(animation);
|
|
26400
26401
|
this.partial = options.partial;
|
|
26401
26402
|
this.overlapMode = options.overlapMode || 0;
|
|
26402
26403
|
this.idGenerator = idGenerator;
|
|
26404
|
+
this.width = options.width || this.rootEl.getBoundingClientRect().width;
|
|
26405
|
+
this.height = options.height || this.rootEl.getBoundingClientRect().height;
|
|
26403
26406
|
}
|
|
26404
26407
|
|
|
26405
26408
|
GraphModel_createClass(GraphModel, [{
|
|
@@ -26683,6 +26686,10 @@ var GraphModel_GraphModel = (GraphModel_class = /*#__PURE__*/function () {
|
|
|
26683
26686
|
value: function graphDataToModel(graphData) {
|
|
26684
26687
|
var _this = this;
|
|
26685
26688
|
|
|
26689
|
+
if (!this.width || !this.height) {
|
|
26690
|
+
this.resize();
|
|
26691
|
+
}
|
|
26692
|
+
|
|
26686
26693
|
this.nodes = lodash_es_map(graphData.nodes, function (node) {
|
|
26687
26694
|
var Model = _this.getModel(node.type);
|
|
26688
26695
|
|
|
@@ -27648,8 +27655,12 @@ var GraphModel_GraphModel = (GraphModel_class = /*#__PURE__*/function () {
|
|
|
27648
27655
|
}, {
|
|
27649
27656
|
key: "resize",
|
|
27650
27657
|
value: function resize(width, height) {
|
|
27651
|
-
this.width = width
|
|
27652
|
-
this.height = height
|
|
27658
|
+
this.width = width || this.rootEl.getBoundingClientRect().width;
|
|
27659
|
+
this.height = height || this.rootEl.getBoundingClientRect().height;
|
|
27660
|
+
|
|
27661
|
+
if (!this.width || !this.height) {
|
|
27662
|
+
console.warn('渲染画布的时候无法获取画布宽高,请确认在container已挂载到DOM。@see https://github.com/didi/LogicFlow/issues/675');
|
|
27663
|
+
}
|
|
27653
27664
|
}
|
|
27654
27665
|
/**
|
|
27655
27666
|
* 清空画布
|
|
@@ -32227,6 +32238,39 @@ var SnaplineModel_SnaplineModel = (SnaplineModel_class = /*#__PURE__*/function (
|
|
|
32227
32238
|
|
|
32228
32239
|
|
|
32229
32240
|
|
|
32241
|
+
// CONCATENATED MODULE: ./src/util/raf.ts
|
|
32242
|
+
|
|
32243
|
+
|
|
32244
|
+
|
|
32245
|
+
|
|
32246
|
+
|
|
32247
|
+
|
|
32248
|
+
var rafIdMap = new Map();
|
|
32249
|
+
var raf_createRaf = function createRaf(callback) {
|
|
32250
|
+
var rafId = uuid_createUuid();
|
|
32251
|
+
|
|
32252
|
+
function run() {
|
|
32253
|
+
callback();
|
|
32254
|
+
var eId = rafIdMap.get(rafId);
|
|
32255
|
+
|
|
32256
|
+
if (eId) {
|
|
32257
|
+
var nId = window.requestAnimationFrame(run);
|
|
32258
|
+
rafIdMap.set(rafId, nId);
|
|
32259
|
+
}
|
|
32260
|
+
}
|
|
32261
|
+
|
|
32262
|
+
var id = window.requestAnimationFrame(run);
|
|
32263
|
+
rafIdMap.set(rafId, id);
|
|
32264
|
+
return rafId;
|
|
32265
|
+
};
|
|
32266
|
+
var cancelRaf = function cancelRaf(rafId) {
|
|
32267
|
+
var eId = rafIdMap.get(rafId);
|
|
32268
|
+
|
|
32269
|
+
if (eId) {
|
|
32270
|
+
window.cancelAnimationFrame(eId);
|
|
32271
|
+
rafIdMap.delete(rafId);
|
|
32272
|
+
}
|
|
32273
|
+
};
|
|
32230
32274
|
// CONCATENATED MODULE: ./src/view/Anchor.tsx
|
|
32231
32275
|
function Anchor_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Anchor_typeof = function _typeof(obj) { return typeof obj; }; } else { Anchor_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Anchor_typeof(obj); }
|
|
32232
32276
|
|
|
@@ -32301,6 +32345,7 @@ function Anchor_defineProperty(obj, key, value) { if (key in obj) { Object.defin
|
|
|
32301
32345
|
|
|
32302
32346
|
|
|
32303
32347
|
|
|
32348
|
+
|
|
32304
32349
|
var Anchor_Anchor = /*#__PURE__*/function (_Component) {
|
|
32305
32350
|
Anchor_inherits(Anchor, _Component);
|
|
32306
32351
|
|
|
@@ -32363,7 +32408,9 @@ var Anchor_Anchor = /*#__PURE__*/function (_Component) {
|
|
|
32363
32408
|
eventCenter = graphModel.eventCenter,
|
|
32364
32409
|
width = graphModel.width,
|
|
32365
32410
|
height = graphModel.height,
|
|
32366
|
-
|
|
32411
|
+
_graphModel$editConfi = graphModel.editConfigModel,
|
|
32412
|
+
autoExpand = _graphModel$editConfi.autoExpand,
|
|
32413
|
+
stopMoveGraph = _graphModel$editConfi.stopMoveGraph;
|
|
32367
32414
|
var clientX = event.clientX,
|
|
32368
32415
|
clientY = event.clientY;
|
|
32369
32416
|
|
|
@@ -32379,7 +32426,7 @@ var Anchor_Anchor = /*#__PURE__*/function (_Component) {
|
|
|
32379
32426
|
y1 = _graphModel$getPointB3.y;
|
|
32380
32427
|
|
|
32381
32428
|
if (_this.t) {
|
|
32382
|
-
|
|
32429
|
+
cancelRaf(_this.t);
|
|
32383
32430
|
}
|
|
32384
32431
|
|
|
32385
32432
|
var nearBoundary = [];
|
|
@@ -32403,8 +32450,8 @@ var Anchor_Anchor = /*#__PURE__*/function (_Component) {
|
|
|
32403
32450
|
|
|
32404
32451
|
_this.moveAnchorEnd(x1, y1);
|
|
32405
32452
|
|
|
32406
|
-
if (nearBoundary.length > 0 && !
|
|
32407
|
-
_this.t =
|
|
32453
|
+
if (nearBoundary.length > 0 && !stopMoveGraph && autoExpand) {
|
|
32454
|
+
_this.t = raf_createRaf(function () {
|
|
32408
32455
|
var _nearBoundary = nearBoundary,
|
|
32409
32456
|
_nearBoundary2 = Anchor_slicedToArray(_nearBoundary, 2),
|
|
32410
32457
|
translateX = _nearBoundary2[0],
|
|
@@ -32421,7 +32468,7 @@ var Anchor_Anchor = /*#__PURE__*/function (_Component) {
|
|
|
32421
32468
|
});
|
|
32422
32469
|
|
|
32423
32470
|
_this.moveAnchorEnd(endX - translateX, endY - translateY);
|
|
32424
|
-
}
|
|
32471
|
+
});
|
|
32425
32472
|
}
|
|
32426
32473
|
|
|
32427
32474
|
eventCenter.emit(EventType.ANCHOR_DRAG, {
|
|
@@ -32433,9 +32480,11 @@ var Anchor_Anchor = /*#__PURE__*/function (_Component) {
|
|
|
32433
32480
|
|
|
32434
32481
|
Anchor_defineProperty(Anchor_assertThisInitialized(_this), "onDragEnd", function (event) {
|
|
32435
32482
|
if (_this.t) {
|
|
32436
|
-
|
|
32483
|
+
cancelRaf(_this.t);
|
|
32437
32484
|
}
|
|
32438
32485
|
|
|
32486
|
+
console.log(555, 'dragend');
|
|
32487
|
+
|
|
32439
32488
|
_this.checkEnd(event);
|
|
32440
32489
|
|
|
32441
32490
|
_this.setState({
|
|
@@ -33026,39 +33075,6 @@ var BaseText_BaseText = /*#__PURE__*/function (_Component) {
|
|
|
33026
33075
|
|
|
33027
33076
|
|
|
33028
33077
|
var isIe = window.navigator.userAgent.match(/MSIE|Trident/) !== null;
|
|
33029
|
-
// CONCATENATED MODULE: ./src/util/raf.ts
|
|
33030
|
-
|
|
33031
|
-
|
|
33032
|
-
|
|
33033
|
-
|
|
33034
|
-
|
|
33035
|
-
|
|
33036
|
-
var rafIdMap = new Map();
|
|
33037
|
-
var raf_createRaf = function createRaf(callback) {
|
|
33038
|
-
var rafId = uuid_createUuid();
|
|
33039
|
-
|
|
33040
|
-
function run() {
|
|
33041
|
-
callback();
|
|
33042
|
-
var eId = rafIdMap.get(rafId);
|
|
33043
|
-
|
|
33044
|
-
if (eId) {
|
|
33045
|
-
var nId = window.requestAnimationFrame(run);
|
|
33046
|
-
rafIdMap.set(rafId, nId);
|
|
33047
|
-
}
|
|
33048
|
-
}
|
|
33049
|
-
|
|
33050
|
-
var id = window.requestAnimationFrame(run);
|
|
33051
|
-
rafIdMap.set(rafId, id);
|
|
33052
|
-
return rafId;
|
|
33053
|
-
};
|
|
33054
|
-
var cancelRaf = function cancelRaf(rafId) {
|
|
33055
|
-
var eId = rafIdMap.get(rafId);
|
|
33056
|
-
|
|
33057
|
-
if (eId) {
|
|
33058
|
-
window.cancelAnimationFrame(eId);
|
|
33059
|
-
rafIdMap.delete(rafId);
|
|
33060
|
-
}
|
|
33061
|
-
};
|
|
33062
33078
|
// CONCATENATED MODULE: ./src/view/node/BaseNode.tsx
|
|
33063
33079
|
function BaseNode_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { BaseNode_typeof = function _typeof(obj) { return typeof obj; }; } else { BaseNode_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return BaseNode_typeof(obj); }
|
|
33064
33080
|
|
|
@@ -33174,7 +33190,9 @@ var BaseNode_BaseNode = /*#__PURE__*/function (_Component) {
|
|
|
33174
33190
|
model = _this$props2.model,
|
|
33175
33191
|
graphModel = _this$props2.graphModel; // const { isDragging } = model;
|
|
33176
33192
|
|
|
33177
|
-
var
|
|
33193
|
+
var _graphModel$editConfi = graphModel.editConfigModel,
|
|
33194
|
+
stopMoveGraph = _graphModel$editConfi.stopMoveGraph,
|
|
33195
|
+
autoExpand = _graphModel$editConfi.autoExpand,
|
|
33178
33196
|
transformModel = graphModel.transformModel,
|
|
33179
33197
|
width = graphModel.width,
|
|
33180
33198
|
height = graphModel.height,
|
|
@@ -33194,12 +33212,7 @@ var BaseNode_BaseNode = /*#__PURE__*/function (_Component) {
|
|
|
33194
33212
|
var _transformModel$Canva = transformModel.CanvasPointToHtmlPoint([x, y]),
|
|
33195
33213
|
_transformModel$Canva2 = BaseNode_slicedToArray(_transformModel$Canva, 2),
|
|
33196
33214
|
x1 = _transformModel$Canva2[0],
|
|
33197
|
-
y1 = _transformModel$Canva2[1];
|
|
33198
|
-
|
|
33199
|
-
if (x1 < 0 || y1 < 0 || x1 > width || y1 > height) {
|
|
33200
|
-
// 鼠标超出画布后的拖动,不处理,而是让上一次setInterval持续滚动画布
|
|
33201
|
-
return;
|
|
33202
|
-
} // 1. 考虑画布被缩放
|
|
33215
|
+
y1 = _transformModel$Canva2[1]; // 1. 考虑画布被缩放
|
|
33203
33216
|
// 2. 考虑鼠标位置不再节点中心
|
|
33204
33217
|
|
|
33205
33218
|
|
|
@@ -33207,7 +33220,20 @@ var BaseNode_BaseNode = /*#__PURE__*/function (_Component) {
|
|
|
33207
33220
|
y = y + _this.moveOffset.y; // 将x, y移动到grid上
|
|
33208
33221
|
|
|
33209
33222
|
x = snapToGrid(x, gridSize);
|
|
33210
|
-
y = snapToGrid(y, gridSize);
|
|
33223
|
+
y = snapToGrid(y, gridSize);
|
|
33224
|
+
|
|
33225
|
+
if (!width || !height) {
|
|
33226
|
+
graphModel.moveNode2Coordinate(model.id, x, y);
|
|
33227
|
+
return;
|
|
33228
|
+
}
|
|
33229
|
+
|
|
33230
|
+
var isOutCanvas = x1 < 0 || y1 < 0 || x1 > width || y1 > height;
|
|
33231
|
+
|
|
33232
|
+
if (autoExpand && !stopMoveGraph && isOutCanvas) {
|
|
33233
|
+
// 鼠标超出画布后的拖动,不处理,而是让上一次setInterval持续滚动画布
|
|
33234
|
+
return;
|
|
33235
|
+
} // 取节点左上角和右下角,计算节点移动是否超出范围
|
|
33236
|
+
|
|
33211
33237
|
|
|
33212
33238
|
var _transformModel$Canva3 = transformModel.CanvasPointToHtmlPoint([x - model.width / 2, y - model.height / 2]),
|
|
33213
33239
|
_transformModel$Canva4 = BaseNode_slicedToArray(_transformModel$Canva3, 2),
|
|
@@ -33236,7 +33262,7 @@ var BaseNode_BaseNode = /*#__PURE__*/function (_Component) {
|
|
|
33236
33262
|
cancelRaf(_this.t);
|
|
33237
33263
|
}
|
|
33238
33264
|
|
|
33239
|
-
if (nearBoundary.length > 0 && !
|
|
33265
|
+
if (nearBoundary.length > 0 && !stopMoveGraph && autoExpand) {
|
|
33240
33266
|
_this.t = raf_createRaf(function () {
|
|
33241
33267
|
var _nearBoundary = nearBoundary,
|
|
33242
33268
|
_nearBoundary2 = BaseNode_slicedToArray(_nearBoundary, 2),
|
|
@@ -33525,9 +33551,9 @@ var BaseNode_BaseNode = /*#__PURE__*/function (_Component) {
|
|
|
33525
33551
|
var _this$props11 = this.props,
|
|
33526
33552
|
model = _this$props11.model,
|
|
33527
33553
|
graphModel = _this$props11.graphModel;
|
|
33528
|
-
var _graphModel$
|
|
33529
|
-
hideAnchors = _graphModel$
|
|
33530
|
-
adjustNodePosition = _graphModel$
|
|
33554
|
+
var _graphModel$editConfi2 = graphModel.editConfigModel,
|
|
33555
|
+
hideAnchors = _graphModel$editConfi2.hideAnchors,
|
|
33556
|
+
adjustNodePosition = _graphModel$editConfi2.adjustNodePosition,
|
|
33531
33557
|
gridSize = graphModel.gridSize,
|
|
33532
33558
|
SCALE_X = graphModel.transformModel.SCALE_X;
|
|
33533
33559
|
var isHitable = model.isHitable,
|
|
@@ -38108,14 +38134,15 @@ var LogicFlow_LogicFlow = /*#__PURE__*/function () {
|
|
|
38108
38134
|
}
|
|
38109
38135
|
/**
|
|
38110
38136
|
* 重新设置画布的宽高
|
|
38137
|
+
* 不传会自动计算画布宽高
|
|
38111
38138
|
*/
|
|
38112
38139
|
|
|
38113
38140
|
}, {
|
|
38114
38141
|
key: "resize",
|
|
38115
38142
|
value: function resize(width, height) {
|
|
38116
|
-
this.options.width = width !== null && width !== void 0 ? width : this.options.width;
|
|
38117
|
-
this.options.height = height !== null && height !== void 0 ? height : this.options.height;
|
|
38118
38143
|
this.graphModel.resize(width, height);
|
|
38144
|
+
this.options.width = this.graphModel.width;
|
|
38145
|
+
this.options.height = this.graphModel.height;
|
|
38119
38146
|
}
|
|
38120
38147
|
/**
|
|
38121
38148
|
* 设置默认的边类型。
|