@joint/core 4.1.1 → 4.1.2
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 +1 -1
- package/dist/joint.js +55 -35
- package/dist/joint.min.js +2 -2
- package/dist/joint.nowrap.js +55 -35
- package/dist/joint.nowrap.min.js +2 -2
- package/dist/vectorizer.js +2 -2
- package/dist/vectorizer.min.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
- package/src/V/index.mjs +1 -1
- package/src/dia/ElementView.mjs +1 -1
- package/src/dia/HighlighterView.mjs +5 -5
- package/src/mvc/Collection.mjs +6 -2
- package/src/mvc/Dom/Dom.mjs +2 -2
- package/src/mvc/Dom/methods.mjs +9 -7
- package/src/mvc/Listener.mjs +1 -2
- package/src/mvc/Model.mjs +6 -2
- package/src/mvc/ViewBase.mjs +6 -2
- package/src/util/util.mjs +5 -4
- package/src/util/utilHelpers.mjs +5 -5
package/dist/geometry.js
CHANGED
package/dist/geometry.min.js
CHANGED
package/dist/joint.d.ts
CHANGED
package/dist/joint.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! JointJS v4.1.
|
|
1
|
+
/*! JointJS v4.1.2 (2025-01-16) - JavaScript diagramming library
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
This Source Code Form is subject to the terms of the Mozilla Public
|
|
@@ -7255,7 +7255,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
7255
7255
|
const Constructor = object.constructor;
|
|
7256
7256
|
switch (tag) {
|
|
7257
7257
|
case arrayBufferTag:
|
|
7258
|
-
return cloneArrayBuffer(object
|
|
7258
|
+
return cloneArrayBuffer(object);
|
|
7259
7259
|
case boolTag:
|
|
7260
7260
|
case dateTag:
|
|
7261
7261
|
return new Constructor(+object);
|
|
@@ -7874,7 +7874,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
7874
7874
|
}
|
|
7875
7875
|
assignMergeValue(object, key, newValue);
|
|
7876
7876
|
}
|
|
7877
|
-
}
|
|
7877
|
+
});
|
|
7878
7878
|
};
|
|
7879
7879
|
const baseMergeDeep = (object, source, key, srcIndex, mergeFunc, customizer, stack) => {
|
|
7880
7880
|
const objValue = safeGet(object, key);
|
|
@@ -7964,7 +7964,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
7964
7964
|
const length = array == null ? 0 : array.length;
|
|
7965
7965
|
return length ? array[length - 1] : undefined;
|
|
7966
7966
|
}
|
|
7967
|
-
const createSet = Set && 1 / setToArray(new Set([undefined, -0]))[1] == 1 / 0 ? values => new Set(values) : () => {};
|
|
7967
|
+
const createSet = Set && 1 / setToArray(new Set([undefined, -0]))[1] == 1 / 0 ? values => new Set(values) : () => {/* no-op */};
|
|
7968
7968
|
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
|
|
7969
7969
|
if (isObject$1(objValue) && isObject$1(srcValue)) {
|
|
7970
7970
|
// Recursively merge objects and arrays (susceptible to call stack limits).
|
|
@@ -8758,8 +8758,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
8758
8758
|
}
|
|
8759
8759
|
const groupBy = (collection, iteratee) => {
|
|
8760
8760
|
iteratee = getIteratee(iteratee, 2);
|
|
8761
|
-
return reduce(collection, (result, value
|
|
8762
|
-
key = iteratee(value);
|
|
8761
|
+
return reduce(collection, (result, value) => {
|
|
8762
|
+
const key = iteratee(value);
|
|
8763
8763
|
if (hasOwnProperty.call(result, key)) {
|
|
8764
8764
|
result[key].push(value);
|
|
8765
8765
|
} else {
|
|
@@ -9152,8 +9152,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
9152
9152
|
}
|
|
9153
9153
|
return ret;
|
|
9154
9154
|
};
|
|
9155
|
-
$.fn.add = function (selector
|
|
9156
|
-
const newElements = $(selector
|
|
9155
|
+
$.fn.add = function (selector) {
|
|
9156
|
+
const newElements = $(selector).toArray();
|
|
9157
9157
|
const prevElements = this.toArray();
|
|
9158
9158
|
const ret = this.pushStack([]);
|
|
9159
9159
|
$.merge(ret, uniq(prevElements.concat(newElements)));
|
|
@@ -9969,8 +9969,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
9969
9969
|
case 'bottom':
|
|
9970
9970
|
dy = -(0.25 * llMaxFont) - rLineHeights;
|
|
9971
9971
|
break;
|
|
9972
|
-
default:
|
|
9973
9972
|
case 'top':
|
|
9973
|
+
default:
|
|
9974
9974
|
dy = 0.8 * flMaxFont;
|
|
9975
9975
|
break;
|
|
9976
9976
|
}
|
|
@@ -11817,7 +11817,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
11817
11817
|
if (!el) return null;
|
|
11818
11818
|
if (arguments.length === 0) return el.innerHTML;
|
|
11819
11819
|
if (html === undefined) return this; // do nothing
|
|
11820
|
-
cleanNodesData(
|
|
11820
|
+
cleanNodesData(el.getElementsByTagName('*'));
|
|
11821
11821
|
if (typeof html === 'string' || typeof html === 'number') {
|
|
11822
11822
|
el.innerHTML = html;
|
|
11823
11823
|
} else {
|
|
@@ -12076,17 +12076,21 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
12076
12076
|
// when a statically positioned element is identified
|
|
12077
12077
|
doc = el.ownerDocument;
|
|
12078
12078
|
offsetParent = el.offsetParent || doc.documentElement;
|
|
12079
|
-
const
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12079
|
+
const isStaticallyPositioned = el => {
|
|
12080
|
+
const {
|
|
12081
|
+
position
|
|
12082
|
+
} = el.style;
|
|
12083
|
+
return !position || position === 'static';
|
|
12084
|
+
};
|
|
12085
|
+
while (offsetParent && offsetParent !== doc.documentElement && isStaticallyPositioned(offsetParent)) {
|
|
12086
|
+
offsetParent = offsetParent.offsetParent || doc.documentElement;
|
|
12083
12087
|
}
|
|
12084
|
-
if (offsetParent && offsetParent !== el && offsetParent.nodeType === 1) {
|
|
12088
|
+
if (offsetParent && offsetParent !== el && offsetParent.nodeType === 1 && !isStaticallyPositioned(offsetParent)) {
|
|
12085
12089
|
// Incorporate borders into its offset, since they are outside its content origin
|
|
12086
12090
|
const offsetParentStyles = window.getComputedStyle(offsetParent);
|
|
12087
12091
|
const borderTopWidth = parseFloat(offsetParentStyles.borderTopWidth) || 0;
|
|
12088
12092
|
const borderLeftWidth = parseFloat(offsetParentStyles.borderLeftWidth) || 0;
|
|
12089
|
-
parentOffset = $
|
|
12093
|
+
parentOffset = $(offsetParent).offset();
|
|
12090
12094
|
parentOffset.top += borderTopWidth;
|
|
12091
12095
|
parentOffset.left += borderLeftWidth;
|
|
12092
12096
|
}
|
|
@@ -12445,9 +12449,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
12445
12449
|
const selectors = {};
|
|
12446
12450
|
const groupSelectors = {};
|
|
12447
12451
|
const svgNamespace = V.namespace.svg;
|
|
12448
|
-
const
|
|
12452
|
+
const initialNS = namespace || svgNamespace;
|
|
12449
12453
|
const fragment = document.createDocumentFragment();
|
|
12450
|
-
const parseNode = function (siblingsDef, parentNode,
|
|
12454
|
+
const parseNode = function (siblingsDef, parentNode, parentNS) {
|
|
12451
12455
|
for (let i = 0; i < siblingsDef.length; i++) {
|
|
12452
12456
|
const nodeDef = siblingsDef[i];
|
|
12453
12457
|
|
|
@@ -12464,7 +12468,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
12464
12468
|
let node;
|
|
12465
12469
|
|
|
12466
12470
|
// Namespace URI
|
|
12467
|
-
|
|
12471
|
+
const ns = nodeDef.hasOwnProperty('namespaceURI') ? nodeDef.namespaceURI : parentNS;
|
|
12468
12472
|
node = document.createElementNS(ns, tagName);
|
|
12469
12473
|
const svg = ns === svgNamespace;
|
|
12470
12474
|
const wrapperNode = svg ? V(node) : $(node);
|
|
@@ -12514,7 +12518,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
12514
12518
|
}
|
|
12515
12519
|
}
|
|
12516
12520
|
};
|
|
12517
|
-
parseNode(json, fragment,
|
|
12521
|
+
parseNode(json, fragment, initialNS);
|
|
12518
12522
|
return {
|
|
12519
12523
|
fragment: fragment,
|
|
12520
12524
|
selectors: selectors,
|
|
@@ -13845,7 +13849,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
13845
13849
|
} = opt || {};
|
|
13846
13850
|
return findDifference(object, base, 0, maxDepth);
|
|
13847
13851
|
}
|
|
13848
|
-
const noop = function () {
|
|
13852
|
+
const noop = function () {
|
|
13853
|
+
// Do nothing.
|
|
13854
|
+
};
|
|
13849
13855
|
|
|
13850
13856
|
// Events
|
|
13851
13857
|
// ---------------
|
|
@@ -14316,10 +14322,14 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
14316
14322
|
cidPrefix: 'c',
|
|
14317
14323
|
// preinitialize is an empty function by default. You can override it with a function
|
|
14318
14324
|
// or object. preinitialize will run before any instantiation logic is run in the Model.
|
|
14319
|
-
preinitialize: function () {
|
|
14325
|
+
preinitialize: function () {
|
|
14326
|
+
// No implementation.
|
|
14327
|
+
},
|
|
14320
14328
|
// Initialize is an empty function by default. Override it with your own
|
|
14321
14329
|
// initialization logic.
|
|
14322
|
-
initialize: function () {
|
|
14330
|
+
initialize: function () {
|
|
14331
|
+
// No implementation.
|
|
14332
|
+
},
|
|
14323
14333
|
// Return a copy of the model's `attributes` object.
|
|
14324
14334
|
toJSON: function (options) {
|
|
14325
14335
|
return clone(this.attributes);
|
|
@@ -20536,10 +20546,14 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
20536
20546
|
},
|
|
20537
20547
|
// preinitialize is an empty function by default. You can override it with a function
|
|
20538
20548
|
// or object. preinitialize will run before any instantiation logic is run in the View
|
|
20539
|
-
preinitialize: function () {
|
|
20549
|
+
preinitialize: function () {
|
|
20550
|
+
// No implementation.
|
|
20551
|
+
},
|
|
20540
20552
|
// Initialize is an empty function by default. Override it with your own
|
|
20541
20553
|
// initialization logic.
|
|
20542
|
-
initialize: function () {
|
|
20554
|
+
initialize: function () {
|
|
20555
|
+
// No implementation.
|
|
20556
|
+
},
|
|
20543
20557
|
// **render** is the core function that your view should override, in order
|
|
20544
20558
|
// to populate its element (`this.el`), with the appropriate HTML. The
|
|
20545
20559
|
// convention is for **render** to always return `this`.
|
|
@@ -20929,7 +20943,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
20929
20943
|
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
20930
20944
|
args[_key2 - 2] = arguments[_key2];
|
|
20931
20945
|
}
|
|
20932
|
-
if (
|
|
20946
|
+
if (evt && typeof evt === 'object') {
|
|
20933
20947
|
const [context = null] = args;
|
|
20934
20948
|
Object.entries(evt).forEach(_ref => {
|
|
20935
20949
|
let [eventName, cb] = _ref;
|
|
@@ -21006,10 +21020,14 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
21006
21020
|
model: Model,
|
|
21007
21021
|
// preinitialize is an empty function by default. You can override it with a function
|
|
21008
21022
|
// or object. preinitialize will run before any instantiation logic is run in the Collection.
|
|
21009
|
-
preinitialize: function () {
|
|
21023
|
+
preinitialize: function () {
|
|
21024
|
+
// No implementation.
|
|
21025
|
+
},
|
|
21010
21026
|
// Initialize is an empty function by default. Override it with your own
|
|
21011
21027
|
// initialization logic.
|
|
21012
|
-
initialize: function () {
|
|
21028
|
+
initialize: function () {
|
|
21029
|
+
// No implementation.
|
|
21030
|
+
},
|
|
21013
21031
|
// The JSON representation of a Collection is an array of the
|
|
21014
21032
|
// models' attributes.
|
|
21015
21033
|
toJSON: function (options) {
|
|
@@ -21527,13 +21545,13 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
21527
21545
|
cellView,
|
|
21528
21546
|
nodeSelector
|
|
21529
21547
|
} = this;
|
|
21530
|
-
if (
|
|
21548
|
+
if (cellView.isMounted()) {
|
|
21549
|
+
this.update(cellView, nodeSelector);
|
|
21550
|
+
this.mount();
|
|
21551
|
+
this.transform();
|
|
21552
|
+
} else {
|
|
21531
21553
|
this.postponedUpdate = true;
|
|
21532
|
-
return 0;
|
|
21533
21554
|
}
|
|
21534
|
-
this.update(cellView, nodeSelector);
|
|
21535
|
-
this.mount();
|
|
21536
|
-
this.transform();
|
|
21537
21555
|
return 0;
|
|
21538
21556
|
},
|
|
21539
21557
|
findNode(cellView) {
|
|
@@ -28515,7 +28533,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
28515
28533
|
/**
|
|
28516
28534
|
* @abstract
|
|
28517
28535
|
*/
|
|
28518
|
-
_initializePorts: function () {
|
|
28536
|
+
_initializePorts: function () {
|
|
28537
|
+
// implemented in ports.js
|
|
28538
|
+
},
|
|
28519
28539
|
update: function (_, renderingOnlyAttrs) {
|
|
28520
28540
|
this.cleanNodesCache();
|
|
28521
28541
|
|
|
@@ -36496,7 +36516,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
36496
36516
|
Control: Control
|
|
36497
36517
|
});
|
|
36498
36518
|
|
|
36499
|
-
var version = "4.1.
|
|
36519
|
+
var version = "4.1.2";
|
|
36500
36520
|
|
|
36501
36521
|
const Vectorizer = V;
|
|
36502
36522
|
const layout = {
|