@logicflow/core 1.1.23 → 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
  }
@@ -26732,12 +26736,12 @@ var GraphModel_GraphModel = (GraphModel_class = /*#__PURE__*/function () {
26732
26736
  var edges = [];
26733
26737
  this.edges.forEach(function (edge) {
26734
26738
  var data = edge.getData();
26735
- if (data) edges.push(data);
26739
+ if (data && !edge.virtual) edges.push(data);
26736
26740
  });
26737
26741
  var nodes = [];
26738
26742
  this.nodes.forEach(function (node) {
26739
26743
  var data = node.getData();
26740
- if (data) nodes.push(data);
26744
+ if (data && !node.virtual) nodes.push(data);
26741
26745
  });
26742
26746
  return {
26743
26747
  nodes: nodes,
@@ -30107,6 +30111,8 @@ var BaseNodeModel_BaseNodeModel = (BaseNodeModel_class = /*#__PURE__*/function (
30107
30111
 
30108
30112
  BaseNodeModel_initializerDefineProperty(this, "visible", BaseNodeModel_descriptor14, this);
30109
30113
 
30114
+ BaseNodeModel_defineProperty(this, "virtual", false);
30115
+
30110
30116
  BaseNodeModel_defineProperty(this, "graphModel", void 0);
30111
30117
 
30112
30118
  BaseNodeModel_initializerDefineProperty(this, "zIndex", BaseNodeModel_descriptor15, this);
@@ -30590,11 +30596,11 @@ var BaseNodeModel_BaseNodeModel = (BaseNodeModel_class = /*#__PURE__*/function (
30590
30596
  }, {
30591
30597
  key: "move",
30592
30598
  value: function move(deltaX, deltaY) {
30593
- var isignoreRule = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
30599
+ var isIgnoreRule = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
30594
30600
  var isAllowMoveX = false;
30595
30601
  var isAllowMoveY = false;
30596
30602
 
30597
- if (isignoreRule) {
30603
+ if (isIgnoreRule) {
30598
30604
  isAllowMoveX = true;
30599
30605
  isAllowMoveY = true;
30600
30606
  } else {
@@ -30626,10 +30632,10 @@ var BaseNodeModel_BaseNodeModel = (BaseNodeModel_class = /*#__PURE__*/function (
30626
30632
  }, {
30627
30633
  key: "moveTo",
30628
30634
  value: function moveTo(x, y) {
30629
- var isignoreRule = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
30635
+ var isIgnoreRule = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
30630
30636
  var deltaX = x - this.x;
30631
30637
  var deltaY = y - this.y;
30632
- if (!isignoreRule && !this.isAllowMoveNode(deltaX, deltaY)) return false;
30638
+ if (!isIgnoreRule && !this.isAllowMoveNode(deltaX, deltaY)) return false;
30633
30639
 
30634
30640
  if (this.text) {
30635
30641
  this.text && this.moveText(deltaX, deltaY);
@@ -32483,8 +32489,6 @@ var Anchor_Anchor = /*#__PURE__*/function (_Component) {
32483
32489
  cancelRaf(_this.t);
32484
32490
  }
32485
32491
 
32486
- console.log(555, 'dragend');
32487
-
32488
32492
  _this.checkEnd(event);
32489
32493
 
32490
32494
  _this.setState({
@@ -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
  }