@joint/core 4.2.0-beta.2 → 4.2.0-beta.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.
- package/dist/geometry.js +1 -1
- package/dist/geometry.min.js +1 -1
- package/dist/joint.d.ts +2 -1
- package/dist/joint.js +21 -11
- package/dist/joint.min.js +2 -2
- package/dist/joint.nowrap.js +21 -11
- package/dist/joint.nowrap.min.js +2 -2
- package/dist/vectorizer.js +1 -1
- package/dist/vectorizer.min.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
- package/src/dia/LayerView.mjs +2 -1
- package/src/dia/Paper.mjs +17 -8
- package/types/joint.d.ts +1 -0
package/dist/vectorizer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! JointJS v4.2.0-beta.
|
|
1
|
+
/*! JointJS v4.2.0-beta.4 (2025-11-07) - 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
|
package/dist/vectorizer.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! JointJS v4.2.0-beta.
|
|
1
|
+
/*! JointJS v4.2.0-beta.4 (2025-11-07) - 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
|
package/dist/version.mjs
CHANGED
package/package.json
CHANGED
package/src/dia/LayerView.mjs
CHANGED
package/src/dia/Paper.mjs
CHANGED
|
@@ -731,6 +731,9 @@ export const Paper = View.extend({
|
|
|
731
731
|
const viewLike = this._getCellViewLike(cell);
|
|
732
732
|
if (!viewLike) return;
|
|
733
733
|
if (viewLike[CELL_VIEW_PLACEHOLDER_MARKER]) {
|
|
734
|
+
// It's a cell placeholder, it must be in the unmounted list.
|
|
735
|
+
// Remove it from there and unregister.
|
|
736
|
+
this._updates.unmountedList.delete(viewLike.cid);
|
|
734
737
|
this._unregisterCellViewPlaceholder(viewLike);
|
|
735
738
|
} else {
|
|
736
739
|
this.requestViewUpdate(viewLike, this.FLAG_REMOVE, viewLike.UPDATE_PRIORITY, opt);
|
|
@@ -1299,7 +1302,7 @@ export const Paper = View.extend({
|
|
|
1299
1302
|
const type = modelType + 'View';
|
|
1300
1303
|
|
|
1301
1304
|
// For backward compatibility we use the LegacyGraphLayerView for the default `cells` layer.
|
|
1302
|
-
if (this.model.
|
|
1305
|
+
if (this.model.legacyMode) {
|
|
1303
1306
|
viewConstructor = LegacyGraphLayerView;
|
|
1304
1307
|
} else {
|
|
1305
1308
|
viewConstructor = this.layerViewNamespace[type] || LayerView;
|
|
@@ -1484,17 +1487,21 @@ export const Paper = View.extend({
|
|
|
1484
1487
|
|
|
1485
1488
|
requestConnectedLinksUpdate: function(view, priority, opt) {
|
|
1486
1489
|
if (!view || !view[CELL_VIEW_MARKER]) return;
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
for (
|
|
1490
|
-
|
|
1491
|
-
|
|
1490
|
+
const model = view.model;
|
|
1491
|
+
const links = this.model.getConnectedLinks(model);
|
|
1492
|
+
for (let j = 0, n = links.length; j < n; j++) {
|
|
1493
|
+
const link = links[j];
|
|
1494
|
+
const linkView = this._getCellViewLike(link);
|
|
1492
1495
|
if (!linkView) continue;
|
|
1493
1496
|
// We do not have to update placeholder views.
|
|
1494
1497
|
// They will be updated on initial render.
|
|
1495
1498
|
if (linkView[CELL_VIEW_PLACEHOLDER_MARKER]) continue;
|
|
1496
|
-
|
|
1497
|
-
this
|
|
1499
|
+
const flagLabels = [LinkView.Flags.UPDATE];
|
|
1500
|
+
// We need to tell the link view which end requested this update.
|
|
1501
|
+
if (link.getTargetCell() === model) flagLabels.push(LinkView.Flags.TARGET);
|
|
1502
|
+
if (link.getSourceCell() === model) flagLabels.push(LinkView.Flags.SOURCE);
|
|
1503
|
+
const nextPriority = Math.max(priority + 1, linkView.UPDATE_PRIORITY);
|
|
1504
|
+
this.scheduleViewUpdate(linkView, linkView.getFlag(flagLabels), nextPriority, opt);
|
|
1498
1505
|
}
|
|
1499
1506
|
},
|
|
1500
1507
|
|
|
@@ -2027,6 +2034,8 @@ export const Paper = View.extend({
|
|
|
2027
2034
|
let view = viewsRegistry[cid] || this._viewPlaceholders[cid];
|
|
2028
2035
|
if (!view) {
|
|
2029
2036
|
// This should not occur
|
|
2037
|
+
// Prevent looping over this invalid cid
|
|
2038
|
+
unmountedList.popHead();
|
|
2030
2039
|
continue;
|
|
2031
2040
|
}
|
|
2032
2041
|
if (!this._evalCellVisibility(view, false, visibilityCb)) {
|
package/types/joint.d.ts
CHANGED
|
@@ -1825,6 +1825,7 @@ export namespace dia {
|
|
|
1825
1825
|
'link:snap:disconnect': (linkView: dia.LinkView, evt: dia.Event, prevCellView: dia.CellView, prevCellViewMagnet: SVGElement, arrowhead: dia.LinkEnd) => void;
|
|
1826
1826
|
// render
|
|
1827
1827
|
'render:done': (stats: UpdateStats, opt: any) => void;
|
|
1828
|
+
'render:idle': (opt: Paper.UpdateViewsAsyncOptions) => void;
|
|
1828
1829
|
// transformations
|
|
1829
1830
|
'translate': (tx: number, ty: number, data: unknown) => void;
|
|
1830
1831
|
'scale': (sx: number, sy: number, data: unknown) => void;
|