devexpress-diagram 2.1.40 → 2.1.41

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.1.40
4
- * Build date: Thu Dec 02 2021
3
+ * Version: 2.1.41
4
+ * Build date: Tue Dec 14 2021
5
5
  *
6
6
  * Copyright (c) 2012 - 2021 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.1.40
4
- * Build date: Thu Dec 02 2021
3
+ * Version: 2.1.41
4
+ * Build date: Tue Dec 14 2021
5
5
  *
6
6
  * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
@@ -29463,6 +29463,7 @@ var DiagramControl = /** @class */ (function () {
29463
29463
  this.settings.onViewChanged.remove(this.render.view);
29464
29464
  this.settings.onReadOnlyChanged.remove(this.render);
29465
29465
  this.settings.onReadOnlyChanged.remove(this.render.selection);
29466
+ this.eventManager.cleanToolboxes(this.settings.onReadOnlyChanged);
29466
29467
  this.eventManager.onTextInputOperation.remove(this.render.input);
29467
29468
  this.eventManager.onTextInputOperation.remove(this.render.items);
29468
29469
  this.eventManager.onTextInputOperation.remove(this.render.selection);
@@ -30461,6 +30462,12 @@ var EventManager = /** @class */ (function () {
30461
30462
  EventManager.prototype.registerToolbox = function (toolbox) {
30462
30463
  this.toolboxes.push(toolbox);
30463
30464
  };
30465
+ EventManager.prototype.cleanToolboxes = function (eventDispatcher) {
30466
+ this.toolboxes.forEach(function (toolbox) {
30467
+ eventDispatcher.remove(toolbox);
30468
+ });
30469
+ this.toolboxes = [];
30470
+ };
30464
30471
  EventManager.prototype.initialize = function (model, selection, isTouchUIEnabled) {
30465
30472
  this.visualizersManager.initialize(model, this, selection, isTouchUIEnabled);
30466
30473
  this.mouseHandler.initialize(model, selection, isTouchUIEnabled);
@@ -31456,6 +31463,10 @@ var MouseHandlerCreateConnectorState = /** @class */ (function (_super) {
31456
31463
  var beginShape = this.connector && this.connector.beginItem;
31457
31464
  if (!beginShape)
31458
31465
  return;
31466
+ if (this.connector && !this.handler.canPerformChangeConnection(this.connector, { position: Connector_1.ConnectorPosition.End, connectionPointIndex: -1 })) {
31467
+ this.cancelChanges();
31468
+ return;
31469
+ }
31459
31470
  var side = this.getNewShapeSide(this.connector);
31460
31471
  var point = this.getSnappedPoint(evt, evt.modelPoint);
31461
31472
  var category = this.shapeDescriptionManager.getCategoryByDescription(beginShape.description);
@@ -37816,14 +37827,20 @@ var ToolboxManager = /** @class */ (function () {
37816
37827
  return toolbox;
37817
37828
  };
37818
37829
  ToolboxManager.prototype.clean = function (removeElement, toolbox) {
37830
+ var _this = this;
37819
37831
  if (toolbox) {
37820
37832
  toolbox.clean(removeElement);
37821
37833
  this.toolboxes.splice(this.toolboxes.indexOf(toolbox), 1);
37834
+ Object.keys(this.measurers).forEach(function (key) {
37835
+ if (_this.measurers[key] === toolbox.measurer)
37836
+ delete _this.measurers[key];
37837
+ });
37822
37838
  }
37823
37839
  else {
37824
37840
  for (var i = 0; i < this.toolboxes.length; i++)
37825
37841
  this.toolboxes[i].clean(removeElement);
37826
37842
  this.toolboxes = [];
37843
+ this.measurers = {};
37827
37844
  }
37828
37845
  };
37829
37846
  ToolboxManager.prototype.refresh = function (toolboxes) {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Diagram (dx-diagram.min)
3
- * Version: 2.1.40
4
- * Build date: Thu Dec 02 2021
3
+ * Version: 2.1.41
4
+ * Build date: Tue Dec 14 2021
5
5
  *
6
6
  * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  * Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs