@logicflow/core 1.2.0-alpha.10 → 1.2.0-alpha.11

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.
@@ -25637,8 +25637,8 @@ var GraphModel_GraphModel = /*#__PURE__*/function () {
25637
25637
  options.height = container.getBoundingClientRect().height;
25638
25638
  }
25639
25639
 
25640
- if (!options.width || !options.height) {
25641
- console.warn('画布初始化确实宽高');
25640
+ if ((!options.width || !options.height) && options.autoExpand) {
25641
+ console.warn('画布初始化缺少宽高,可能会出现节点无法拖动的情况');
25642
25642
  }
25643
25643
 
25644
25644
  this.width = options.width;
@@ -32228,7 +32228,9 @@ var BaseNode_BaseNode = /*#__PURE__*/function (_Component) {
32228
32228
  model = _this$props2.model,
32229
32229
  graphModel = _this$props2.graphModel; // const { isDragging } = model;
32230
32230
 
32231
- var editConfigModel = graphModel.editConfigModel,
32231
+ var _graphModel$editConfi = graphModel.editConfigModel,
32232
+ stopMoveGraph = _graphModel$editConfi.stopMoveGraph,
32233
+ autoExpand = _graphModel$editConfi.autoExpand,
32232
32234
  transformModel = graphModel.transformModel,
32233
32235
  width = graphModel.width,
32234
32236
  height = graphModel.height,
@@ -32250,7 +32252,7 @@ var BaseNode_BaseNode = /*#__PURE__*/function (_Component) {
32250
32252
  x1 = _transformModel$Canva2[0],
32251
32253
  y1 = _transformModel$Canva2[1];
32252
32254
 
32253
- if (x1 < 0 || y1 < 0 || x1 > width || y1 > height) {
32255
+ if (autoExpand && !stopMoveGraph && (x1 < 0 || y1 < 0 || x1 > width || y1 > height)) {
32254
32256
  // 鼠标超出画布后的拖动,不处理,而是让上一次setInterval持续滚动画布
32255
32257
  return;
32256
32258
  } // 1. 考虑画布被缩放
@@ -32290,7 +32292,7 @@ var BaseNode_BaseNode = /*#__PURE__*/function (_Component) {
32290
32292
  cancelRaf(_this.t);
32291
32293
  }
32292
32294
 
32293
- if (nearBoundary.length > 0 && !editConfigModel.stopMoveGraph && editConfigModel.autoExpand) {
32295
+ if (nearBoundary.length > 0 && !stopMoveGraph && autoExpand) {
32294
32296
  _this.t = raf_createRaf(function () {
32295
32297
  var _nearBoundary = nearBoundary,
32296
32298
  _nearBoundary2 = BaseNode_slicedToArray(_nearBoundary, 2),
@@ -32579,9 +32581,9 @@ var BaseNode_BaseNode = /*#__PURE__*/function (_Component) {
32579
32581
  var _this$props11 = this.props,
32580
32582
  model = _this$props11.model,
32581
32583
  graphModel = _this$props11.graphModel;
32582
- var _graphModel$editConfi = graphModel.editConfigModel,
32583
- hideAnchors = _graphModel$editConfi.hideAnchors,
32584
- adjustNodePosition = _graphModel$editConfi.adjustNodePosition,
32584
+ var _graphModel$editConfi2 = graphModel.editConfigModel,
32585
+ hideAnchors = _graphModel$editConfi2.hideAnchors,
32586
+ adjustNodePosition = _graphModel$editConfi2.adjustNodePosition,
32585
32587
  gridSize = graphModel.gridSize,
32586
32588
  SCALE_X = graphModel.transformModel.SCALE_X;
32587
32589
  var isHitable = model.isHitable,
@@ -36540,10 +36542,6 @@ var LogicFlow_LogicFlow = /*#__PURE__*/function () {
36540
36542
 
36541
36543
  LogicFlow_defineProperty(this, "container", void 0);
36542
36544
 
36543
- LogicFlow_defineProperty(this, "width", void 0);
36544
-
36545
- LogicFlow_defineProperty(this, "height", void 0);
36546
-
36547
36545
  LogicFlow_defineProperty(this, "graphModel", void 0);
36548
36546
 
36549
36547
  LogicFlow_defineProperty(this, "history", void 0);