@joint/core 4.2.2 → 4.2.3
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/README.md +2 -2
- package/dist/geometry.js +1 -1
- package/dist/geometry.min.js +1 -1
- package/dist/joint.d.ts +4 -3
- package/dist/joint.js +90 -72
- package/dist/joint.min.js +2 -2
- package/dist/joint.nowrap.js +90 -72
- 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 +6 -14
- package/src/cellTools/Button.mjs +3 -1
- package/src/cellTools/Control.mjs +1 -1
- package/src/connectionPoints/index.mjs +1 -1
- package/src/connectors/curve.mjs +2 -4
- package/src/dia/Cell.mjs +5 -6
- package/src/dia/Graph.mjs +2 -2
- package/src/dia/GraphLayerCollection.mjs +2 -3
- package/src/dia/HighlighterView.mjs +5 -5
- package/src/dia/LayerView.mjs +1 -1
- package/src/dia/LinkView.mjs +1 -1
- package/src/dia/Paper.mjs +21 -13
- package/src/dia/attributes/eval.mjs +1 -1
- package/src/dia/ports.mjs +2 -2
- package/src/elementTools/HoverConnect.mjs +4 -3
- package/src/layout/ports/port.mjs +1 -1
- package/src/linkTools/RotateLabel.mjs +2 -1
- package/src/linkTools/Segments.mjs +1 -1
- package/src/mvc/Dom/Dom.mjs +2 -2
- package/src/mvc/Dom/animations.mjs +2 -6
- package/src/mvc/Dom/methods.mjs +3 -3
- package/src/mvc/Dom/props.mjs +1 -1
- package/src/mvc/Listener.mjs +1 -0
- package/src/routers/rightAngle.mjs +9 -9
- package/src/util/calc.mjs +1 -1
- package/src/util/util.mjs +2 -4
- package/src/util/utilHelpers.mjs +5 -5
- package/types/joint.d.ts +5 -4
- package/types/vectorizer.d.ts +1 -1
package/src/util/utilHelpers.mjs
CHANGED
|
@@ -315,7 +315,7 @@ const isSymbol = (value) => {
|
|
|
315
315
|
|
|
316
316
|
const initCloneArray = (array) => {
|
|
317
317
|
const length = array.length;
|
|
318
|
-
|
|
318
|
+
const result = new array.constructor(length);
|
|
319
319
|
|
|
320
320
|
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
|
321
321
|
result.index = array.index;
|
|
@@ -538,7 +538,7 @@ const baseIsEqual = (value, other, stack) => {
|
|
|
538
538
|
};
|
|
539
539
|
|
|
540
540
|
const baseIsEqualDeep = (object, other, equalFunc, stack) => {
|
|
541
|
-
|
|
541
|
+
const objIsArr = Array.isArray(object);
|
|
542
542
|
const othIsArr = Array.isArray(other);
|
|
543
543
|
let objTag = objIsArr ? arrayTag : getTag(object);
|
|
544
544
|
let othTag = othIsArr ? arrayTag : getTag(other);
|
|
@@ -546,7 +546,7 @@ const baseIsEqualDeep = (object, other, equalFunc, stack) => {
|
|
|
546
546
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
547
547
|
othTag = othTag == argsTag ? objectTag : othTag;
|
|
548
548
|
|
|
549
|
-
|
|
549
|
+
const objIsObj = objTag == objectTag;
|
|
550
550
|
const othIsObj = othTag == objectTag;
|
|
551
551
|
const isSameTag = objTag == othTag;
|
|
552
552
|
|
|
@@ -710,7 +710,7 @@ const equalByTag = (object, other, tag, equalFunc, stack) => {
|
|
|
710
710
|
|
|
711
711
|
const mapToArray = (map) => {
|
|
712
712
|
let index = -1;
|
|
713
|
-
|
|
713
|
+
const result = Array(map.size);
|
|
714
714
|
|
|
715
715
|
map.forEach((value, key) => {
|
|
716
716
|
result[++index] = [key, value];
|
|
@@ -852,7 +852,7 @@ const diff = (array, values) => {
|
|
|
852
852
|
}
|
|
853
853
|
|
|
854
854
|
outer:
|
|
855
|
-
for (
|
|
855
|
+
for (const key in array) {
|
|
856
856
|
let value = array[key];
|
|
857
857
|
const computed = value;
|
|
858
858
|
|
package/types/joint.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g } from './geometry';
|
|
2
|
-
import { Vectorizer } from './vectorizer';
|
|
1
|
+
import type { g } from './geometry';
|
|
2
|
+
import type { Vectorizer } from './vectorizer';
|
|
3
3
|
|
|
4
4
|
export const version: string;
|
|
5
5
|
|
|
@@ -1668,8 +1668,8 @@ export namespace dia {
|
|
|
1668
1668
|
moveThreshold?: number;
|
|
1669
1669
|
magnetThreshold?: number | string;
|
|
1670
1670
|
// views
|
|
1671
|
-
elementView?: typeof ElementView | ((element: Element) => typeof ElementView);
|
|
1672
|
-
linkView?: typeof LinkView | ((link: Link) => typeof LinkView);
|
|
1671
|
+
elementView?: typeof ElementView<any> | ((element: Element) => typeof ElementView<any> | null | undefined);
|
|
1672
|
+
linkView?: typeof LinkView<any> | ((link: Link) => typeof LinkView<any> | null | undefined);
|
|
1673
1673
|
measureNode?: MeasureNodeCallback;
|
|
1674
1674
|
// embedding
|
|
1675
1675
|
embeddingMode?: boolean;
|
|
@@ -3241,6 +3241,7 @@ export namespace util {
|
|
|
3241
3241
|
|
|
3242
3242
|
export function toArray(value: any): any[];
|
|
3243
3243
|
|
|
3244
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
3244
3245
|
export function debounce<T extends Function>(func: T, wait?: number, options?: { leading?: boolean, maxWait?: number, trailing?: boolean }): T & Cancelable;
|
|
3245
3246
|
|
|
3246
3247
|
export function groupBy(collection: Collection, iteratee?: IterateeFunction<any>): object;
|
package/types/vectorizer.d.ts
CHANGED