devexpress-diagram 2.2.2 → 2.2.4

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,9 +1,9 @@
1
1
  /*!
2
2
  * DevExpress Diagram (dx-diagram)
3
- * Version: 2.2.2
4
- * Build date: Wed Sep 13 2023
3
+ * Version: 2.2.4
4
+ * Build date: Thu Jan 18 2024
5
5
  *
6
- * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
6
+ * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
8
8
  */
9
9
  .dxdi-control{overflow:visible;box-sizing:border-box;position:relative}.dxdi-control.dxdi-read-only .dxdi-canvas.dxdi-drag-scroll{cursor:grab !important}.dxdi-control.dxdi-read-only .dxdi-canvas.dxdi-drag-scroll .shape,.dxdi-control.dxdi-read-only .dxdi-canvas.dxdi-drag-scroll .shape-expand-btn,.dxdi-control.dxdi-read-only .dxdi-canvas.dxdi-drag-scroll text{cursor:grab}.dxdi-control.dxdi-read-only .dxdi-canvas .shape,.dxdi-control.dxdi-read-only .dxdi-canvas .shape-expand-btn,.dxdi-control.dxdi-read-only .dxdi-canvas text{cursor:default}.dxdi-control .dxdi-canvas{display:block;background-color:#d9d9d9;transform-origin:0 0;overflow:hidden}.dxdi-canvas.dxdi-drag-scroll{cursor:grab !important}.dxdi-canvas.dxdi-drag-scroll .shape,.dxdi-canvas.dxdi-drag-scroll .shape .shape-expand-btn,.dxdi-canvas.dxdi-drag-scroll .connector,.dxdi-canvas.dxdi-drag-scroll .connection-point,.dxdi-canvas.dxdi-drag-scroll .connector text,.dxdi-canvas.dxdi-drag-scroll .connector-side-mark.vertical,.dxdi-canvas.dxdi-drag-scroll .connector-side-mark.horizontal,.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="1"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="2"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="3"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="4"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="5"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="6"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="7"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="8"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="4"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="5"]{cursor:grab}.dxdi-canvas *{user-select:none}.dxdi-canvas text{font-family:arial,helvetica,sans-serif;font-size:10pt}.dxdi-canvas .page{fill:white}.dxdi-canvas .pages-grid-line{fill:none;stroke:rgba(0,0,0,0.15);stroke-dasharray:8;stroke-width:2}.dxdi-canvas .grid-outer-line,.dxdi-canvas .grid-inner-line{fill:none}.dxdi-canvas .grid-outer-line{stroke:rgba(0,0,0,0.1)}.dxdi-canvas .grid-inner-line{stroke:rgba(0,0,0,0.05)}.dxdi-canvas .shape,.dxdi-canvas .toolbox-item{pointer-events:bounding-box}.dxdi-canvas .shape rect,.dxdi-canvas .shape path,.dxdi-canvas .shape line,.dxdi-canvas .shape ellipse,.dxdi-canvas .toolbox-item rect,.dxdi-canvas .toolbox-item path,.dxdi-canvas .toolbox-item line,.dxdi-canvas .toolbox-item ellipse{fill:#fff;stroke-width:2;stroke:#000}.dxdi-canvas .shape text,.dxdi-canvas .toolbox-item text{fill:#000;text-anchor:middle}.dxdi-canvas .shape rect.selector,.dxdi-canvas .toolbox-item rect.selector{stroke-width:48;stroke:transparent;fill:transparent;pointer-events:initial}.dxdi-canvas .shape.not-valid rect,.dxdi-canvas .shape.not-valid path,.dxdi-canvas .shape.not-valid line,.dxdi-canvas .shape.not-valid ellipse{stroke:red !important}.dxdi-canvas .shape{cursor:move}.dxdi-canvas .shape.text-input>text{display:none}.dxdi-canvas .shape.container>rect:first-child{fill:transparent}.dxdi-canvas .shape .shape-expand-btn{cursor:pointer}.dxdi-canvas .shape .shape-expand-btn>rect,.dxdi-canvas .shape .shape-expand-btn>path{stroke-dasharray:initial !important}.dxdi-canvas .shape .shape-expand-btn>path{stroke-width:2 !important}.dxdi-canvas .shape .dxdi-image .dxdi-spinner{animation:loading-spinner 1s linear infinite}.dxdi-canvas .shape .dxdi-image .dxdi-spinner ellipse{stroke:#000;stroke-opacity:0.2}.dxdi-canvas .shape .dxdi-image .dxdi-spinner path{stroke:#fd7010;stroke-linecap:round}.dxdi-canvas .shape .dxdi-image .dxdi-spinner ellipse,.dxdi-canvas .shape .dxdi-image .dxdi-spinner path{fill:none;stroke-width:5}@keyframes loading-spinner{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.dxdi-canvas .shape .dxdi-image .dxdi-user .dxdi-background{fill:#000;opacity:0.2;stroke:none}.dxdi-canvas .shape .dxdi-image .dxdi-user ellipse,.dxdi-canvas .shape .dxdi-image .dxdi-user path{fill:#fff;stroke:none}.dxdi-canvas .shape .dxdi-image .dxdi-warning ellipse{stroke:none;fill:#ee1616}.dxdi-canvas .shape .dxdi-image .dxdi-warning rect{stroke:none;fill:#fff}.dxdi-canvas .shape.locked,.dxdi-canvas .shape.locked+.container-children .shape{cursor:inherit !important}.dxdi-canvas .shape.locked .shape-expand-btn,.dxdi-canvas .shape.locked+.container-children .shape .shape-expand-btn{cursor:inherit !important}.dxdi-canvas .container-children .shape .selector{stroke-width:8}.dxdi-canvas .toolbox-item{cursor:pointer}.dxdi-canvas .toolbox-item .selector{stroke-width:0 !important}.dxdi-canvas .connector path,.dxdi-canvas .connector line{stroke-width:2;stroke:#000;stroke-linejoin:round;pointer-events:stroke}.dxdi-canvas .connector path:not(.outlined-line-ending):not(.filled-line-ending){fill:none !important}.dxdi-canvas .connector path.outlined-line-ending{fill:#fff}.dxdi-canvas .connector path.filled-line-ending{fill:#000}.dxdi-canvas .connector path.selector,.dxdi-canvas .connector line.selector{stroke-width:16;stroke:transparent}.dxdi-canvas .connector text{cursor:move;fill:#000;text-anchor:middle}.dxdi-canvas .connector .text-filter-flood{flood-color:#fff}.dxdi-canvas .connector.not-valid path,.dxdi-canvas .connector.not-valid line{stroke:red !important}.dxdi-canvas .connector.can-move{cursor:move}.dxdi-canvas .selection-mark,.dxdi-canvas .geometry-mark,.dxdi-canvas .connection-point,.dxdi-canvas .connection-mark,.dxdi-canvas .connector-point-mark,.dxdi-canvas .connector-side-mark{fill:#fff;stroke-width:2}.dxdi-canvas .selection-mark{stroke:#1e90ff}.dxdi-canvas .selection-mark[data-type="9"][data-value="1"]{cursor:nw-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="2"]{cursor:ne-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="3"]{cursor:se-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="4"]{cursor:sw-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="5"]{cursor:n-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="6"]{cursor:e-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="7"]{cursor:s-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="8"]{cursor:w-resize}.dxdi-canvas .selection-mark[data-type="4"],.dxdi-canvas .selection-mark[data-type="5"]{cursor:move}.dxdi-canvas .locked-selection-mark{fill:#fff;stroke-width:1;stroke:#666}.dxdi-canvas .geometry-mark{cursor:pointer;stroke:#daa520}.dxdi-canvas .container-target,.dxdi-canvas .connection-target{fill:transparent;stroke:orchid;stroke-width:2;pointer-events:none}.dxdi-canvas .connection-point{cursor:crosshair;stroke:orchid}.dxdi-canvas .connection-point.not-valid{stroke:grey !important;display:none}.dxdi-canvas .connection-mark{cursor:crosshair;stroke:orchid}.dxdi-canvas .connection-point.selector,.dxdi-canvas .connection-mark.selector{stroke-width:10px;stroke:transparent;fill:transparent}.dxdi-canvas .connection-point.active{fill:orchid}.dxdi-canvas .connection-mark.active{fill:orchid}.dxdi-canvas .connector-point-mark,.dxdi-canvas .connector-side-mark{cursor:move;stroke:#1e90ff}.dxdi-canvas .connector-point-mark.disabled{cursor:default;display:none}.dxdi-canvas .connector-side-mark{fill:#1e90ff}.dxdi-canvas .connector-side-mark.vertical{cursor:col-resize}.dxdi-canvas .connector-side-mark.horizontal{cursor:row-resize}.dxdi-canvas .item-selection-rect,.dxdi-canvas .items-selection-rect{fill:transparent;stroke-width:1;stroke:#1e90ff;stroke-dasharray:2px;pointer-events:none}.dxdi-canvas .items-selection-rect{fill:rgba(30,144,255,0.02)}.dxdi-canvas .item-multi-selection-rect{fill:rgba(30,144,255,0.02);stroke-width:1;stroke:#1e90ff;pointer-events:none}.dxdi-canvas .selection-rect{fill:rgba(30,144,255,0.2);stroke-width:1;stroke:#1e90ff;pointer-events:none}.dxdi-canvas .connector-selection,.dxdi-canvas .connector-multi-selection{fill:transparent;stroke-width:1;stroke:#1e90ff;pointer-events:none}.dxdi-canvas .connector-selection.text,.dxdi-canvas .connector-multi-selection.text{fill:transparent;stroke-width:1}.dxdi-canvas .connector-selection{stroke-dasharray:2px}.dxdi-canvas .connector-selection-mask rect{fill:black}.dxdi-canvas .connector-selection-mask rect.background{fill:white}.dxdi-canvas .connector-selection-mask path,.dxdi-canvas .connector-selection-mask line{fill:white;stroke:black;stroke-width:4}.dxdi-canvas .connector-selection-mask text{text-anchor:middle}.dxdi-canvas .extension-line path{stroke:#1e90ff;stroke-width:1}.dxdi-canvas .extension-line path.size-line{stroke-dasharray:4px}.dxdi-canvas .extension-line text{fill:#1e90ff;font-size:0.8em;text-anchor:middle}.dxdi-canvas .extension-line.center>path.size-line,.dxdi-canvas .extension-line.page>path.size-line{stroke-dasharray:0}.dxdi-canvas .extension-line:not(.center)>path:not(:first-child){display:none}.dxdi-canvas .resize-info text{fill:rgba(0,0,0,0.8);font-size:0.8em;text-anchor:middle}.dxdi-canvas .resize-info rect{fill:#fff;stroke:rgba(0,0,0,0.3);stroke-width:1}.dxdi-canvas .dxdi-active-selection .shape{cursor:default}.dxdi-control:not(.focused) .dxdi-canvas .selection-mark{stroke:#666}.dxdi-control:not(.focused) .dxdi-canvas .geometry-mark{stroke:#666}.dxdi-control:not(.focused) .dxdi-canvas .item-selection-rect,.dxdi-control:not(.focused) .dxdi-canvas .items-selection-rect{fill:transparent;stroke:#666}.dxdi-control:not(.focused) .dxdi-canvas .items-selection-rect{fill:rgba(144,144,144,0.02)}.dxdi-control:not(.focused) .dxdi-canvas .item-multi-selection-rect{fill:rgba(144,144,144,0.02);stroke:#666}.dxdi-control:not(.focused) .dxdi-canvas .connection-point,.dxdi-control:not(.focused) .dxdi-canvas .connection-point.selector,.dxdi-control:not(.focused) .dxdi-canvas .connection-mark,.dxdi-control:not(.focused) .dxdi-canvas .connection-mark.selector{display:none}.dxdi-control:not(.focused) .dxdi-canvas .connector-selection,.dxdi-control:not(.focused) .dxdi-canvas .connector-multi-selection{stroke:#666}.dxdi-control:not(.focused) .dxdi-canvas .connector-point-mark,.dxdi-control:not(.focused) .dxdi-canvas .connector-side-mark{stroke:#666}.dxdi-control:not(.focused) .dxdi-canvas .connector-side-mark{fill:#666}.dxdi-dragging,.dxdi-dragging *{user-select:none}.dxdi-canvas.export *{cursor:inherit !important;pointer-events:all !important}.dxdi-touch-action{touch-action:none}.dxdi-toolbox,.dxdi-toolbox svg{user-select:none;outline:none}.dxdi-toolbox,.dxdi-toolbox .dxdi-canvas,.dxdi-toolbox-drag-item .dxdi-canvas{width:100%;height:100%}.dxdi-toolbox .dxdi-canvas .toolbox-item rect,.dxdi-toolbox .dxdi-canvas .toolbox-item path,.dxdi-toolbox .dxdi-canvas .toolbox-item line,.dxdi-toolbox .dxdi-canvas .toolbox-item ellipse{fill:transparent;stroke:currentColor}.dxdi-toolbox .dxdi-canvas .toolbox-item .dxdi-image-placeholder{opacity:0.75;fill:currentColor;stroke:none}.dxdi-toolbox .dxdi-canvas .toolbox-item .dxdi-shape-text{opacity:0.25}.dxdi-toolbox .dxdi-canvas .toolbox-item text,.dxdi-toolbox-drag-item .dxdi-canvas text{font-weight:bold;font-family:"Segoe UI", "Helvetica Neue", Helvetica, arial, sans-serif;fill:currentColor}.dxdi-toolbox-drag-item .dxdi-canvas .dxdi-image-placeholder{opacity:0.75;fill:currentColor;stroke:none}.dxdi-toolbox-drag-item .dxdi-canvas .dxdi-shape-text{display:none}.dxdi-toolbox .toolbox-text-item{cursor:pointer;user-select:none;margin:0 0 0.6em}.dxdi-toolbox-drag-item,.dxdi-toolbox-drag-text-item{font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000;position:absolute;z-index:10000;pointer-events:none !important}.dxdi-toolbox-drag-item *,.dxdi-toolbox-drag-text-item *{pointer-events:none !important}.dxdi-toolbox-drag-item text{pointer-events:none}.dxdi-toolbox-drag-text-item{background-color:#fff;border:2px solid #000;padding:0.5em}.dxdi-tb-drag-captured{display:none}.dxdi-focus-input,.dxdi-text-input-container,.dxdi-text-input{padding:0;outline:none;border:none;resize:none}.dxdi-clipboard-input,.dxdi-focus-input{position:absolute;overflow:hidden;left:-1000px !important;top:-1000px !important;opacity:0;z-index:-100;font-size:16px}.dxdi-text-input-container{display:none}.dxdi-text-input-container.shape-text,.dxdi-text-input-container.connector-text{display:inherit;position:absolute;overflow:hidden;background-color:transparent;transform-origin:0 0}.dxdi-text-input-container.shape-text .dxdi-text-input{display:table-cell;overflow:hidden;padding:1px 0 0;outline:none;background-color:transparent;font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000;line-height:1.1em;text-align:center;vertical-align:middle}.dxdi-text-input-container.connector-text{overflow:visible}.dxdi-text-input-container.connector-text .dxdi-text-input{padding:2px;outline:none;height:calc(1.1em + 6px);width:calc(8em + 6px);margin-top:calc(-0.55em - 3px);margin-left:calc(-4em - 3px);background-color:#fff;border:1px solid #1e90ff;font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000;line-height:1.1em;text-align:center;vertical-align:middle;overflow:hidden}.dxdi-page-shadow{fill:#808080}
@@ -1,9 +1,9 @@
1
1
  /*!
2
2
  * DevExpress Diagram (dx-diagram)
3
- * Version: 2.2.2
4
- * Build date: Wed Sep 13 2023
3
+ * Version: 2.2.4
4
+ * Build date: Thu Jan 18 2024
5
5
  *
6
- * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
6
+ * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -6319,7 +6319,7 @@ var point_1 = __webpack_require__(8900);
6319
6319
  var ModelUtils_1 = __webpack_require__(4867);
6320
6320
  var unit_converter_1 = __webpack_require__(9291);
6321
6321
  var SimpleCommandBase_1 = __webpack_require__(9741);
6322
- var __1 = __webpack_require__(3607);
6322
+ var DragHelper_1 = __webpack_require__(4742);
6323
6323
  var MoveCommand = (function (_super) {
6324
6324
  __extends(MoveCommand, _super);
6325
6325
  function MoveCommand() {
@@ -6332,34 +6332,11 @@ var MoveCommand = (function (_super) {
6332
6332
  var _this = this;
6333
6333
  this.control.history.beginTransaction();
6334
6334
  var selection = this.control.selection;
6335
- var selectedShapes = selection.getSelectedShapes();
6336
- var selectedShapesWithoutDuplicates = selectedShapes.filter(function (shape) {
6337
- while (shape.container) {
6338
- if (selectedShapes.indexOf(shape.container) !== -1)
6339
- return false;
6340
- shape = shape.container;
6341
- }
6342
- return true;
6343
- });
6344
- selectedShapesWithoutDuplicates.forEach(function (shape) {
6345
- _this.permissionsProvider.addInteractingItem(shape, __1.DiagramModelOperation.MoveShape);
6346
- var pos = _this.getPosition(shape.position);
6347
- ModelUtils_1.ModelUtils.setShapePosition(_this.control.history, _this.control.model, shape, pos);
6348
- ModelUtils_1.ModelUtils.updateShapeAttachedConnectors(_this.control.history, _this.control.model, shape);
6349
- _this.permissionsProvider.clearInteractingItems();
6350
- });
6351
- var selectedItems = ModelUtils_1.ModelUtils.createSelectedItems(selection);
6352
- selection.getSelectedConnectors().forEach(function (connector) {
6353
- if (ModelUtils_1.ModelUtils.canMoveConnector(selectedItems, connector)) {
6354
- var startPtIndex = connector.beginItem ? 1 : 0;
6355
- var endPtIndex = connector.endItem ? (connector.points.length - 2) : (connector.points.length - 1);
6356
- for (var i = startPtIndex; i <= endPtIndex; i++) {
6357
- var pos = _this.getPosition(connector.points[i]);
6358
- ModelUtils_1.ModelUtils.moveConnectorPoint(_this.control.history, connector, i, pos);
6359
- }
6360
- }
6361
- });
6362
- ModelUtils_1.ModelUtils.tryUpdateModelRectangle(this.control.history);
6335
+ var helper = new DragHelper_1.SelectionDragHelper(this.control.history, this.control.model, this.permissionsProvider, new point_1.Point(0, 0), selection.getSelectedItems(true));
6336
+ helper.initDraggingShapes(selection.getSelectedShapes(false, true), false);
6337
+ helper.initDraggingConnectors(selection.getSelectedConnectors(false, true), false);
6338
+ helper.move(false, function (p) { return _this.getPosition(p); }, function () { }, function () { });
6339
+ ModelUtils_1.ModelUtils.tryUpdateModelRectangle(this.control.history, function (offsetLeft, offsetTop) { return helper.onTryUpdateModelSize(offsetLeft, offsetTop); });
6363
6340
  this.control.history.endTransaction();
6364
6341
  return true;
6365
6342
  };
@@ -12876,14 +12853,11 @@ var __extends = (this && this.__extends) || (function () {
12876
12853
  })();
12877
12854
  Object.defineProperty(exports, "__esModule", ({ value: true }));
12878
12855
  exports.MouseHandlerDragDiagramItemStateBase = exports.DraggingConnector = void 0;
12879
- var vector_1 = __webpack_require__(9716);
12880
- var ChangeConnectorPointsHistoryItem_1 = __webpack_require__(58);
12881
- var ConnectorRenderPoint_1 = __webpack_require__(4717);
12882
- var ConnectorRenderPointsContext_1 = __webpack_require__(1510);
12883
12856
  var ModelUtils_1 = __webpack_require__(4867);
12884
12857
  var ModelOperationSettings_1 = __webpack_require__(6879);
12885
12858
  var Event_1 = __webpack_require__(6031);
12886
12859
  var MouseHandlerDraggingState_1 = __webpack_require__(8816);
12860
+ var DragHelper_1 = __webpack_require__(4742);
12887
12861
  var DraggingConnector = (function () {
12888
12862
  function DraggingConnector(connector) {
12889
12863
  this.connector = connector;
@@ -12893,13 +12867,6 @@ var DraggingConnector = (function () {
12893
12867
  return DraggingConnector;
12894
12868
  }());
12895
12869
  exports.DraggingConnector = DraggingConnector;
12896
- var DraggingShape = (function () {
12897
- function DraggingShape(shape) {
12898
- this.shape = shape;
12899
- this.startPosition = shape.position.clone();
12900
- }
12901
- return DraggingShape;
12902
- }());
12903
12870
  var MouseHandlerDragDiagramItemStateBase = (function (_super) {
12904
12871
  __extends(MouseHandlerDragDiagramItemStateBase, _super);
12905
12872
  function MouseHandlerDragDiagramItemStateBase(handler, history, model, selection, visualizerManager) {
@@ -12919,14 +12886,11 @@ var MouseHandlerDragDiagramItemStateBase = (function (_super) {
12919
12886
  _super.prototype.finish.call(this);
12920
12887
  };
12921
12888
  MouseHandlerDragDiagramItemStateBase.prototype.onMouseDown = function (evt) {
12922
- var _this = this;
12923
12889
  this.handler.addDiagramItemToSelection(evt);
12924
12890
  this.shouldClone = this.handler.canCopySelectedItems(evt);
12925
12891
  this.startPoint = evt.modelPoint;
12926
12892
  this.initDrag();
12927
12893
  this.lockInitDrag = false;
12928
- if (!this.shouldClone)
12929
- this.draggingShapes.forEach(function (draggingShape) { return _this.handler.addInteractingItem(draggingShape.shape, ModelOperationSettings_1.DiagramModelOperation.MoveShape); });
12930
12894
  _super.prototype.onMouseDown.call(this, evt);
12931
12895
  };
12932
12896
  MouseHandlerDragDiagramItemStateBase.prototype.onMouseMove = function (evt) {
@@ -12966,48 +12930,28 @@ var MouseHandlerDragDiagramItemStateBase = (function (_super) {
12966
12930
  MouseHandlerDragDiagramItemStateBase.prototype.onApplyChanges = function (evt) {
12967
12931
  var _this = this;
12968
12932
  this.calculateFixedPosition(evt);
12969
- if (this.draggingShapes.length) {
12970
- var selectedShapes_1 = this.draggingShapes.map(function (ds) { return ds.shape; });
12971
- this.draggingShapes.forEach(function (ds) {
12972
- var shape = ds.shape;
12973
- while (shape.container) {
12974
- if (selectedShapes_1.indexOf(shape.container) !== -1)
12975
- return false;
12976
- shape = shape.container;
12977
- }
12978
- _this.moveShape(ds, evt);
12979
- });
12980
- var firstDraggingShape = this.draggingShapes[0];
12981
- var offset_1 = vector_1.Vector.fromPoints(firstDraggingShape.startPosition.clone(), firstDraggingShape.shape.position.clone());
12982
- if (offset_1.x || offset_1.y)
12983
- this.draggingConnectors.forEach(function (dc) { return _this.moveConnectorCore(dc.connector, dc.startPoints, dc.startRenderContext, offset_1); });
12984
- }
12985
- else
12986
- this.draggingConnectors.forEach(function (x) { return _this.moveConnector(x, evt); });
12933
+ this.dragHelper.move(this.shouldClone, function (pt) { return _this.getSnappedPoint(evt, pt); }, function () {
12934
+ _this.visualizerManager.resetConnectionTarget();
12935
+ _this.visualizerManager.resetConnectionPoints();
12936
+ }, function (shape, connectionPointIndex) {
12937
+ _this.visualizerManager.setConnectionTarget(shape, Event_1.MouseEventElementType.Shape);
12938
+ _this.visualizerManager.setConnectionPoints(shape, Event_1.MouseEventElementType.Shape, connectionPointIndex, true);
12939
+ });
12987
12940
  var container = ModelUtils_1.ModelUtils.findContainerByEventKey(this.model, this.selection, evt.source.key);
12988
12941
  if (container && this.allowInsertToContainer(evt, container))
12989
12942
  ModelUtils_1.ModelUtils.insertSelectionToContainer(this.history, this.model, this.selection, container);
12990
12943
  else
12991
12944
  ModelUtils_1.ModelUtils.removeSelectionFromContainer(this.history, this.model, this.selection);
12992
- this.handler.tryUpdateModelSize(function (offsetLeft, offsetTop) {
12993
- _this.modelConnectorsWithoutBeginItemInfo.forEach(function (pi) {
12994
- pi.point.x += offsetLeft;
12995
- pi.point.y += offsetTop;
12996
- });
12997
- _this.modelConnectorsWithoutEndItemInfo.forEach(function (pi) {
12998
- pi.point.x += offsetLeft;
12999
- pi.point.y += offsetTop;
13000
- });
13001
- });
12945
+ this.handler.tryUpdateModelSize(function (offsetLeft, offsetTop) { return _this.dragHelper.onTryUpdateModelSize(offsetLeft, offsetTop); });
13002
12946
  };
13003
12947
  MouseHandlerDragDiagramItemStateBase.prototype.getDraggingElementKeys = function () {
13004
- return this.draggingShapes.map(function (x) { return x.shape.key; }).concat(this.draggingConnectors.map(function (x) { return x.connector.key; }));
12948
+ return this.dragHelper.draggingShapes.map(function (x) { return x.shape.key; }).concat(this.dragHelper.draggingConnectors.map(function (x) { return x.connector.key; }));
13005
12949
  };
13006
12950
  MouseHandlerDragDiagramItemStateBase.prototype.getSnappedPoint = function (evt, point) {
13007
12951
  return this.handler.getSnappedPointOnDragDiagramItem(evt, point, this.fixedX, this.fixedY, this.startPoint);
13008
12952
  };
13009
12953
  MouseHandlerDragDiagramItemStateBase.prototype.initDrag = function () {
13010
- this.selectedItems = ModelUtils_1.ModelUtils.createSelectedItems(this.selection);
12954
+ this.dragHelper = new DragHelper_1.SelectionDragHelper(this.history, this.model, this.handler.permissionsProvider, this.startPoint, this.selection.getSelectedItems(true));
13011
12955
  this.initDraggingShapes();
13012
12956
  if (!this.areValidDraggingShapes) {
13013
12957
  this.handler.switchToDefaultState();
@@ -13018,27 +12962,12 @@ var MouseHandlerDragDiagramItemStateBase = (function (_super) {
13018
12962
  this.handler.switchToDefaultState();
13019
12963
  return;
13020
12964
  }
13021
- this.modelConnectorsWithoutBeginItemInfo = this.createModelConnectorsWithoutBeginItemInfo();
13022
- this.modelConnectorsWithoutEndItemInfo = this.createModelConnectorsWithoutEndItemInfo();
13023
12965
  };
13024
12966
  MouseHandlerDragDiagramItemStateBase.prototype.initDraggingShapes = function () {
13025
- this.draggingShapes = this.selection.getSelectedShapes(false, true).map(function (s) { return new DraggingShape(s); });
12967
+ this.dragHelper.initDraggingShapes(this.selection.getSelectedShapes(false, true), this.shouldClone);
13026
12968
  };
13027
12969
  MouseHandlerDragDiagramItemStateBase.prototype.initDraggingConnectors = function () {
13028
- var _this = this;
13029
- this.draggingConnectors = [];
13030
- this.draggingConnectorsIndexByKey = {};
13031
- this.selection.getSelectedConnectors(false, true).forEach(function (c) { return _this.registerConnector(c); });
13032
- if (this.shouldClone)
13033
- return;
13034
- this.draggingShapes.forEach(function (x) {
13035
- var attachedConnectors = x.shape.attachedConnectors;
13036
- if (attachedConnectors)
13037
- attachedConnectors.forEach(function (c) {
13038
- if (!_this.containsDraggingConnectorByKey(c.key))
13039
- _this.registerConnector(c);
13040
- });
13041
- });
12970
+ this.dragHelper.initDraggingConnectors(this.selection.getSelectedConnectors(false, true), this.shouldClone);
13042
12971
  };
13043
12972
  MouseHandlerDragDiagramItemStateBase.prototype.copySelection = function () {
13044
12973
  var _this = this;
@@ -13060,87 +12989,11 @@ var MouseHandlerDragDiagramItemStateBase = (function (_super) {
13060
12989
  this.fixedY = true;
13061
12990
  }
13062
12991
  };
13063
- MouseHandlerDragDiagramItemStateBase.prototype.containsDraggingConnectorByKey = function (key) {
13064
- return this.draggingConnectorsIndexByKey[key] !== undefined;
13065
- };
13066
12992
  MouseHandlerDragDiagramItemStateBase.prototype.allowInsertToContainer = function (evt, container) {
13067
12993
  if (this.handler.canMultipleSelection(evt))
13068
12994
  return false;
13069
12995
  return container && container.expanded && ModelUtils_1.ModelUtils.canInsertSelectionToContainer(this.model, this.selection, container);
13070
12996
  };
13071
- MouseHandlerDragDiagramItemStateBase.prototype.registerConnector = function (connector) {
13072
- this.draggingConnectorsIndexByKey[connector.key] = this.draggingConnectors.push(new DraggingConnector(connector)) - 1;
13073
- };
13074
- MouseHandlerDragDiagramItemStateBase.prototype.createModelConnectorsWithoutBeginItemInfo = function () {
13075
- var _this = this;
13076
- var connectors = this.model.findConnectorsCore(function (c) { return !c.beginItem && !_this.containsDraggingConnectorByKey(c.key); });
13077
- return connectors.map(function (c) {
13078
- return {
13079
- connector: c,
13080
- point: c.points[0].clone()
13081
- };
13082
- });
13083
- };
13084
- MouseHandlerDragDiagramItemStateBase.prototype.createModelConnectorsWithoutEndItemInfo = function () {
13085
- var _this = this;
13086
- var connectors = this.model.findConnectorsCore(function (c) { return !c.endItem && !_this.containsDraggingConnectorByKey(c.key); });
13087
- return connectors.map(function (c) {
13088
- return {
13089
- connector: c,
13090
- point: c.points[c.points.length - 1].clone()
13091
- };
13092
- });
13093
- };
13094
- MouseHandlerDragDiagramItemStateBase.prototype.moveConnector = function (dc, evt) {
13095
- var startPoints = dc.startPoints;
13096
- var offset = vector_1.Vector.fromPoints(startPoints[0].clone(), this.getSnappedPoint(evt, startPoints[0]).clone());
13097
- if (offset.x || offset.y)
13098
- this.moveConnectorCore(dc.connector, startPoints, dc.startRenderContext, offset);
13099
- };
13100
- MouseHandlerDragDiagramItemStateBase.prototype.moveConnectorCore = function (connector, startPoints, startRenderContext, offset) {
13101
- if (this.shouldClone || ModelUtils_1.ModelUtils.canMoveConnector(this.selectedItems, connector))
13102
- this.offsetConnector(connector, startPoints, startRenderContext, offset);
13103
- else
13104
- this.changeConnector(connector);
13105
- };
13106
- MouseHandlerDragDiagramItemStateBase.prototype.moveShape = function (ds, evt) {
13107
- var _this = this;
13108
- var shape = ds.shape;
13109
- var position = this.getSnappedPoint(evt, ds.startPosition);
13110
- ModelUtils_1.ModelUtils.setShapePosition(this.history, this.model, shape, position);
13111
- ModelUtils_1.ModelUtils.updateMovingShapeConnections(this.history, shape, this.modelConnectorsWithoutBeginItemInfo, this.modelConnectorsWithoutEndItemInfo, function () {
13112
- _this.visualizerManager.resetConnectionTarget();
13113
- _this.visualizerManager.resetConnectionPoints();
13114
- }, function (shape, connectionPointIndex) {
13115
- _this.visualizerManager.setConnectionTarget(shape, Event_1.MouseEventElementType.Shape);
13116
- _this.visualizerManager.setConnectionPoints(shape, Event_1.MouseEventElementType.Shape, connectionPointIndex, true);
13117
- }, function (connector) { return _this.handler.addInteractingItem(connector); });
13118
- if (!this.draggingConnectors.filter(function (dc) { return !!_this.selectedItems[dc.connector.key]; }).length)
13119
- ModelUtils_1.ModelUtils.updateShapeAttachedConnectors(this.history, this.model, shape);
13120
- };
13121
- MouseHandlerDragDiagramItemStateBase.prototype.offsetConnector = function (connector, startPoints, startRenderContext, offset) {
13122
- var _this = this;
13123
- var newPoints = startPoints.map(function (p) { return _this.offsetPoint(p, offset); });
13124
- if (!newPoints[0].equals(connector.points[0]))
13125
- this.history.addAndRedo(new ChangeConnectorPointsHistoryItem_1.ChangeConnectorPointsHistoryItem(connector.key, newPoints, this.offsetRenderContext(startRenderContext, offset)));
13126
- };
13127
- MouseHandlerDragDiagramItemStateBase.prototype.offsetRenderContext = function (context, offset) {
13128
- var _this = this;
13129
- if (context === undefined)
13130
- return undefined;
13131
- return new ConnectorRenderPointsContext_1.ConnectorRenderPointsContext(context.renderPoints.map(function (p) {
13132
- var newPoint = _this.offsetPoint(p, offset);
13133
- return new ConnectorRenderPoint_1.ConnectorRenderPoint(newPoint.x, newPoint.y, p.pointIndex, p.skipped);
13134
- }), true, context.actualRoutingMode);
13135
- };
13136
- MouseHandlerDragDiagramItemStateBase.prototype.offsetPoint = function (point, offset) {
13137
- var pointOffset = vector_1.Vector.fromPoints(point, this.startPoint);
13138
- return this.startPoint.clone().offset(offset.x - pointOffset.x, offset.y - pointOffset.y);
13139
- };
13140
- MouseHandlerDragDiagramItemStateBase.prototype.changeConnector = function (connector) {
13141
- ModelUtils_1.ModelUtils.tryRemoveConnectorIntermediatePoints(this.history, connector);
13142
- ModelUtils_1.ModelUtils.updateConnectorAttachedPoints(this.history, this.model, connector);
13143
- };
13144
12997
  return MouseHandlerDragDiagramItemStateBase;
13145
12998
  }(MouseHandlerDraggingState_1.MouseHandlerDraggingState));
13146
12999
  exports.MouseHandlerDragDiagramItemStateBase = MouseHandlerDragDiagramItemStateBase;
@@ -13802,12 +13655,12 @@ var MouseHandlerMoveConnectorState = (function (_super) {
13802
13655
  get: function () {
13803
13656
  var _this = this;
13804
13657
  if (this.shouldClone)
13805
- return this.draggingShapes.length > 0 || this.draggingConnectors.length > 0;
13806
- if (!this.draggingConnectors.length)
13658
+ return this.dragHelper.draggingShapes.length > 0 || this.dragHelper.draggingConnectors.length > 0;
13659
+ if (!this.dragHelper.draggingConnectors.length)
13807
13660
  return false;
13808
- if (!this.draggingShapes.length)
13809
- return !this.draggingConnectors.some(function (x) { return !ModelUtils_1.ModelUtils.canMoveConnector(_this.selectedItems, x.connector); });
13810
- return ModelUtils_1.ModelUtils.canMoveConnector(this.selectedItems, this.draggingConnectors[this.draggingConnectorsIndexByKey[this.handler.mouseDownEvent.source.key]].connector);
13661
+ if (!this.dragHelper.draggingShapes.length)
13662
+ return !this.dragHelper.draggingConnectors.some(function (x) { return !ModelUtils_1.ModelUtils.canMoveConnector(_this.dragHelper.selectedItems, x.connector); });
13663
+ return ModelUtils_1.ModelUtils.canMoveConnector(this.dragHelper.selectedItems, this.dragHelper.draggingConnectors[this.dragHelper.draggingConnectorsIndexByKey[this.handler.mouseDownEvent.source.key]].connector);
13811
13664
  },
13812
13665
  enumerable: false,
13813
13666
  configurable: true
@@ -13912,7 +13765,7 @@ var MouseHandlerMoveShapeState = (function (_super) {
13912
13765
  }
13913
13766
  Object.defineProperty(MouseHandlerMoveShapeState.prototype, "areValidDraggingShapes", {
13914
13767
  get: function () {
13915
- return this.shouldClone || this.draggingShapes.length > 0;
13768
+ return this.shouldClone || this.dragHelper.draggingShapes.length > 0;
13916
13769
  },
13917
13770
  enumerable: false,
13918
13771
  configurable: true
@@ -22768,6 +22621,9 @@ var ConnectorRenderPoint = (function (_super) {
22768
22621
  return this;
22769
22622
  };
22770
22623
  ConnectorRenderPoint.prototype.clone = function () { return new ConnectorRenderPoint(this.x, this.y, this.pointIndex, this.skipped); };
22624
+ ConnectorRenderPoint.equal = function (p1, p2) {
22625
+ return p1.equals(p2) && p1.pointIndex === p2.pointIndex && p1.skipped === p2.skipped;
22626
+ };
22771
22627
  return ConnectorRenderPoint;
22772
22628
  }(point_1.Point));
22773
22629
  exports.ConnectorRenderPoint = ConnectorRenderPoint;
@@ -24443,6 +24299,178 @@ var DiagramItem = (function () {
24443
24299
  exports.DiagramItem = DiagramItem;
24444
24300
 
24445
24301
 
24302
+ /***/ }),
24303
+
24304
+ /***/ 4742:
24305
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
24306
+
24307
+
24308
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
24309
+ exports.DraggingConnector = exports.SelectionDragHelper = void 0;
24310
+ var vector_1 = __webpack_require__(9716);
24311
+ var ChangeConnectorPointsHistoryItem_1 = __webpack_require__(58);
24312
+ var ConnectorRenderPointsContext_1 = __webpack_require__(1510);
24313
+ var ModelUtils_1 = __webpack_require__(4867);
24314
+ var ConnectorRenderPoint_1 = __webpack_require__(4717);
24315
+ var ModelOperationSettings_1 = __webpack_require__(6879);
24316
+ var SelectionDragHelper = (function () {
24317
+ function SelectionDragHelper(history, model, permissionsProvider, startPoint, selectedItems) {
24318
+ var _this = this;
24319
+ this.history = history;
24320
+ this.model = model;
24321
+ this.permissionsProvider = permissionsProvider;
24322
+ this.startPoint = startPoint;
24323
+ this.draggingShapes = [];
24324
+ this.draggingConnectors = [];
24325
+ this.selectedItems = {};
24326
+ this.draggingConnectorsIndexByKey = {};
24327
+ selectedItems.forEach(function (i) { return _this.selectedItems[i.key] = i; });
24328
+ }
24329
+ SelectionDragHelper.prototype.initDraggingShapes = function (shapes, shouldClone) {
24330
+ var _this = this;
24331
+ this.draggingShapes = shapes.map(function (s) { return new DraggingShape(s); });
24332
+ if (!shouldClone)
24333
+ this.draggingShapes.forEach(function (draggingShape) { return _this.permissionsProvider.addInteractingItem(draggingShape.shape, ModelOperationSettings_1.DiagramModelOperation.MoveShape); });
24334
+ };
24335
+ SelectionDragHelper.prototype.initDraggingConnectors = function (connectors, shouldClone) {
24336
+ var _this = this;
24337
+ this.draggingConnectors = [];
24338
+ this.draggingConnectorsIndexByKey = {};
24339
+ connectors.forEach(function (c) { return _this.registerConnector(c); });
24340
+ if (!shouldClone)
24341
+ this.draggingShapes.forEach(function (x) {
24342
+ var attachedConnectors = x.shape.attachedConnectors;
24343
+ if (attachedConnectors)
24344
+ attachedConnectors.forEach(function (c) {
24345
+ if (!_this.containsDraggingConnectorByKey(c.key))
24346
+ _this.registerConnector(c);
24347
+ });
24348
+ });
24349
+ this.modelConnectorsWithoutBeginItemInfo = this.createModelConnectorsWithoutBeginItemInfo();
24350
+ this.modelConnectorsWithoutEndItemInfo = this.createModelConnectorsWithoutEndItemInfo();
24351
+ };
24352
+ SelectionDragHelper.prototype.move = function (shouldClone, getMovePoint, resetTargetCallback, updateTargetCallback) {
24353
+ var _this = this;
24354
+ if (this.draggingShapes.length) {
24355
+ var selectedShapes_1 = this.draggingShapes.map(function (ds) { return ds.shape; });
24356
+ this.draggingShapes.forEach(function (ds) {
24357
+ var shape = ds.shape;
24358
+ while (shape.container) {
24359
+ if (selectedShapes_1.indexOf(shape.container) !== -1)
24360
+ return false;
24361
+ shape = shape.container;
24362
+ }
24363
+ _this.moveShape(ds, getMovePoint, resetTargetCallback, updateTargetCallback);
24364
+ });
24365
+ var firstDraggingShape = this.draggingShapes[0];
24366
+ var offset_1 = vector_1.Vector.fromPoints(firstDraggingShape.startPosition.clone(), firstDraggingShape.shape.position.clone());
24367
+ if (offset_1.x || offset_1.y)
24368
+ this.draggingConnectors.forEach(function (dc) { return _this.moveConnectorCore(dc.connector, dc.startPoints, dc.startRenderContext, offset_1, shouldClone); });
24369
+ }
24370
+ else
24371
+ this.draggingConnectors.forEach(function (x) { return _this.moveConnector(x, shouldClone, getMovePoint); });
24372
+ };
24373
+ SelectionDragHelper.prototype.containsDraggingConnectorByKey = function (key) {
24374
+ return this.draggingConnectorsIndexByKey[key] !== undefined;
24375
+ };
24376
+ SelectionDragHelper.prototype.onTryUpdateModelSize = function (offsetLeft, offsetTop) {
24377
+ this.modelConnectorsWithoutBeginItemInfo.forEach(function (pi) {
24378
+ pi.point.x += offsetLeft;
24379
+ pi.point.y += offsetTop;
24380
+ });
24381
+ this.modelConnectorsWithoutEndItemInfo.forEach(function (pi) {
24382
+ pi.point.x += offsetLeft;
24383
+ pi.point.y += offsetTop;
24384
+ });
24385
+ };
24386
+ SelectionDragHelper.prototype.moveConnector = function (dc, shouldClone, getMovePoint) {
24387
+ var startPoints = dc.startPoints;
24388
+ var offset = vector_1.Vector.fromPoints(startPoints[0].clone(), getMovePoint(startPoints[0]).clone());
24389
+ if (offset.x || offset.y)
24390
+ this.moveConnectorCore(dc.connector, startPoints, dc.startRenderContext, offset, shouldClone);
24391
+ };
24392
+ SelectionDragHelper.prototype.moveConnectorCore = function (connector, startPoints, startRenderContext, offset, shouldClone) {
24393
+ if (shouldClone || ModelUtils_1.ModelUtils.canMoveConnector(this.selectedItems, connector))
24394
+ this.offsetConnector(connector, startPoints, startRenderContext, offset);
24395
+ else
24396
+ this.changeConnector(connector);
24397
+ };
24398
+ SelectionDragHelper.prototype.moveShape = function (ds, getMovePoint, resetTargetCallback, updateTargetCallback) {
24399
+ var _this = this;
24400
+ var shape = ds.shape;
24401
+ var position = getMovePoint(ds.startPosition);
24402
+ ModelUtils_1.ModelUtils.setShapePosition(this.history, this.model, shape, position);
24403
+ ModelUtils_1.ModelUtils.updateMovingShapeConnections(this.history, shape, this.modelConnectorsWithoutBeginItemInfo, this.modelConnectorsWithoutEndItemInfo, resetTargetCallback, updateTargetCallback, function (connector) { return _this.permissionsProvider.addInteractingItem(connector); });
24404
+ if (!this.draggingConnectors.filter(function (dc) { return !!_this.selectedItems[dc.connector.key]; }).length)
24405
+ ModelUtils_1.ModelUtils.updateShapeAttachedConnectors(this.history, this.model, shape);
24406
+ };
24407
+ SelectionDragHelper.prototype.offsetConnector = function (connector, startPoints, startRenderContext, offset) {
24408
+ var _this = this;
24409
+ var newPoints = startPoints.map(function (p) { return _this.offsetPoint(p, offset); });
24410
+ if (!newPoints[0].equals(connector.points[0]))
24411
+ this.history.addAndRedo(new ChangeConnectorPointsHistoryItem_1.ChangeConnectorPointsHistoryItem(connector.key, newPoints, this.offsetRenderContext(startRenderContext, offset)));
24412
+ };
24413
+ SelectionDragHelper.prototype.offsetRenderContext = function (context, offset) {
24414
+ var _this = this;
24415
+ if (context === undefined)
24416
+ return undefined;
24417
+ return new ConnectorRenderPointsContext_1.ConnectorRenderPointsContext(context.renderPoints.map(function (p) {
24418
+ var newPoint = _this.offsetPoint(p, offset);
24419
+ return new ConnectorRenderPoint_1.ConnectorRenderPoint(newPoint.x, newPoint.y, p.pointIndex, p.skipped);
24420
+ }), true, context.actualRoutingMode);
24421
+ };
24422
+ SelectionDragHelper.prototype.offsetPoint = function (point, offset) {
24423
+ var pointOffset = vector_1.Vector.fromPoints(point, this.startPoint);
24424
+ return this.startPoint.clone().offset(offset.x - pointOffset.x, offset.y - pointOffset.y);
24425
+ };
24426
+ SelectionDragHelper.prototype.changeConnector = function (connector) {
24427
+ ModelUtils_1.ModelUtils.tryRemoveConnectorIntermediatePoints(this.history, connector);
24428
+ ModelUtils_1.ModelUtils.updateConnectorAttachedPoints(this.history, this.model, connector);
24429
+ };
24430
+ SelectionDragHelper.prototype.registerConnector = function (connector) {
24431
+ this.draggingConnectorsIndexByKey[connector.key] = this.draggingConnectors.push(new DraggingConnector(connector)) - 1;
24432
+ };
24433
+ SelectionDragHelper.prototype.createModelConnectorsWithoutBeginItemInfo = function () {
24434
+ var _this = this;
24435
+ var connectors = this.model.findConnectorsCore(function (c) { return !c.beginItem && !_this.containsDraggingConnectorByKey(c.key); });
24436
+ return connectors.map(function (c) {
24437
+ return {
24438
+ connector: c,
24439
+ point: c.points[0].clone()
24440
+ };
24441
+ });
24442
+ };
24443
+ SelectionDragHelper.prototype.createModelConnectorsWithoutEndItemInfo = function () {
24444
+ var _this = this;
24445
+ var connectors = this.model.findConnectorsCore(function (c) { return !c.endItem && !_this.containsDraggingConnectorByKey(c.key); });
24446
+ return connectors.map(function (c) {
24447
+ return {
24448
+ connector: c,
24449
+ point: c.points[c.points.length - 1].clone()
24450
+ };
24451
+ });
24452
+ };
24453
+ return SelectionDragHelper;
24454
+ }());
24455
+ exports.SelectionDragHelper = SelectionDragHelper;
24456
+ var DraggingConnector = (function () {
24457
+ function DraggingConnector(connector) {
24458
+ this.connector = connector;
24459
+ this.startPoints = connector.points.map(function (x) { return x.clone(); });
24460
+ this.startRenderContext = connector.tryCreateRenderPointsContext();
24461
+ }
24462
+ return DraggingConnector;
24463
+ }());
24464
+ exports.DraggingConnector = DraggingConnector;
24465
+ var DraggingShape = (function () {
24466
+ function DraggingShape(shape) {
24467
+ this.shape = shape;
24468
+ this.startPosition = shape.position.clone();
24469
+ }
24470
+ return DraggingShape;
24471
+ }());
24472
+
24473
+
24446
24474
  /***/ }),
