devexpress-diagram 2.2.10 → 2.2.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.
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Diagram (dx-diagram)
3
- * Version: 2.2.10
4
- * Build date: Fri Jul 12 2024
3
+ * Version: 2.2.11
4
+ * Build date: Thu Sep 19 2024
5
5
  *
6
6
  * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Diagram (dx-diagram)
3
- * Version: 2.2.10
4
- * Build date: Fri Jul 12 2024
3
+ * Version: 2.2.11
4
+ * Build date: Thu Sep 19 2024
5
5
  *
6
6
  * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
@@ -20434,6 +20434,270 @@ var CycleRemover = (function () {
20434
20434
  exports.CycleRemover = CycleRemover;
20435
20435
 
20436
20436
 
20437
+ /***/ }),
20438
+
20439
+ /***/ 1057:
20440
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
20441
+
20442
+
20443
+ var __extends = (this && this.__extends) || (function () {
20444
+ var extendStatics = function (d, b) {
20445
+ extendStatics = Object.setPrototypeOf ||
20446
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20447
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20448
+ return extendStatics(d, b);
20449
+ };
20450
+ return function (d, b) {
20451
+ extendStatics(d, b);
20452
+ function __() { this.constructor = d; }
20453
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20454
+ };
20455
+ })();
20456
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
20457
+ exports.RTree = void 0;
20458
+ var rectangle_1 = __webpack_require__(8011);
20459
+ var RTree = (function () {
20460
+ function RTree(maxWidth) {
20461
+ if (maxWidth === void 0) { maxWidth = 6; }
20462
+ this.maxWidth = maxWidth;
20463
+ this.minWidth = Math.floor(maxWidth / 2);
20464
+ this.root = new RTreeNodeBranch(new rectangle_1.Rectangle(0, 0, 0, 0), []);
20465
+ }
20466
+ RTree.prototype.search = function (point) {
20467
+ var result = [];
20468
+ if (!this.root.rect.containsPoint(point))
20469
+ return result;
20470
+ var hitsStack = [];
20471
+ hitsStack.push(this.root.nodes);
20472
+ while (hitsStack.length) {
20473
+ var nodes = hitsStack.pop();
20474
+ for (var i = nodes.length - 1, node = void 0; node = nodes[i]; i--)
20475
+ if (node.rect.containsPoint(point))
20476
+ if (isBranch(node))
20477
+ hitsStack.push(node.nodes);
20478
+ else
20479
+ result.push(node.obj);
20480
+ }
20481
+ return result;
20482
+ };
20483
+ RTree.prototype.insert = function (rect, obj) {
20484
+ var newLeaf = new RTreeNodeLeaf(rect.clone(), obj);
20485
+ if (!this.root.nodes.length) {
20486
+ this.root.rect = rect.clone();
20487
+ this.root.nodes.push(newLeaf);
20488
+ return;
20489
+ }
20490
+ var treeStack = this.chooseLeafSubtree(newLeaf);
20491
+ var retObj = newLeaf;
20492
+ var current;
20493
+ var previous;
20494
+ while (treeStack.length) {
20495
+ if (current && isBranch(current) && !current.nodes.length) {
20496
+ previous = current;
20497
+ current = treeStack.pop();
20498
+ for (var i = 0, node = void 0; node = current.nodes[i]; i++) {
20499
+ if (isBranch(node) && (node === previous || !node.nodes.length)) {
20500
+ node.nodes.splice(i, 1);
20501
+ break;
20502
+ }
20503
+ }
20504
+ }
20505
+ else
20506
+ current = treeStack.pop();
20507
+ if (retObj instanceof RTreeNode || Array.isArray(retObj)) {
20508
+ if (Array.isArray(retObj)) {
20509
+ for (var i = 0, retObjChild = void 0; retObjChild = retObj[i]; i++) {
20510
+ expandRect(current.rect, retObjChild.rect);
20511
+ }
20512
+ current.nodes = current.nodes.concat(retObj);
20513
+ }
20514
+ else {
20515
+ expandRect(current.rect, retObj.rect);
20516
+ current.nodes.push(retObj);
20517
+ }
20518
+ if (current.nodes.length <= this.maxWidth) {
20519
+ retObj = current.rect.clone();
20520
+ }
20521
+ else {
20522
+ var a = this.linearSplit(current.nodes);
20523
+ retObj = a;
20524
+ if (!treeStack.length) {
20525
+ current.nodes.push(a[0]);
20526
+ treeStack.push(current);
20527
+ retObj = a[1];
20528
+ }
20529
+ }
20530
+ }
20531
+ else {
20532
+ expandRect(current.rect, retObj);
20533
+ retObj = current.rect.clone();
20534
+ }
20535
+ }
20536
+ };
20537
+ RTree.prototype.chooseLeafSubtree = function (newLeaf) {
20538
+ var result = [];
20539
+ var bestChoiceIndex = -1;
20540
+ var bestChoiceArea;
20541
+ var first = true;
20542
+ result.push(this.root);
20543
+ var nodes = this.root.nodes;
20544
+ while (first || bestChoiceIndex !== -1) {
20545
+ if (first)
20546
+ first = false;
20547
+ else {
20548
+ result.push(nodes[bestChoiceIndex]);
20549
+ nodes = nodes[bestChoiceIndex].nodes;
20550
+ bestChoiceIndex = -1;
20551
+ }
20552
+ for (var i = nodes.length - 1, ltree = void 0; ltree = nodes[i]; i--) {
20553
+ if (!isBranch(ltree)) {
20554
+ bestChoiceIndex = -1;
20555
+ break;
20556
+ }
20557
+ var oldLRatio = squarifiedRatio(ltree.rect.width, ltree.rect.height, ltree.nodes.length + 1);
20558
+ var nw = Math.max(ltree.rect.x + ltree.rect.width, newLeaf.rect.x + newLeaf.rect.width) - Math.min(ltree.rect.x, newLeaf.rect.x);
20559
+ var nh = Math.max(ltree.rect.y + ltree.rect.height, newLeaf.rect.y + newLeaf.rect.height) - Math.min(ltree.rect.y, newLeaf.rect.y);
20560
+ var lratio = squarifiedRatio(nw, nh, ltree.nodes.length + 2);
20561
+ if (bestChoiceIndex < 0 || Math.abs(lratio - oldLRatio) < bestChoiceArea) {
20562
+ bestChoiceArea = Math.abs(lratio - oldLRatio);
20563
+ bestChoiceIndex = i;
20564
+ }
20565
+ }
20566
+ }
20567
+ return result;
20568
+ };
20569
+ RTree.prototype.linearSplit = function (nodes) {
20570
+ var n = this.pickLinear(nodes);
20571
+ while (nodes.length > 0) {
20572
+ this.pickNext(nodes, n[0], n[1]);
20573
+ }
20574
+ return n;
20575
+ };
20576
+ RTree.prototype.pickLinear = function (nodes) {
20577
+ var lowestHighX = nodes.length - 1;
20578
+ var highestLowX = 0;
20579
+ var lowestHighY = nodes.length - 1;
20580
+ var highestLowY = 0;
20581
+ var t1;
20582
+ var t2;
20583
+ for (var i = nodes.length - 2, l = void 0; l = nodes[i]; i--) {
20584
+ if (l.rect.x > nodes[highestLowX].rect.x)
20585
+ highestLowX = i;
20586
+ else if (l.rect.right < nodes[lowestHighX].rect.right)
20587
+ lowestHighX = i;
20588
+ if (l.rect.y > nodes[highestLowY].rect.y)
20589
+ highestLowY = i;
20590
+ else if (l.rect.bottom < nodes[lowestHighY].rect.bottom)
20591
+ lowestHighY = i;
20592
+ }
20593
+ var dx = Math.abs((nodes[lowestHighX].rect.right) - nodes[highestLowX].rect.x);
20594
+ var dy = Math.abs((nodes[lowestHighY].rect.bottom) - nodes[highestLowY].rect.y);
20595
+ if (dx > dy) {
20596
+ if (lowestHighX > highestLowX) {
20597
+ t1 = nodes.splice(lowestHighX, 1)[0];
20598
+ t2 = nodes.splice(highestLowX, 1)[0];
20599
+ }
20600
+ else {
20601
+ t2 = nodes.splice(highestLowX, 1)[0];
20602
+ t1 = nodes.splice(lowestHighX, 1)[0];
20603
+ }
20604
+ }
20605
+ else {
20606
+ if (lowestHighY > highestLowY) {
20607
+ t1 = nodes.splice(lowestHighY, 1)[0];
20608
+ t2 = nodes.splice(highestLowY, 1)[0];
20609
+ }
20610
+ else {
20611
+ t2 = nodes.splice(highestLowY, 1)[0];
20612
+ t1 = nodes.splice(lowestHighY, 1)[0];
20613
+ }
20614
+ }
20615
+ return [
20616
+ new RTreeNodeBranch(t1.rect.clone(), [t1]),
20617
+ new RTreeNodeBranch(t2.rect.clone(), [t2])
20618
+ ];
20619
+ };
20620
+ RTree.prototype.pickNext = function (nodes, a, b) {
20621
+ var areaA = squarifiedRatio(a.rect.width, a.rect.height, a.nodes.length + 1);
20622
+ var areaB = squarifiedRatio(b.rect.width, b.rect.height, b.nodes.length + 1);
20623
+ var highAreaDelta;
20624
+ var highAreaNode;
20625
+ var lowestGrowthGroup;
20626
+ for (var i = nodes.length - 1, l = void 0; l = nodes[i]; i--) {
20627
+ var newAreaA = new rectangle_1.Rectangle(Math.min(a.rect.x, l.rect.x), Math.min(a.rect.y, l.rect.y), 0, 0);
20628
+ newAreaA.width = Math.max(a.rect.right, l.rect.right) - newAreaA.x;
20629
+ newAreaA.height = Math.max(a.rect.bottom, l.rect.bottom) - newAreaA.y;
20630
+ var changeNewAreaA = Math.abs(squarifiedRatio(newAreaA.width, newAreaA.height, a.nodes.length + 2) - areaA);
20631
+ var newAreaB = new rectangle_1.Rectangle(Math.min(b.rect.x, l.rect.x), Math.min(b.rect.y, l.rect.y), 0, 0);
20632
+ newAreaB.width = Math.max(b.rect.right, l.rect.right) - newAreaB.x;
20633
+ newAreaB.height = Math.max(b.rect.bottom, l.rect.bottom) - newAreaB.y;
20634
+ var changeNewAreaB = Math.abs(squarifiedRatio(newAreaB.width, newAreaB.height, b.nodes.length + 2) - areaB);
20635
+ if (!highAreaNode || !highAreaDelta || Math.abs(changeNewAreaB - changeNewAreaA) < highAreaDelta) {
20636
+ highAreaNode = i;
20637
+ highAreaDelta = Math.abs(changeNewAreaB - changeNewAreaA);
20638
+ lowestGrowthGroup = changeNewAreaB < changeNewAreaA ? b : a;
20639
+ }
20640
+ }
20641
+ var tmp = nodes.splice(highAreaNode, 1)[0];
20642
+ if (a.nodes.length + nodes.length + 1 <= this.minWidth) {
20643
+ a.nodes.push(tmp);
20644
+ expandRect(a.rect, tmp.rect);
20645
+ }
20646
+ else if (b.nodes.length + nodes.length + 1 <= this.minWidth) {
20647
+ b.nodes.push(tmp);
20648
+ expandRect(b.rect, tmp.rect);
20649
+ }
20650
+ else {
20651
+ lowestGrowthGroup.nodes.push(tmp);
20652
+ expandRect(lowestGrowthGroup.rect, tmp.rect);
20653
+ }
20654
+ };
20655
+ return RTree;
20656
+ }());
20657
+ exports.RTree = RTree;
20658
+ var RTreeNode = (function () {
20659
+ function RTreeNode(rect) {
20660
+ this.rect = rect;
20661
+ }
20662
+ return RTreeNode;
20663
+ }());
20664
+ var RTreeNodeLeaf = (function (_super) {
20665
+ __extends(RTreeNodeLeaf, _super);
20666
+ function RTreeNodeLeaf(rect, obj) {
20667
+ var _this = _super.call(this, rect) || this;
20668
+ _this.obj = obj;
20669
+ return _this;
20670
+ }
20671
+ return RTreeNodeLeaf;
20672
+ }(RTreeNode));
20673
+ var RTreeNodeBranch = (function (_super) {
20674
+ __extends(RTreeNodeBranch, _super);
20675
+ function RTreeNodeBranch(rect, nodes) {
20676
+ var _this = _super.call(this, rect) || this;
20677
+ _this.nodes = nodes;
20678
+ return _this;
20679
+ }
20680
+ return RTreeNodeBranch;
20681
+ }(RTreeNode));
20682
+ function isBranch(node) {
20683
+ return "nodes" in node;
20684
+ }
20685
+ function squarifiedRatio(width, height, fill) {
20686
+ var lperi = (width + height) / 2;
20687
+ var larea = width * height;
20688
+ var lgeo = larea / (lperi * lperi);
20689
+ return larea * fill / lgeo;
20690
+ }
20691
+ function expandRect(rect, other) {
20692
+ var rx = Math.max(rect.right, other.right);
20693
+ var ry = Math.max(rect.bottom, other.bottom);
20694
+ rect.x = Math.min(rect.x, other.x);
20695
+ rect.y = Math.min(rect.y, other.y);
20696
+ rect.width = rx - rect.x;
20697
+ rect.height = ry - rect.y;
20698
+ }
20699
+
20700
+
20437
20701
  /***/ }),
