@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.
@@ -1,4 +1,4 @@
1
- /*! JointJS v4.1.2 (2025-01-16) - JavaScript diagramming library
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.style;
12080
- return !position || position === 'static';
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
- var elX = snapToGrid(x + pointerOffset.x, grid);
29181
- var elY = snapToGrid(y + pointerOffset.y, grid);
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.2";
36524
+ var version = "4.1.3";
36517
36525
 
36518
36526
  const Vectorizer = V;
36519
36527
  const layout = {