@joint/core 4.1.2 → 4.1.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/dist/geometry.js +1 -1
- package/dist/geometry.min.js +1 -1
- package/dist/joint.d.ts +3 -1
- package/dist/joint.js +15 -7
- package/dist/joint.min.js +2 -2
- package/dist/joint.nowrap.js +15 -7
- 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/ElementView.mjs +9 -3
- package/src/mvc/Dom/methods.mjs +2 -2
- package/types/joint.d.ts +2 -0
package/dist/joint.nowrap.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! JointJS v4.1.
|
|
1
|
+
/*! JointJS v4.1.3 (2025-02-04) - JavaScript diagramming library
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
This Source Code Form is subject to the terms of the Mozilla Public
|
|
@@ -12076,8 +12076,8 @@ var joint = (function (exports) {
|
|
|
12076
12076
|
const isStaticallyPositioned = el => {
|
|
12077
12077
|
const {
|
|
12078
12078
|
position
|
|
12079
|
-
} = el
|
|
12080
|
-
return
|
|
12079
|
+
} = getComputedStyle(el);
|
|
12080
|
+
return position === 'static';
|
|
12081
12081
|
};
|
|
12082
12082
|
while (offsetParent && offsetParent !== doc.documentElement && isStaticallyPositioned(offsetParent)) {
|
|
12083
12083
|
offsetParent = offsetParent.offsetParent || doc.documentElement;
|
|
@@ -29165,9 +29165,15 @@ var joint = (function (exports) {
|
|
|
29165
29165
|
},
|
|
29166
29166
|
// Drag Handlers
|
|
29167
29167
|
|
|
29168
|
+
snapToGrid: function (evt, x, y) {
|
|
29169
|
+
const grid = this.paper.options.gridSize;
|
|
29170
|
+
return {
|
|
29171
|
+
x: snapToGrid(x, grid),
|
|
29172
|
+
y: snapToGrid(y, grid)
|
|
29173
|
+
};
|
|
29174
|
+
},
|
|
29168
29175
|
drag: function (evt, x, y) {
|
|
29169
29176
|
var paper = this.paper;
|
|
29170
|
-
var grid = paper.options.gridSize;
|
|
29171
29177
|
var element = this.model;
|
|
29172
29178
|
var data = this.eventData(evt);
|
|
29173
29179
|
var {
|
|
@@ -29177,8 +29183,10 @@ var joint = (function (exports) {
|
|
|
29177
29183
|
} = data;
|
|
29178
29184
|
|
|
29179
29185
|
// Make sure the new element's position always snaps to the current grid
|
|
29180
|
-
|
|
29181
|
-
|
|
29186
|
+
const {
|
|
29187
|
+
x: elX,
|
|
29188
|
+
y: elY
|
|
29189
|
+
} = this.snapToGrid(evt, x + pointerOffset.x, y + pointerOffset.y);
|
|
29182
29190
|
element.position(elX, elY, {
|
|
29183
29191
|
restrictedArea,
|
|
29184
29192
|
deep: true,
|
|
@@ -36513,7 +36521,7 @@ var joint = (function (exports) {
|
|
|
36513
36521
|
Control: Control
|
|
36514
36522
|
});
|
|
36515
36523
|
|
|
36516
|
-
var version = "4.1.
|
|
36524
|
+
var version = "4.1.3";
|
|
36517
36525
|
|
|
36518
36526
|
const Vectorizer = V;
|
|
36519
36527
|
const layout = {
|