24447
24475
 
24448
24476
  /***/ 6613:
@@ -25287,14 +25315,14 @@ var ModelUtils = (function () {
25287
25315
  ModelUtils.deleteConnectorUnnecessaryPoints = function (history, connector) {
25288
25316
  var oldRenderPoints = connector.getRenderPoints(true).map(function (p) { return p.clone(); });
25289
25317
  if (connector.properties.lineOption === ConnectorProperties_1.ConnectorLineOption.Straight) {
25290
- var unnecessaryPoints = ModelUtils.createUnnecessaryRenderPoints(oldRenderPoints.filter(function (p) { return !p.skipped; }).map(function (p) { return p.clone(); }), connector.skippedRenderPoints, function (removedPoint) { return ModelUtils.findFirstPointIndex(oldRenderPoints, function (p) { return p.equals(removedPoint); }); });
25318
+ var unnecessaryPoints = ModelUtils.createUnnecessaryRenderPoints(oldRenderPoints.filter(function (p) { return !p.skipped; }).map(function (p) { return p.clone(); }), connector.skippedRenderPoints, function (removedPoint) { return ModelUtils.findFirstPointIndex(oldRenderPoints, function (p) { return ConnectorRenderPoint_1.ConnectorRenderPoint.equal(p, removedPoint); }); });
25291
25319
  if (Object.keys(unnecessaryPoints).length)
25292
25320
  history.addAndRedo(new ChangeConnectorPointsHistoryItem_1.ReplaceConnectorPointsHistoryItem(connector.key, ModelUtils.createNecessaryPoints(connector.points.map(function (p) { return p.clone(); }), unnecessaryPoints)));
25293
25321
  }
25294
25322
  else {
25295
25323
  var oldContext = connector.tryCreateRenderPointsContext(true);
25296
25324
  var newRenderPoints = oldRenderPoints.filter(function (p) { return !p.skipped; }).map(function (p) { return p.clone(); });
25297
- var unnecessaryPoints = ModelUtils.createUnnecessaryRightAngleRenderPoints(newRenderPoints, connector.skippedRenderPoints, function (removedPoint) { return ModelUtils.findFirstPointIndex(oldRenderPoints, function (p) { return p.equals(removedPoint); }); });
25325
+ var unnecessaryPoints = ModelUtils.createUnnecessaryRightAngleRenderPoints(newRenderPoints, connector.skippedRenderPoints, function (removedPoint) { return ModelUtils.findFirstPointIndex(oldRenderPoints, function (p) { return ConnectorRenderPoint_1.ConnectorRenderPoint.equal(p, removedPoint); }); });
25298
25326
  if (Object.keys(unnecessaryPoints).length) {
25299
25327
  var newPoints = ModelUtils.createNecessaryPoints(connector.points.map(function (p) { return p.clone(); }), unnecessaryPoints);
25300
25328
  var newRenderContext = new ConnectorRenderPointsContext_1.ConnectorRenderPointsContext(ModelUtils.validateRenderPointIndexes(newPoints, newRenderPoints, 0), oldContext.lockCreateRenderPoints, oldContext.actualRoutingMode);
@@ -25368,15 +25396,16 @@ var ModelUtils = (function () {
25368
25396
  };
25369
25397
  ModelUtils.collectNotSkippedRenderPoints = function (targetRenderPoints, sourceRenderPoints, removedPoint, removedIndex, getPosition, predicate) {
25370
25398
  if (predicate === void 0) { predicate = function (_) { return true; }; }
25371
- if (!predicate(removedPoint))
25372
- return false;
25373
- var positionIndex = getPosition(removedPoint);
25374
- if (targetRenderPoints[positionIndex] === undefined) {
25375
- targetRenderPoints[positionIndex] = removedPoint;
25376
- removedPoint.skipped = true;
25377
- sourceRenderPoints.splice(removedIndex, 1);
25399
+ if (predicate(removedPoint)) {
25400
+ var positionIndex = getPosition(removedPoint);
25401
+ if (targetRenderPoints[positionIndex] === undefined) {
25402
+ targetRenderPoints[positionIndex] = removedPoint;
25403
+ removedPoint.skipped = true;
25404
+ sourceRenderPoints.splice(removedIndex, 1);
25405
+ return true;
25406
+ }
25378
25407
  }
25379
- return true;
25408
+ return false;
25380
25409
  };
25381
25410
  ModelUtils.removeUnnecessaryPoint = function (points, point, removedIndex, removeExcessPoints) {
25382
25411
  if (removeExcessPoints && point.pointIndex === -1) {
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * DevExpress Diagram (dx-diagram.min)
3
- * Version: 2.2.2
4
- * Build date: Wed Sep 13 2023
3
+ * Version: 2.2.4
4
+ * Build date: Thu Jan 18 2024
5
5
  *
6
- * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
6
+ * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
8
8
  */.dxdi-control{box-sizing:border-box;overflow:visible;position:relative}.dxdi-control.dxdi-read-only .dxdi-canvas.dxdi-drag-scroll{cursor:grab!important}.dxdi-control.dxdi-read-only .dxdi-canvas.dxdi-drag-scroll .shape,.dxdi-control.dxdi-read-only .dxdi-canvas.dxdi-drag-scroll .shape-expand-btn,.dxdi-control.dxdi-read-only .dxdi-canvas.dxdi-drag-scroll text{cursor:grab}.dxdi-control.dxdi-read-only .dxdi-canvas .shape,.dxdi-control.dxdi-read-only .dxdi-canvas .shape-expand-btn,.dxdi-control.dxdi-read-only .dxdi-canvas text{cursor:default}.dxdi-control .dxdi-canvas{background-color:#d9d9d9;display:block;overflow:hidden;transform-origin:0 0}.dxdi-canvas.dxdi-drag-scroll{cursor:grab!important}.dxdi-canvas.dxdi-drag-scroll .connection-point,.dxdi-canvas.dxdi-drag-scroll .connector,.dxdi-canvas.dxdi-drag-scroll .connector text,.dxdi-canvas.dxdi-drag-scroll .connector-side-mark.horizontal,.dxdi-canvas.dxdi-drag-scroll .connector-side-mark.vertical,.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="4"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="5"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="1"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="2"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="3"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="4"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="5"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="6"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="7"],.dxdi-canvas.dxdi-drag-scroll .selection-mark[data-type="9"][data-value="8"],.dxdi-canvas.dxdi-drag-scroll .shape,.dxdi-canvas.dxdi-drag-scroll .shape .shape-expand-btn{cursor:grab}.dxdi-canvas *{user-select:none}.dxdi-canvas text{font-family:arial,helvetica,sans-serif;font-size:10pt}.dxdi-canvas .page{fill:#fff}.dxdi-canvas .pages-grid-line{fill:none;stroke:rgba(0,0,0,.15);stroke-dasharray:8;stroke-width:2}.dxdi-canvas .grid-inner-line,.dxdi-canvas .grid-outer-line{fill:none}.dxdi-canvas .grid-outer-line{stroke:rgba(0,0,0,.1)}.dxdi-canvas .grid-inner-line{stroke:rgba(0,0,0,.05)}.dxdi-canvas .shape,.dxdi-canvas .toolbox-item{pointer-events:bounding-box}.dxdi-canvas .shape ellipse,.dxdi-canvas .shape line,.dxdi-canvas .shape path,.dxdi-canvas .shape rect,.dxdi-canvas .toolbox-item ellipse,.dxdi-canvas .toolbox-item line,.dxdi-canvas .toolbox-item path,.dxdi-canvas .toolbox-item rect{fill:#fff;stroke-width:2;stroke:#000}.dxdi-canvas .shape text,.dxdi-canvas .toolbox-item text{fill:#000;text-anchor:middle}.dxdi-canvas .shape rect.selector,.dxdi-canvas .toolbox-item rect.selector{stroke-width:48;stroke:transparent;fill:transparent;pointer-events:auto}.dxdi-canvas .shape.not-valid ellipse,.dxdi-canvas .shape.not-valid line,.dxdi-canvas .shape.not-valid path,.dxdi-canvas .shape.not-valid rect{stroke:red!important}.dxdi-canvas .shape{cursor:move}.dxdi-canvas .shape.text-input>text{display:none}.dxdi-canvas .shape.container>rect:first-child{fill:transparent}.dxdi-canvas .shape .shape-expand-btn{cursor:pointer}.dxdi-canvas .shape .shape-expand-btn>path,.dxdi-canvas .shape .shape-expand-btn>rect{stroke-dasharray:initial!important}.dxdi-canvas .shape .shape-expand-btn>path{stroke-width:2!important}.dxdi-canvas .shape .dxdi-image .dxdi-spinner{animation:loading-spinner 1s linear infinite}.dxdi-canvas .shape .dxdi-image .dxdi-spinner ellipse{stroke:#000;stroke-opacity:.2}.dxdi-canvas .shape .dxdi-image .dxdi-spinner path{stroke:#fd7010;stroke-linecap:round}.dxdi-canvas .shape .dxdi-image .dxdi-spinner ellipse,.dxdi-canvas .shape .dxdi-image .dxdi-spinner path{fill:none;stroke-width:5}@keyframes loading-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.dxdi-canvas .shape .dxdi-image .dxdi-user .dxdi-background{fill:#000;stroke:none;opacity:.2}.dxdi-canvas .shape .dxdi-image .dxdi-user ellipse,.dxdi-canvas .shape .dxdi-image .dxdi-user path{fill:#fff;stroke:none}.dxdi-canvas .shape .dxdi-image .dxdi-warning ellipse{stroke:none;fill:#ee1616}.dxdi-canvas .shape .dxdi-image .dxdi-warning rect{stroke:none;fill:#fff}.dxdi-canvas .shape.locked,.dxdi-canvas .shape.locked .shape-expand-btn,.dxdi-canvas .shape.locked+.container-children .shape,.dxdi-canvas .shape.locked+.container-children .shape .shape-expand-btn{cursor:inherit!important}.dxdi-canvas .container-children .shape .selector{stroke-width:8}.dxdi-canvas .toolbox-item{cursor:pointer}.dxdi-canvas .toolbox-item .selector{stroke-width:0!important}.dxdi-canvas .connector line,.dxdi-canvas .connector path{stroke-width:2;stroke:#000;stroke-linejoin:round;pointer-events:stroke}.dxdi-canvas .connector path:not(.outlined-line-ending):not(.filled-line-ending){fill:none!important}.dxdi-canvas .connector path.outlined-line-ending{fill:#fff}.dxdi-canvas .connector path.filled-line-ending{fill:#000}.dxdi-canvas .connector line.selector,.dxdi-canvas .connector path.selector{stroke-width:16;stroke:transparent}.dxdi-canvas .connector text{fill:#000;text-anchor:middle;cursor:move}.dxdi-canvas .connector .text-filter-flood{flood-color:#fff}.dxdi-canvas .connector.not-valid line,.dxdi-canvas .connector.not-valid path{stroke:red!important}.dxdi-canvas .connector.can-move{cursor:move}.dxdi-canvas .connection-mark,.dxdi-canvas .connection-point,.dxdi-canvas .connector-point-mark,.dxdi-canvas .connector-side-mark,.dxdi-canvas .geometry-mark,.dxdi-canvas .selection-mark{fill:#fff;stroke-width:2}.dxdi-canvas .selection-mark{stroke:#1e90ff}.dxdi-canvas .selection-mark[data-type="9"][data-value="1"]{cursor:nw-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="2"]{cursor:ne-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="3"]{cursor:se-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="4"]{cursor:sw-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="5"]{cursor:n-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="6"]{cursor:e-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="7"]{cursor:s-resize}.dxdi-canvas .selection-mark[data-type="9"][data-value="8"]{cursor:w-resize}.dxdi-canvas .selection-mark[data-type="4"],.dxdi-canvas .selection-mark[data-type="5"]{cursor:move}.dxdi-canvas .locked-selection-mark{fill:#fff;stroke-width:1;stroke:#666}.dxdi-canvas .geometry-mark{stroke:#daa520;cursor:pointer}.dxdi-canvas .connection-target,.dxdi-canvas .container-target{fill:transparent;stroke:orchid;stroke-width:2;pointer-events:none}.dxdi-canvas .connection-point{stroke:orchid;cursor:crosshair}.dxdi-canvas .connection-point.not-valid{stroke:grey!important;display:none}.dxdi-canvas .connection-mark{stroke:orchid;cursor:crosshair}.dxdi-canvas .connection-mark.selector,.dxdi-canvas .connection-point.selector{stroke-width:10px;stroke:transparent;fill:transparent}.dxdi-canvas .connection-mark.active,.dxdi-canvas .connection-point.active{fill:orchid}.dxdi-canvas .connector-point-mark,.dxdi-canvas .connector-side-mark{stroke:#1e90ff;cursor:move}.dxdi-canvas .connector-point-mark.disabled{cursor:default;display:none}.dxdi-canvas .connector-side-mark{fill:#1e90ff}.dxdi-canvas .connector-side-mark.vertical{cursor:col-resize}.dxdi-canvas .connector-side-mark.horizontal{cursor:row-resize}.dxdi-canvas .item-selection-rect,.dxdi-canvas .items-selection-rect{fill:transparent;stroke-width:1;stroke:#1e90ff;stroke-dasharray:2px;pointer-events:none}.dxdi-canvas .items-selection-rect{fill:rgba(30,144,255,.02)}.dxdi-canvas .item-multi-selection-rect{fill:rgba(30,144,255,.02);stroke-width:1;stroke:#1e90ff;pointer-events:none}.dxdi-canvas .selection-rect{fill:rgba(30,144,255,.2);stroke-width:1;stroke:#1e90ff;pointer-events:none}.dxdi-canvas .connector-multi-selection,.dxdi-canvas .connector-selection{fill:transparent;stroke-width:1;stroke:#1e90ff;pointer-events:none}.dxdi-canvas .connector-multi-selection.text,.dxdi-canvas .connector-selection.text{fill:transparent;stroke-width:1}.dxdi-canvas .connector-selection{stroke-dasharray:2px}.dxdi-canvas .connector-selection-mask rect{fill:#000}.dxdi-canvas .connector-selection-mask rect.background{fill:#fff}.dxdi-canvas .connector-selection-mask line,.dxdi-canvas .connector-selection-mask path{fill:#fff;stroke:#000;stroke-width:4}.dxdi-canvas .connector-selection-mask text{text-anchor:middle}.dxdi-canvas .extension-line path{stroke:#1e90ff;stroke-width:1}.dxdi-canvas .extension-line path.size-line{stroke-dasharray:4px}.dxdi-canvas .extension-line text{fill:#1e90ff;text-anchor:middle;font-size:.8em}.dxdi-canvas .extension-line.center>path.size-line,.dxdi-canvas .extension-line.page>path.size-line{stroke-dasharray:0}.dxdi-canvas .extension-line:not(.center)>path:not(:first-child){display:none}.dxdi-canvas .resize-info text{fill:rgba(0,0,0,.8);text-anchor:middle;font-size:.8em}.dxdi-canvas .resize-info rect{fill:#fff;stroke:rgba(0,0,0,.3);stroke-width:1}.dxdi-canvas .dxdi-active-selection .shape{cursor:default}.dxdi-control:not(.focused) .dxdi-canvas .geometry-mark,.dxdi-control:not(.focused) .dxdi-canvas .selection-mark{stroke:#666}.dxdi-control:not(.focused) .dxdi-canvas .item-selection-rect,.dxdi-control:not(.focused) .dxdi-canvas .items-selection-rect{fill:transparent;stroke:#666}.dxdi-control:not(.focused) .dxdi-canvas .items-selection-rect{fill:hsla(0,0%,56%,.02)}.dxdi-control:not(.focused) .dxdi-canvas .item-multi-selection-rect{fill:hsla(0,0%,56%,.02);stroke:#666}.dxdi-control:not(.focused) .dxdi-canvas .connection-mark,.dxdi-control:not(.focused) .dxdi-canvas .connection-mark.selector,.dxdi-control:not(.focused) .dxdi-canvas .connection-point,.dxdi-control:not(.focused) .dxdi-canvas .connection-point.selector{display:none}.dxdi-control:not(.focused) .dxdi-canvas .connector-multi-selection,.dxdi-control:not(.focused) .dxdi-canvas .connector-point-mark,.dxdi-control:not(.focused) .dxdi-canvas .connector-selection,.dxdi-control:not(.focused) .dxdi-canvas .connector-side-mark{stroke:#666}.dxdi-control:not(.focused) .dxdi-canvas .connector-side-mark{fill:#666}.dxdi-dragging,.dxdi-dragging *{user-select:none}.dxdi-canvas.export *{cursor:inherit!important;pointer-events:all!important}.dxdi-touch-action{touch-action:none}.dxdi-toolbox,.dxdi-toolbox svg{outline:none;user-select:none}.dxdi-toolbox,.dxdi-toolbox .dxdi-canvas,.dxdi-toolbox-drag-item .dxdi-canvas{height:100%;width:100%}.dxdi-toolbox .dxdi-canvas .toolbox-item ellipse,.dxdi-toolbox .dxdi-canvas .toolbox-item line,.dxdi-toolbox .dxdi-canvas .toolbox-item path,.dxdi-toolbox .dxdi-canvas .toolbox-item rect{fill:transparent;stroke:currentColor}.dxdi-toolbox .dxdi-canvas .toolbox-item .dxdi-image-placeholder{fill:currentColor;stroke:none;opacity:.75}.dxdi-toolbox .dxdi-canvas .toolbox-item .dxdi-shape-text{opacity:.25}.dxdi-toolbox .dxdi-canvas .toolbox-item text,.dxdi-toolbox-drag-item .dxdi-canvas text{fill:currentColor;font-family:Segoe UI,Helvetica Neue,Helvetica,arial,sans-serif;font-weight:700}.dxdi-toolbox-drag-item .dxdi-canvas .dxdi-image-placeholder{fill:currentColor;stroke:none;opacity:.75}.dxdi-toolbox-drag-item .dxdi-canvas .dxdi-shape-text{display:none}.dxdi-toolbox .toolbox-text-item{cursor:pointer;margin:0 0 .6em;user-select:none}.dxdi-toolbox-drag-item,.dxdi-toolbox-drag-text-item{color:#000;font-family:arial,helvetica,sans-serif;font-size:10pt;pointer-events:none!important;position:absolute;z-index:10000}.dxdi-toolbox-drag-item *,.dxdi-toolbox-drag-text-item *{pointer-events:none!important}.dxdi-toolbox-drag-item text{pointer-events:none}.dxdi-toolbox-drag-text-item{background-color:#fff;border:2px solid #000;padding:.5em}.dxdi-tb-drag-captured{display:none}.dxdi-focus-input,.dxdi-text-input,.dxdi-text-input-container{border:none;outline:none;padding:0;resize:none}.dxdi-clipboard-input,.dxdi-focus-input{font-size:16px;left:-1000px!important;opacity:0;overflow:hidden;position:absolute;top:-1000px!important;z-index:-100}.dxdi-text-input-container{display:none}.dxdi-text-input-container.connector-text,.dxdi-text-input-container.shape-text{background-color:transparent;display:inherit;overflow:hidden;position:absolute;transform-origin:0 0}.dxdi-text-input-container.shape-text .dxdi-text-input{background-color:transparent;color:#000;display:table-cell;font-family:arial,helvetica,sans-serif;font-size:10pt;line-height:1.1em;outline:none;overflow:hidden;padding:1px 0 0;text-align:center;vertical-align:middle}.dxdi-text-input-container.connector-text{overflow:visible}.dxdi-text-input-container.connector-text .dxdi-text-input{background-color:#fff;border:1px solid #1e90ff;color:#000;font-family:arial,helvetica,sans-serif;font-size:10pt;height:calc(1.1em + 6px);line-height:1.1em;margin-left:calc(-4em - 3px);margin-top:calc(-.55em - 3px);outline:none;overflow:hidden;padding:2px;text-align:center;vertical-align:middle;width:calc(8em + 6px)}.dxdi-page-shadow{fill:grey}