@logicflow/core 1.1.21 → 1.1.24

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.
@@ -23478,6 +23478,8 @@ var BaseEdgeModel_BaseEdgeModel = (BaseEdgeModel_class = /*#__PURE__*/function (
23478
23478
 
23479
23479
  BaseEdgeModel_initializerDefineProperty(this, "visible", BaseEdgeModel_descriptor14, this);
23480
23480
 
23481
+ BaseEdgeModel_defineProperty(this, "virtual", false);
23482
+
23481
23483
  BaseEdgeModel_initializerDefineProperty(this, "isAnimation", BaseEdgeModel_descriptor15, this);
23482
23484
 
23483
23485
  BaseEdgeModel_defineProperty(this, "graphModel", void 0);
@@ -26521,6 +26523,7 @@ var GraphModel_GraphModel = (GraphModel_class = /*#__PURE__*/function () {
26521
26523
  * @param rightBottomPoint 表示区域右下角的点
26522
26524
  * @param wholeEdge 是否要整个边都在区域内部
26523
26525
  * @param wholeNode 是否要整个节点都在区域内部
26526
+ * @param ignoreHideElement 是否忽略隐藏的节点
26524
26527
  */
26525
26528
 
26526
26529
  }, {
@@ -26528,6 +26531,7 @@ var GraphModel_GraphModel = (GraphModel_class = /*#__PURE__*/function () {
26528
26531
  value: function getAreaElement(leftTopPoint, rightBottomPoint) {
26529
26532
  var wholeEdge = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
26530
26533
  var wholeNode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
26534
+ var ignoreHideElement = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
26531
26535
  var areaElements = [];
26532
26536
  var elements = [];
26533
26537
  this.nodes.forEach(function (node) {
@@ -26540,7 +26544,7 @@ var GraphModel_GraphModel = (GraphModel_class = /*#__PURE__*/function () {
26540
26544
  for (var i = 0; i < elements.length; i++) {
26541
26545
  var currentItem = elements[i];
26542
26546
 
26543
- if (this.isElementInArea(currentItem, leftTopPoint, rightBottomPoint, wholeEdge, wholeNode)) {
26547
+ if ((!ignoreHideElement || currentItem.visible) && this.isElementInArea(currentItem, leftTopPoint, rightBottomPoint, wholeEdge, wholeNode)) {
26544
26548
  areaElements.push(currentItem);
26545
26549
  }
26546
26550
  }
@@ -26686,8 +26690,6 @@ var GraphModel_GraphModel = (GraphModel_class = /*#__PURE__*/function () {
26686
26690
  value: function graphDataToModel(graphData) {
26687
26691
  var _this = this;
26688
26692
 
26689
- console.log(5555, this.width, this.height);
26690
-
26691
26693
  if (!this.width || !this.height) {
26692
26694
  this.resize();
26693
26695
  }
@@ -26734,12 +26736,12 @@ var GraphModel_GraphModel = (GraphModel_class = /*#__PURE__*/function () {
26734
26736
  var edges = [];
26735
26737
  this.edges.forEach(function (edge) {
26736
26738
  var data = edge.getData();
26737
- if (data) edges.push(data);
26739
+ if (data && !edge.virtual) edges.push(data);
26738
26740
  });
26739
26741
  var nodes = [];
26740
26742
  this.nodes.forEach(function (node) {
26741
26743
  var data = node.getData();
26742
- if (data) nodes.push(data);
26744
+ if (data && !node.virtual) nodes.push(data);
26743
26745
  });
26744
26746
  return {
26745
26747
  nodes: nodes,
@@ -30109,6 +30111,8 @@ var BaseNodeModel_BaseNodeModel = (BaseNodeModel_class = /*#__PURE__*/function (
30109
30111
 
30110
30112
  BaseNodeModel_initializerDefineProperty(this, "visible", BaseNodeModel_descriptor14, this);
30111
30113
 
30114
+ BaseNodeModel_defineProperty(this, "virtual", false);
30115
+
30112
30116
  BaseNodeModel_defineProperty(this, "graphModel", void 0);
30113
30117
 
30114
30118
  BaseNodeModel_initializerDefineProperty(this, "zIndex", BaseNodeModel_descriptor15, this);
@@ -30592,11 +30596,11 @@ var BaseNodeModel_BaseNodeModel = (BaseNodeModel_class = /*#__PURE__*/function (
30592
30596
  }, {
30593
30597
  key: "move",
30594
30598
  value: function move(deltaX, deltaY) {
30595
- var isignoreRule = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
30599
+ var isIgnoreRule = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
30596
30600
  var isAllowMoveX = false;
30597
30601
  var isAllowMoveY = false;
30598
30602
 
30599
- if (isignoreRule) {
30603
+ if (isIgnoreRule) {
30600
30604
  isAllowMoveX = true;
30601
30605
  isAllowMoveY = true;
30602
30606
  } else {
@@ -30628,10 +30632,10 @@ var BaseNodeModel_BaseNodeModel = (BaseNodeModel_class = /*#__PURE__*/function (
30628
30632
  }, {
30629
30633
  key: "moveTo",
30630
30634
  value: function moveTo(x, y) {
30631
- var isignoreRule = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
30635
+ var isIgnoreRule = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
30632
30636
  var deltaX = x - this.x;
30633
30637
  var deltaY = y - this.y;
30634
- if (!isignoreRule && !this.isAllowMoveNode(deltaX, deltaY)) return false;
30638
+ if (!isIgnoreRule && !this.isAllowMoveNode(deltaX, deltaY)) return false;
30635
30639
 
30636
30640
  if (this.text) {
30637
30641
  this.text && this.moveText(deltaX, deltaY);
@@ -32482,7 +32486,7 @@ var Anchor_Anchor = /*#__PURE__*/function (_Component) {
32482
32486
 
32483
32487
  Anchor_defineProperty(Anchor_assertThisInitialized(_this), "onDragEnd", function (event) {
32484
32488
  if (_this.t) {
32485
- clearInterval(_this.t);
32489
+ cancelRaf(_this.t);
32486
32490
  }
32487
32491
 
32488
32492
  _this.checkEnd(event);
@@ -38626,7 +38630,8 @@ var LogicFlow_LogicFlow = /*#__PURE__*/function () {
38626
38630
  value: function getAreaElement(leftTopPoint, rightBottomPoint) {
38627
38631
  var wholeEdge = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
38628
38632
  var wholeNode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
38629
- return this.graphModel.getAreaElement(leftTopPoint, rightBottomPoint, wholeEdge, wholeNode).map(function (element) {
38633
+ var ignoreHideElement = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
38634
+ return this.graphModel.getAreaElement(leftTopPoint, rightBottomPoint, wholeEdge, wholeNode, ignoreHideElement).map(function (element) {
38630
38635
  return element.getData();
38631
38636
  });
38632
38637
  }