20438
20702
 
20439
20703
  /***/ 701:
@@ -22897,7 +23161,7 @@ var AStarContext = (function (_super) {
22897
23161
  return _this;
22898
23162
  }
22899
23163
  AStarContext.prototype.addProhibitedPoint = function (point) {
22900
- this.prohibitedPoints[point.toString()] = point;
23164
+ this.prohibitedPoints[point.x + "_" + point.y] = point;
22901
23165
  };
22902
23166
  AStarContext.prototype.getNeighborPoints = function (point) {
22903
23167
  var _this = this;
@@ -22915,7 +23179,7 @@ var AStarContext = (function (_super) {
22915
23179
  return node.penalty + this.metrics.penalty(distance, middlePosition, turnDirection, this.getIntersectedItems(middlePosition));
22916
23180
  };
22917
23181
  AStarContext.prototype.allowPoint = function (p) {
22918
- return this.prohibitedPoints[p.toString()] === undefined && (!this.prohibitedSegments || this.prohibitedSegments.allowPoint(p));
23182
+ return !((p.x + "_" + p.y) in this.prohibitedPoints) && (!this.prohibitedSegments || this.prohibitedSegments.allowPoint(p));
22919
23183
  };
22920
23184
  AStarContext.prototype.getTurnDirection = function (angle) {
22921
23185
  return RightAngleConnectorRoutingMathOperations_1.RightAngleConnectorRoutingMathOperations.getTurnDirection(angle);
@@ -22923,17 +23187,8 @@ var AStarContext = (function (_super) {
22923
23187
  AStarContext.prototype.getIntersectedItems = function (position) {
22924
23188
  var _this = this;
22925
23189
  var margin = this.routingContext.shapeMargins;
22926
- return this.routingContext.getIntersectedItems(position, function (p, i) { return _this.hasIntersectedItem(p, i, margin); });
22927
- };
22928
- AStarContext.prototype.hasIntersectedItem = function (point, item, margin) {
22929
- if (!this.isIntersectedWithExtendedRectangle(point, item, margin))
22930
- return false;
22931
- if (this.hasOneShapeConnection(item))
22932
- return true;
22933
- return !this.itemContainsConnectionPoints(item);
22934
- };
22935
- AStarContext.prototype.isIntersectedWithExtendedRectangle = function (point, item, margin) {
22936
- return item.rectangle.clone().inflate(margin).containsPoint(point);
23190
+ return this.routingContext.getIntersectedItems(position, margin)
23191
+ .filter(function (i) { return _this.hasOneShapeConnection(i) || !_this.itemContainsConnectionPoints(i); });
22937
23192
  };
22938
23193
  AStarContext.prototype.itemContainsConnectionPoints = function (item) {
22939
23194
  var rectangle = item.rectangle;
@@ -23227,9 +23482,10 @@ var UniqueAStarNodePositions = (function () {
23227
23482
  if (getKey === void 0) { getKey = function (key) { return key.toString(); }; }
23228
23483
  this.getKey = getKey;
23229
23484
  this.items = {};
23485
+ this.length = 0;
23230
23486
  }
23231
23487
  Object.defineProperty(UniqueAStarNodePositions.prototype, "count", {
23232
- get: function () { return Object.keys(this.items).length; },
23488
+ get: function () { return this.length; },
23233
23489
  enumerable: false,
23234
23490
  configurable: true
23235
23491
  });
@@ -23239,13 +23495,17 @@ var UniqueAStarNodePositions = (function () {
23239
23495
  };
23240
23496
  UniqueAStarNodePositions.prototype.add = function (position, node) {
23241
23497
  var key = this.getKey(position);
23242
- if (this.items[key] === undefined)
23498
+ if (this.items[key] === undefined) {
23499
+ this.length++;
23243
23500
  this.items[key] = { position: position, node: node };
23501
+ }
23244
23502
  };
23245
23503
  UniqueAStarNodePositions.prototype.remove = function (position) {
23246
23504
  var key = this.getKey(position);
23247
- if (this.items[key] !== undefined)
23505
+ if (this.items[key] !== undefined) {
23506
+ this.length--;
23248
23507
  delete this.items[key];
23508
+ }
23249
23509
  };
23250
23510
  return UniqueAStarNodePositions;
23251
23511
  }());
@@ -23269,10 +23529,10 @@ var ConnectorProhibitedSegments = (function () {
23269
23529
  this.segments.push(segment);
23270
23530
  };
23271
23531
  ConnectorProhibitedSegments.prototype.addExludedPoint = function (point) {
23272
- this.exludedPoints[point.toString()] = point;
23532
+ this.exludedPoints[point.x + "_" + point.y] = true;
23273
23533
  };
23274
23534
  ConnectorProhibitedSegments.prototype.allowPoint = function (point) {
23275
- if (this.exludedPoints[point.toString()] === undefined)
23535
+ if (!((point.x + "_" + point.y) in this.exludedPoints))
23276
23536
  for (var i = 0; i < this.segments.length; i++)
23277
23537
  if (this.segments[i].containsPoint(point))
23278
23538
  return false;
@@ -23438,26 +23698,16 @@ var ConnectorRoutingModel = (function () {
23438
23698
  return new RightAngleConnectorRoutingStrategy_1.RightAngleConnectorRoutingStrategy(this);
23439
23699
  return undefined;
23440
23700
  };
23441
- ConnectorRoutingModel.prototype.getItems = function (beginConnectorShape, endConnectorShape) {
23442
- return this.getShapes(beginConnectorShape, endConnectorShape);
23701
+ ConnectorRoutingModel.prototype.getItems = function () {
23702
+ return this.getShapes();
23443
23703
  };
23444
23704
  ConnectorRoutingModel.prototype.notifyConnectorRoutingModeChanged = function (connectorRoutingMode) {
23445
23705
  this.connectorRoutingMode = connectorRoutingMode;
23446
23706
  };
23447
- ConnectorRoutingModel.prototype.getShapes = function (beginConnectorShape, endConnectorShape) {
23707
+ ConnectorRoutingModel.prototype.getShapes = function () {
23448
23708
  if (this.model === undefined || this.connectorRoutingMode === undefined || this.connectorRoutingMode === Settings_1.ConnectorRoutingMode.None)
23449
23709
  return [];
23450
- if (this.connectorRoutingMode === Settings_1.ConnectorRoutingMode.AllShapesOnly)
23451
- return this.model.items.filter(function (i) { return i instanceof Shape_1.Shape; });
23452
- return this.getConnectorShapes(beginConnectorShape, endConnectorShape);
23453
- };
23454
- ConnectorRoutingModel.prototype.getConnectorShapes = function (beginConnectorShape, endConnectorShape) {
23455
- var result = [];
23456
- if (beginConnectorShape)
23457
- result.push(beginConnectorShape);
23458
- if (endConnectorShape && beginConnectorShape !== endConnectorShape)
23459
- result.push(endConnectorShape);
23460
- return result;
23710
+ return this.model.items.filter(function (i) { return i instanceof Shape_1.Shape; });
23461
23711
  };
23462
23712
  return ConnectorRoutingModel;
23463
23713
  }());
@@ -23560,6 +23810,7 @@ var AStarMetrics_1 = __webpack_require__(9927);
23560
23810
  var AStarContext_1 = __webpack_require__(2180);
23561
23811
  var AStarCalculator_1 = __webpack_require__(3975);
23562
23812
  var Utils_1 = __webpack_require__(8675);
23813
+ var RTree_1 = __webpack_require__(1057);
23563
23814
  var CuttingItemsContext = (function () {
23564
23815
  function CuttingItemsContext() {
23565
23816
  this.cuttingItemKeys = [];
@@ -23582,22 +23833,21 @@ var CuttingItemsContext = (function () {
23582
23833
  }());
23583
23834
  exports.CuttingItemsContext = CuttingItemsContext;
23584
23835
  var IntersectingItemsByPointsContext = (function () {
23585
- function IntersectingItemsByPointsContext() {
23586
- this.items = {};
23836
+ function IntersectingItemsByPointsContext(routingModel) {
23837
+ this.routingModel = routingModel;
23838
+ this.trees = {};
23587
23839
  }
23588
- IntersectingItemsByPointsContext.prototype.getOrAddItems = function (point, getItems) {
23589
- if (point) {
23590
- var key = point.toString();
23591
- var item = this.items[key];
23592
- if (item !== undefined)
23593
- return item.items;
23594
- if (getItems) {
23595
- var items = getItems(point);
23596
- this.items[key] = { point: point, items: items };
23597
- return items;
23598
- }
23840
+ IntersectingItemsByPointsContext.prototype.getItems = function (point, margin) {
23841
+ return this.getOrCreateTree(margin).search(point);
23842
+ };
23843
+ IntersectingItemsByPointsContext.prototype.getOrCreateTree = function (margin) {
23844
+ if (!this.trees[margin]) {
23845
+ this.trees[margin] = new RTree_1.RTree();
23846
+ var items = this.routingModel.getItems();
23847
+ for (var i = 0, item = void 0; item = items[i]; i++)
23848
+ this.trees[margin].insert(margin ? item.rectangle.inflate(margin, margin) : item.rectangle, item);
23599
23849
  }
23600
- return undefined;
23850
+ return this.trees[margin];
23601
23851
  };
23602
23852
  return IntersectingItemsByPointsContext;
23603
23853
  }());
@@ -23613,7 +23863,7 @@ var RightAngleConnectorRoutingContext = (function () {
23613
23863
  this.endConnectionSide = this.getConnectionSide(this.endConnectionShape, endConnectionPointIndex, this.endPoint);
23614
23864
  this.ignorableItemKeys = {};
23615
23865
  this.cuttingShapesContext = new CuttingItemsContext();
23616
- this.intersectedItemsByPointsContext = new IntersectingItemsByPointsContext();
23866
+ this.intersectedItemsByPointsContext = new IntersectingItemsByPointsContext(this.routingModel);
23617
23867
  this.isInvalidRenderSegments = true;
23618
23868
  }
23619
23869
  Object.defineProperty(RightAngleConnectorRoutingContext.prototype, "shapeMargins", {
@@ -23722,11 +23972,11 @@ var RightAngleConnectorRoutingContext = (function () {
23722
23972
  RightAngleConnectorRoutingMathOperations_1.RightAngleConnectorRoutingMathOperations.unionPoints(result);
23723
23973
  return result;
23724
23974
  };
23725
- RightAngleConnectorRoutingContext.prototype.getIntersectedItems = function (point, predicate) {
23975
+ RightAngleConnectorRoutingContext.prototype.getIntersectedItems = function (point, margin) {
23726
23976
  var _this = this;
23727
- return this.intersectedItemsByPointsContext.getOrAddItems(point, function (p) { return _this.routingModel
23728
- .getItems(_this.beginConnectionShape, _this.endConnectionShape)
23729
- .filter(function (s) { return !_this.isIgnorableItem(s) && predicate(p, s); }); });
23977
+ return this.intersectedItemsByPointsContext
23978
+ .getItems(point, margin)
23979
+ .filter(function (item) { return !_this.isIgnorableItem(item); });
23730
23980
  };
23731
23981
  RightAngleConnectorRoutingContext.prototype.validateRenderPoints = function (result) {
23732
23982
  if (this.isInvalidRenderSegments) {
@@ -23754,7 +24004,7 @@ var RightAngleConnectorRoutingContext = (function () {
23754
24004
  };
23755
24005
  RightAngleConnectorRoutingContext.prototype.processIntersection = function () {
23756
24006
  var _this = this;
23757
- var shapes = this.routingModel.getItems(this.beginConnectionShape, this.endConnectionShape);
24007
+ var shapes = this.routingModel.getItems();
23758
24008
  if (shapes)
23759
24009
  shapes.forEach(function (s) {
23760
24010
  var key = s.key;
@@ -23897,8 +24147,8 @@ var RightAngleConnectorRoutingContext = (function () {
23897
24147
  return this.createBeginConnectionSegmentCore(-offset);
23898
24148
  };
23899
24149
  RightAngleConnectorRoutingContext.prototype.hasIntersectedItemsByPoint = function (point, secondPoint, connectionItem) {
23900
- var intersectedItems = this.getIntersectedItems(point, function (p, s) { return s.rectangle.containsPoint(p) && !s.rectangle.containsPoint(secondPoint) && s.key !== connectionItem.key; });
23901
- return intersectedItems !== undefined && intersectedItems.length > 0;
24150
+ return this.getIntersectedItems(point, 0)
24151
+ .some(function (i) { return i.key !== connectionItem.key && !i.rectangle.containsPoint(secondPoint); });
23902
24152
  };
23903
24153
  RightAngleConnectorRoutingContext.prototype.createEndConnectionSegment = function (offset, endShapeContainsBeginConnection) {
23904
24154
  if (this.endConnectionSide === DiagramItem_1.ConnectionPointSide.Undefined)
@@ -23939,11 +24189,11 @@ var RightAngleConnectorRoutingContext = (function () {
23939
24189
  return RightAngleConnectorRoutingMathOperations_1.RightAngleConnectorRoutingMathOperations.isConnectionRectanleLineIntersected(this.endConnectionShape.rectangle, segment, this.endConnectionSide, excludeBeginPoint, excludeEndPoint, function (x, y) { return new point_1.Point(x, y); });
23940
24190
  };
23941
24191
  RightAngleConnectorRoutingContext.prototype.isIgnorableItem = function (item) {
23942
- return this.ignorableItemKeys[item.key] !== undefined;
24192
+ return item.key in this.ignorableItemKeys;
23943
24193
  };
23944
24194
  RightAngleConnectorRoutingContext.prototype.createExtendedShapesBounds = function () {
23945
24195
  var _this = this;
23946
- return this.routingModel.getItems(this.beginConnectionShape, this.endConnectionShape).map(function (i) { return i.rectangle.clone().inflate(_this.routingModel.shapeMargins); });
24196
+ return this.routingModel.getItems().map(function (i) { return i.rectangle.clone().inflate(_this.routingModel.shapeMargins); });
23947
24197
  };
23948
24198
  RightAngleConnectorRoutingContext.prototype.createGrid = function () {
23949
24199
  return RoutingGrid_1.RoutingGrid.create(this.createGridPoints(), this.createExtendedShapesBounds(), function (x, y) { return new point_1.Point(x, y); });
@@ -39126,7 +39376,6 @@ var AutoZoomMode;
39126
39376
  var ConnectorRoutingMode;
39127
39377
  (function (ConnectorRoutingMode) {
39128
39378
  ConnectorRoutingMode[ConnectorRoutingMode["None"] = 0] = "None";
39129
- ConnectorRoutingMode[ConnectorRoutingMode["ConnectorShapesOnly"] = 1] = "ConnectorShapesOnly";
39130
39379
  ConnectorRoutingMode[ConnectorRoutingMode["AllShapesOnly"] = 2] = "AllShapesOnly";
39131
39380
  })(ConnectorRoutingMode = exports.ConnectorRoutingMode || (exports.ConnectorRoutingMode = {}));
39132
39381
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Diagram (dx-diagram.min)
3
- * Version: 2.2.10
4
- * Build date: Fri Jul 12 2024
3
+ * Version: 2.2.11
4
+ * Build date: Thu Sep 19 2024
5
5
  *
6
6
  * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs