@joint/core 4.2.0-beta.3 → 4.2.0

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,4 +1,4 @@
1
- /*! JointJS v4.2.0-beta.3 (2025-11-04) - JavaScript diagramming library
1
+ /*! JointJS v4.2.0 (2025-11-10) - JavaScript diagramming library
2
2
 
3
3
  This Source Code Form is subject to the terms of the Mozilla Public
4
4
  License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -34126,6 +34126,9 @@ var joint = (function (exports) {
34126
34126
  const viewLike = this._getCellViewLike(cell);
34127
34127
  if (!viewLike) return;
34128
34128
  if (viewLike[CELL_VIEW_PLACEHOLDER_MARKER]) {
34129
+ // It's a cell placeholder, it must be in the unmounted list.
34130
+ // Remove it from there and unregister.
34131
+ this._updates.unmountedList.delete(viewLike.cid);
34129
34132
  this._unregisterCellViewPlaceholder(viewLike);
34130
34133
  } else {
34131
34134
  this.requestViewUpdate(viewLike, this.FLAG_REMOVE, viewLike.UPDATE_PRIORITY, opt);
@@ -34676,7 +34679,7 @@ var joint = (function (exports) {
34676
34679
  const type = modelType + 'View';
34677
34680
 
34678
34681
  // For backward compatibility we use the LegacyGraphLayerView for the default `cells` layer.
34679
- if (this.model.layersController.legacyMode) {
34682
+ if (this.model.legacyMode) {
34680
34683
  viewConstructor = LegacyGraphLayerView;
34681
34684
  } else {
34682
34685
  viewConstructor = this.layerViewNamespace[type] || LayerView;
@@ -34846,17 +34849,21 @@ var joint = (function (exports) {
34846
34849
  },
34847
34850
  requestConnectedLinksUpdate: function (view, priority, opt) {
34848
34851
  if (!view || !view[CELL_VIEW_MARKER]) return;
34849
- var model = view.model;
34850
- var links = this.model.getConnectedLinks(model);
34851
- for (var j = 0, n = links.length; j < n; j++) {
34852
- var link = links[j];
34853
- var linkView = this._getCellViewLike(link);
34852
+ const model = view.model;
34853
+ const links = this.model.getConnectedLinks(model);
34854
+ for (let j = 0, n = links.length; j < n; j++) {
34855
+ const link = links[j];
34856
+ const linkView = this._getCellViewLike(link);
34854
34857
  if (!linkView) continue;
34855
34858
  // We do not have to update placeholder views.
34856
34859
  // They will be updated on initial render.
34857
34860
  if (linkView[CELL_VIEW_PLACEHOLDER_MARKER]) continue;
34858
- var nextPriority = Math.max(priority + 1, linkView.UPDATE_PRIORITY);
34859
- this.scheduleViewUpdate(linkView, linkView.getFlag(LinkView.Flags.UPDATE), nextPriority, opt);
34861
+ const flagLabels = [LinkView.Flags.UPDATE];
34862
+ // We need to tell the link view which end requested this update.
34863
+ if (link.getTargetCell() === model) flagLabels.push(LinkView.Flags.TARGET);
34864
+ if (link.getSourceCell() === model) flagLabels.push(LinkView.Flags.SOURCE);
34865
+ const nextPriority = Math.max(priority + 1, linkView.UPDATE_PRIORITY);
34866
+ this.scheduleViewUpdate(linkView, linkView.getFlag(flagLabels), nextPriority, opt);
34860
34867
  }
34861
34868
  },
34862
34869
  forcePostponedViewUpdate: function (view, flag) {
@@ -35400,6 +35407,8 @@ var joint = (function (exports) {
35400
35407
  let view = views[cid] || this._viewPlaceholders[cid];
35401
35408
  if (!view) {
35402
35409
  // This should not occur
35410
+ // Prevent looping over this invalid cid
35411
+ unmountedList.popHead();
35403
35412
  continue;
35404
35413
  }
35405
35414
  if (!this._evalCellVisibility(view, false, visibilityCb)) {
@@ -39633,7 +39642,7 @@ var joint = (function (exports) {
39633
39642
  Remove: Remove
39634
39643
  };
39635
39644
 
39636
- var version = "4.2.0-beta.3";
39645
+ var version = "4.2.0";
39637
39646
 
39638
39647
  const Vectorizer = V;
39639
39648
  const layout$1 = {