@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.
@@ -1,4 +1,4 @@
1
- /*! JointJS v4.2.2 (2025-12-16) - JavaScript diagramming library
1
+ /*! JointJS v4.2.3 (2026-01-21) - 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
@@ -7205,7 +7205,7 @@ var joint = (function (exports) {
7205
7205
  };
7206
7206
  const initCloneArray = array => {
7207
7207
  const length = array.length;
7208
- let result = new array.constructor(length);
7208
+ const result = new array.constructor(length);
7209
7209
  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
7210
7210
  result.index = array.index;
7211
7211
  result.input = array.input;
@@ -7383,13 +7383,13 @@ var joint = (function (exports) {
7383
7383
  return baseIsEqualDeep(value, other, baseIsEqual, stack);
7384
7384
  };
7385
7385
  const baseIsEqualDeep = (object, other, equalFunc, stack) => {
7386
- let objIsArr = Array.isArray(object);
7386
+ const objIsArr = Array.isArray(object);
7387
7387
  const othIsArr = Array.isArray(other);
7388
7388
  let objTag = objIsArr ? arrayTag : getTag(object);
7389
7389
  let othTag = othIsArr ? arrayTag : getTag(other);
7390
7390
  objTag = objTag == argsTag ? objectTag : objTag;
7391
7391
  othTag = othTag == argsTag ? objectTag : othTag;
7392
- let objIsObj = objTag == objectTag;
7392
+ const objIsObj = objTag == objectTag;
7393
7393
  const othIsObj = othTag == objectTag;
7394
7394
  const isSameTag = objTag == othTag;
7395
7395
  if (isSameTag && !objIsObj) {
@@ -7524,7 +7524,7 @@ var joint = (function (exports) {
7524
7524
  };
7525
7525
  const mapToArray = map => {
7526
7526
  let index = -1;
7527
- let result = Array(map.size);
7527
+ const result = Array(map.size);
7528
7528
  map.forEach((value, key) => {
7529
7529
  result[++index] = [key, value];
7530
7530
  });
@@ -7634,7 +7634,7 @@ var joint = (function (exports) {
7634
7634
  isCommon = false;
7635
7635
  values = new SetCache(values);
7636
7636
  }
7637
- outer: for (let key in array) {
7637
+ outer: for (const key in array) {
7638
7638
  let value = array[key];
7639
7639
  const computed = value;
7640
7640
  value = value !== 0 ? value : 0;
@@ -9048,7 +9048,7 @@ var joint = (function (exports) {
9048
9048
  // User data storage
9049
9049
  $.data = dataUser;
9050
9050
  $.merge = function (first, second) {
9051
- let len = +second.length;
9051
+ const len = +second.length;
9052
9052
  let i = first.length;
9053
9053
  for (let j = 0; j < len; j++) {
9054
9054
  first[i++] = second[j];
@@ -9216,7 +9216,7 @@ var joint = (function (exports) {
9216
9216
  data = data || selector;
9217
9217
  selector = undefined;
9218
9218
  }
9219
- for (let type in types) {
9219
+ for (const type in types) {
9220
9220
  $.event.on(elem, type, selector, data, types[type], one);
9221
9221
  }
9222
9222
  return elem;
@@ -12065,7 +12065,7 @@ var joint = (function (exports) {
12065
12065
  } else {
12066
12066
  styles = name;
12067
12067
  }
12068
- for (let style in styles) {
12068
+ for (const style in styles) {
12069
12069
  if (styles.hasOwnProperty(style)) {
12070
12070
  for (let i = 0; i < this.length; i++) {
12071
12071
  setCSSProperty(this[i], style, styles[style]);
@@ -12171,7 +12171,7 @@ var joint = (function (exports) {
12171
12171
  }
12172
12172
  if (typeof types === 'object') {
12173
12173
  // ( types-object [, selector] )
12174
- for (let type in types) {
12174
+ for (const type in types) {
12175
12175
  this.off(type, selector, types[type]);
12176
12176
  }
12177
12177
  return this;
@@ -12215,7 +12215,7 @@ var joint = (function (exports) {
12215
12215
  function position() {
12216
12216
  const [el] = this;
12217
12217
  if (!el) return;
12218
- let $el = $(el);
12218
+ const $el = $(el);
12219
12219
  let offsetParent;
12220
12220
  let offset;
12221
12221
  let doc;
@@ -12334,8 +12334,10 @@ var joint = (function (exports) {
12334
12334
  function animateNode(el, properties, opt = {}) {
12335
12335
  let {
12336
12336
  duration = 400,
12337
+ delay = 0
12338
+ } = opt;
12339
+ const {
12337
12340
  easing = 'ease-in-out',
12338
- delay = 0,
12339
12341
  complete
12340
12342
  } = opt;
12341
12343
  const delayId = setTimeout(function () {
@@ -12471,7 +12473,7 @@ var joint = (function (exports) {
12471
12473
  } else {
12472
12474
  attributes = name;
12473
12475
  }
12474
- for (let attr in attributes) {
12476
+ for (const attr in attributes) {
12475
12477
  if (attributes.hasOwnProperty(attr)) {
12476
12478
  const value = attributes[attr];
12477
12479
  if (propertiesMap[attr]) {
@@ -12625,11 +12627,10 @@ var joint = (function (exports) {
12625
12627
  // TagName
12626
12628
  if (!nodeDef.hasOwnProperty('tagName')) throw new Error('json-dom-parser: missing tagName');
12627
12629
  const tagName = nodeDef.tagName;
12628
- let node;
12629
12630
 
12630
12631
  // Namespace URI
12631
12632
  const ns = nodeDef.hasOwnProperty('namespaceURI') ? nodeDef.namespaceURI : parentNS;
12632
- node = document.createElementNS(ns, tagName);
12633
+ const node = document.createElementNS(ns, tagName);
12633
12634
  const svg = ns === svgNamespace;
12634
12635
  const wrapperNode = svg ? V(node) : $(node);
12635
12636
  // Attributes
@@ -12810,7 +12811,7 @@ var joint = (function (exports) {
12810
12811
  // If the event is a touch event, normalize it to a mouse event.
12811
12812
  const touch = originalEvent && originalEvent.changedTouches && originalEvent.changedTouches[0];
12812
12813
  if (touch) {
12813
- for (let property in touch) {
12814
+ for (const property in touch) {
12814
12815
  // copy all the properties from the first touch that are not
12815
12816
  // defined on TouchEvent (clientX, clientY, pageX, pageY, screenX, screenY, identifier, ...)
12816
12817
  if (evt[property] === undefined) {
@@ -14977,7 +14978,7 @@ var joint = (function (exports) {
14977
14978
  let value = expression;
14978
14979
  let startSearchIndex = 0;
14979
14980
  do {
14980
- let calcIndex = value.indexOf(calcStart, startSearchIndex);
14981
+ const calcIndex = value.indexOf(calcStart, startSearchIndex);
14981
14982
  if (calcIndex === -1) return value;
14982
14983
  let calcEndIndex = calcIndex + calcStartOffset;
14983
14984
  let brackets = 1;
@@ -15640,7 +15641,7 @@ var joint = (function (exports) {
15640
15641
  return finalAttributes;
15641
15642
  }
15642
15643
  let defaultAttributes = {};
15643
- let attributes = cloneDeep(this.attributes);
15644
+ const attributes = cloneDeep(this.attributes);
15644
15645
  if (ignoreDefaults === true) {
15645
15646
  // Compare all attributes with the defaults
15646
15647
  defaultAttributes = defaults;
@@ -16195,8 +16196,7 @@ var joint = (function (exports) {
16195
16196
  const {
16196
16197
  _scheduledTransitionIds
16197
16198
  } = this;
16198
- let initialId;
16199
- var initiator = callback => {
16199
+ const initiator = callback => {
16200
16200
  if (_scheduledTransitionIds[transitionKey]) {
16201
16201
  _scheduledTransitionIds[transitionKey] = without(_scheduledTransitionIds[transitionKey], initialId);
16202
16202
  if (_scheduledTransitionIds[transitionKey].length === 0) {
@@ -16208,7 +16208,7 @@ var joint = (function (exports) {
16208
16208
  this._transitionIds[transitionKey] = nextFrame(callback);
16209
16209
  this.trigger('transition:start', this, transitionKey);
16210
16210
  };
16211
- initialId = setTimeout(initiator, opt.delay, setter);
16211
+ const initialId = setTimeout(initiator, opt.delay, setter);
16212
16212
  _scheduledTransitionIds[transitionKey] || (_scheduledTransitionIds[transitionKey] = []);
16213
16213
  _scheduledTransitionIds[transitionKey].push(initialId);
16214
16214
  return initialId;
@@ -16383,11 +16383,11 @@ var joint = (function (exports) {
16383
16383
  }, protoProps);
16384
16384
  var Cell = this.extend(protoProps, staticProps);
16385
16385
  // es5 backward compatibility
16386
- /* eslint-disable no-undef */
16386
+ // eslint-disable-next-line no-undef
16387
16387
  if (typeof joint !== 'undefined' && has(joint, 'shapes')) {
16388
+ // eslint-disable-next-line no-undef
16388
16389
  setByPath(joint.shapes, type, Cell, '.');
16389
16390
  }
16390
- /* eslint-enable no-undef */
16391
16391
  return Cell;
16392
16392
  }
16393
16393
  });
@@ -16736,7 +16736,7 @@ var joint = (function (exports) {
16736
16736
  });
16737
16737
  }
16738
16738
  function argTransform(bbox, args) {
16739
- let {
16739
+ const {
16740
16740
  x,
16741
16741
  y,
16742
16742
  angle
@@ -17200,7 +17200,7 @@ var joint = (function (exports) {
17200
17200
  } else {
17201
17201
  groupPortTransformations = this._getGroupPortTransformations(group, portsArgs, elBBox);
17202
17202
  }
17203
- let accumulator = {
17203
+ const accumulator = {
17204
17204
  ports: ports,
17205
17205
  result: {}
17206
17206
  };
@@ -17358,7 +17358,10 @@ var joint = (function (exports) {
17358
17358
  evaluated.position = this._evaluatePortPositionProperty(group, evaluated);
17359
17359
  evaluated.label = this._evaluatePortLabelProperty(group, evaluated);
17360
17360
  evaluated.z = this._evaluatePortZProperty(group, evaluated);
17361
- evaluated.size = assign({}, group.size, evaluated.size);
17361
+ evaluated.size = assign({
17362
+ width: 0,
17363
+ height: 0
17364
+ }, group.size, evaluated.size);
17362
17365
  return evaluated;
17363
17366
  },
17364
17367
  _evaluatePortPositionProperty: function (group, port) {
@@ -20952,17 +20955,15 @@ var joint = (function (exports) {
20952
20955
  const v2 = tpNext.difference(points[i]).normalize();
20953
20956
  const vAngle = angleBetweenVectors(v1, v2);
20954
20957
  let rot = (Math.PI - vAngle) / 2;
20955
- let t;
20956
20958
  const vectorDeterminant = determinant(v1, v2);
20957
- let pointsDeterminant;
20958
- pointsDeterminant = determinant(points[i].difference(points[i + 1]), points[i].difference(points[i - 1]));
20959
+ const pointsDeterminant = determinant(points[i].difference(points[i + 1]), points[i].difference(points[i - 1]));
20959
20960
  if (vectorDeterminant < 0) {
20960
20961
  rot = -rot;
20961
20962
  }
20962
20963
  if (vAngle < Math.PI / 2 && (rot < 0 && pointsDeterminant < 0 || rot > 0 && pointsDeterminant > 0)) {
20963
20964
  rot = rot - Math.PI;
20964
20965
  }
20965
- t = v2.clone();
20966
+ const t = v2.clone();
20966
20967
  rotateVector(t, rot);
20967
20968
  const t1 = t.clone();
20968
20969
  const t2 = t.clone();
@@ -21460,6 +21461,7 @@ var joint = (function (exports) {
21460
21461
  }
21461
21462
  // signature 2 - (object, event, callback, context)
21462
21463
  else if (typeof evt === 'string' && typeof args[0] === 'function') {
21464
+ // eslint-disable-next-line prefer-const
21463
21465
  let [cb, context = null] = args;
21464
21466
  // Invoke the callback with callbackArguments passed first
21465
21467
  if (context || callbackArguments.length > 0) cb = cb.bind(context, ...callbackArguments);
@@ -22286,7 +22288,7 @@ var joint = (function (exports) {
22286
22288
  // all highlighters
22287
22289
  const views = [];
22288
22290
  if (!refs) return views;
22289
- for (let hid in refs) {
22291
+ for (const hid in refs) {
22290
22292
  const ref = refs[hid];
22291
22293
  if (ref instanceof this) {
22292
22294
  views.push(ref);
@@ -22316,7 +22318,7 @@ var joint = (function (exports) {
22316
22318
  if (!refs) return false;
22317
22319
  if (id === null) {
22318
22320
  // any highlighter
22319
- for (let hid in refs) {
22321
+ for (const hid in refs) {
22320
22322
  if (refs[hid] instanceof this) return true;
22321
22323
  }
22322
22324
  return false;
@@ -22361,7 +22363,7 @@ var joint = (function (exports) {
22361
22363
  const refs = _views[cid];
22362
22364
  if (!refs) return;
22363
22365
  if (id) delete refs[id];
22364
- for (let _ in refs) return;
22366
+ for (const _ in refs) return;
22365
22367
  delete _views[cid];
22366
22368
  },
22367
22369
  remove(cellView, id = null) {
@@ -22374,8 +22376,8 @@ var joint = (function (exports) {
22374
22376
  const {
22375
22377
  _views
22376
22378
  } = this;
22377
- for (let cid in _views) {
22378
- for (let hid in _views[cid]) {
22379
+ for (const cid in _views) {
22380
+ for (const hid in _views[cid]) {
22379
22381
  const view = _views[cid][hid];
22380
22382
  if (view.cellView.paper === paper && view instanceof this && (id === null || hid === id)) {
22381
22383
  views.push(view);
@@ -22947,7 +22949,7 @@ var joint = (function (exports) {
22947
22949
  // Connection Points
22948
22950
 
22949
22951
  function anchorConnectionPoint(line, _view, _magnet, opt) {
22950
- let {
22952
+ const {
22951
22953
  offset,
22952
22954
  alignOffset,
22953
22955
  align
@@ -25220,8 +25222,8 @@ var joint = (function (exports) {
25220
25222
  }];
25221
25223
  }
25222
25224
  let x;
25223
- let y1 = Math.min((sy1 + ty0) / 2, toy);
25224
- let y2 = Math.min((sy0 + ty1) / 2, soy);
25225
+ const y1 = Math.min((sy1 + ty0) / 2, toy);
25226
+ const y2 = Math.min((sy0 + ty1) / 2, soy);
25225
25227
  if (toy < soy) {
25226
25228
  // Use the shortest path along the connections on horizontal sides
25227
25229
  if (rightD > leftD) {
@@ -25263,8 +25265,8 @@ var joint = (function (exports) {
25263
25265
  }];
25264
25266
  }
25265
25267
  let x;
25266
- let y1 = Math.max((sy0 + ty1) / 2, toy);
25267
- let y2 = Math.max((sy1 + ty0) / 2, soy);
25268
+ const y1 = Math.max((sy0 + ty1) / 2, toy);
25269
+ const y2 = Math.max((sy1 + ty0) / 2, soy);
25268
25270
  if (toy > soy) {
25269
25271
  // Use the shortest path along the connections on horizontal sides
25270
25272
  if (rightD > leftD) {
@@ -25306,8 +25308,8 @@ var joint = (function (exports) {
25306
25308
  }];
25307
25309
  }
25308
25310
  let y;
25309
- let x1 = Math.min((sx1 + tx0) / 2, tox);
25310
- let x2 = Math.min((sx0 + tx1) / 2, sox);
25311
+ const x1 = Math.min((sx1 + tx0) / 2, tox);
25312
+ const x2 = Math.min((sx0 + tx1) / 2, sox);
25311
25313
  if (tox > sox) {
25312
25314
  if (topD <= bottomD) {
25313
25315
  y = Math.min(smy0, toy);
@@ -25348,8 +25350,8 @@ var joint = (function (exports) {
25348
25350
  }];
25349
25351
  }
25350
25352
  let y;
25351
- let x1 = Math.max((sx0 + tx1) / 2, tox);
25352
- let x2 = Math.max((sx1 + tx0) / 2, sox);
25353
+ const x1 = Math.max((sx0 + tx1) / 2, tox);
25354
+ const x2 = Math.max((sx1 + tx0) / 2, sox);
25353
25355
  if (tox <= sox) {
25354
25356
  if (topD <= bottomD) {
25355
25357
  y = Math.min(smy0, toy);
@@ -26166,7 +26168,7 @@ var joint = (function (exports) {
26166
26168
  const sourcePoint = pointDataFromAnchor(linkView.sourceView, linkView.sourceAnchor, linkView.sourceBBox, sourceDirection, isSourcePort, linkView.sourceAnchor, margin);
26167
26169
  const isTargetPort = !!linkView.model.target().port;
26168
26170
  const targetPoint = pointDataFromAnchor(linkView.targetView, linkView.targetAnchor, linkView.targetBBox, targetDirection, isTargetPort, linkView.targetAnchor, margin);
26169
- let resultVertices = [];
26171
+ const resultVertices = [];
26170
26172
  if (!useVertices || vertices.length === 0) {
26171
26173
  return simplifyPoints(routeBetweenPoints(sourcePoint, targetPoint));
26172
26174
  }
@@ -27069,9 +27071,8 @@ var joint = (function (exports) {
27069
27071
  if (cellNamespace) {
27070
27072
  this.cellNamespace = cellNamespace;
27071
27073
  } else {
27072
- /* eslint-disable no-undef */
27074
+ // eslint-disable-next-line no-undef
27073
27075
  this.cellNamespace = typeof joint !== 'undefined' && has(joint, 'shapes') ? joint.shapes : null;
27074
- /* eslint-enable no-undef */
27075
27076
  }
27076
27077
  this.graph = graph;
27077
27078
  },
@@ -28048,9 +28049,11 @@ var joint = (function (exports) {
28048
28049
  */
28049
28050
  _getBeforeLayerIdFromOptions(options, layer = null) {
28050
28051
  let {
28051
- before = null,
28052
28052
  index
28053
28053
  } = options;
28054
+ const {
28055
+ before = null
28056
+ } = options;
28054
28057
  if (before && index !== undefined) {
28055
28058
  throw new Error('dia.Graph: Options "before" and "index" are mutually exclusive.');
28056
28059
  }
@@ -28962,7 +28965,7 @@ var joint = (function (exports) {
28962
28965
  }, {});
28963
28966
  function evalAttributes(attrs, refBBox) {
28964
28967
  const evalAttrs = {};
28965
- for (let attrName in attrs) {
28968
+ for (const attrName in attrs) {
28966
28969
  if (!attrs.hasOwnProperty(attrName)) continue;
28967
28970
  evalAttrs[attrName] = evalAttribute(attrName, attrs[attrName], refBBox);
28968
28971
  }
@@ -31808,7 +31811,7 @@ var joint = (function (exports) {
31808
31811
  } = this;
31809
31812
  const selectors = _labelSelectors[index];
31810
31813
  if (!selectors) return;
31811
- for (let selector in selectors) {
31814
+ for (const selector in selectors) {
31812
31815
  const {
31813
31816
  id
31814
31817
  } = selectors[selector];
@@ -33088,7 +33091,7 @@ var joint = (function (exports) {
33088
33091
  el,
33089
33092
  pivotNodes
33090
33093
  } = this;
33091
- for (let z in pivotNodes) el.removeChild(pivotNodes[z]);
33094
+ for (const z in pivotNodes) el.removeChild(pivotNodes[z]);
33092
33095
  this.pivotNodes = {};
33093
33096
  },
33094
33097
  isEmpty: function () {
@@ -34061,9 +34064,8 @@ var joint = (function (exports) {
34061
34064
  options
34062
34065
  } = this;
34063
34066
  if (!options.cellViewNamespace) {
34064
- /* eslint-disable no-undef */
34067
+ // eslint-disable-next-line no-undef
34065
34068
  options.cellViewNamespace = typeof joint !== 'undefined' && has(joint, 'shapes') ? joint.shapes : null;
34066
- /* eslint-enable no-undef */
34067
34069
  }
34068
34070
  const defaultLayerViewNamespace = {
34069
34071
  LayerView,
@@ -34127,6 +34129,9 @@ var joint = (function (exports) {
34127
34129
  var position = opt.position;
34128
34130
  if (this.isAsync() || !isNumber(position)) {
34129
34131
  this.renderView(cell, opt);
34132
+ // Wake up the paper in case it was idle
34133
+ // When using initializeUnmounted: true the paper won't wake up by itself
34134
+ this.wakeUp();
34130
34135
  } else {
34131
34136
  if (opt.maxPosition === position) this.freeze({
34132
34137
  key: 'addCells'
@@ -34272,11 +34277,11 @@ var joint = (function (exports) {
34272
34277
  } = options;
34273
34278
 
34274
34279
  // Default cellView namespace for ES5
34275
- /* eslint-disable no-undef */
34280
+ // eslint-disable-next-line no-undef
34276
34281
  if (!cellViewNamespace && typeof joint !== 'undefined' && has(joint, 'shapes')) {
34282
+ // eslint-disable-next-line no-undef
34277
34283
  options.cellViewNamespace = joint.shapes;
34278
34284
  }
34279
- /* eslint-enable no-undef */
34280
34285
 
34281
34286
  // Here if a function was provided, we can not clone it, as this would result in loosing the function.
34282
34287
  // If the default is used, the cloning is necessary in order to prevent modifying the options on prototype.
@@ -34504,8 +34509,10 @@ var joint = (function (exports) {
34504
34509
  * Helper method for addLayerView and moveLayerView methods
34505
34510
  */
34506
34511
  _getBeforeLayerViewFromOptions(layerView, options) {
34512
+ const {
34513
+ before = null
34514
+ } = options;
34507
34515
  let {
34508
- before = null,
34509
34516
  index
34510
34517
  } = options;
34511
34518
  if (before && index !== undefined) {
@@ -34951,7 +34958,7 @@ var joint = (function (exports) {
34951
34958
  delete prevPriorityUpdates[cid];
34952
34959
  }
34953
34960
  }
34954
- let currentType = priorityUpdates[cid] || 0;
34961
+ const currentType = priorityUpdates[cid] || 0;
34955
34962
  // Prevent cycling
34956
34963
  if ((currentType & type) === type) return;
34957
34964
  if (!currentType) updates.count++;
@@ -35097,7 +35104,7 @@ var joint = (function (exports) {
35097
35104
  let i = priorityIndexes.length;
35098
35105
  while (i > 0 && i--) {
35099
35106
  // a faster way how to check if an object is empty
35100
- for (let _key in priorities[priorityIndexes[i]]) return true;
35107
+ for (const _key in priorities[priorityIndexes[i]]) return true;
35101
35108
  }
35102
35109
  return false;
35103
35110
  },
@@ -35416,10 +35423,13 @@ var joint = (function (exports) {
35416
35423
  var updates = this._updates;
35417
35424
  var unmountedList = updates.unmountedList;
35418
35425
  for (var i = 0, n = Math.min(unmountedList.length, batchSize); i < n; i++) {
35426
+ // stop if there are no more unmounted views
35427
+ // this can happen when another view was mounted in the onViewUpdate() callback
35428
+ if (unmountedList.length === 0) break;
35419
35429
  const {
35420
35430
  key: cid
35421
35431
  } = unmountedList.peekHead();
35422
- let view = views[cid] || this._viewPlaceholders[cid];
35432
+ const view = views[cid] || this._viewPlaceholders[cid];
35423
35433
  if (!view) {
35424
35434
  // This should not occur
35425
35435
  // Prevent looping over this invalid cid
@@ -35654,8 +35664,8 @@ var joint = (function (exports) {
35654
35664
  width: currentWidth,
35655
35665
  height: currentHeight
35656
35666
  } = options;
35657
- let w = width === undefined ? currentWidth : width;
35658
- let h = height === undefined ? currentHeight : height;
35667
+ const w = width === undefined ? currentWidth : width;
35668
+ const h = height === undefined ? currentHeight : height;
35659
35669
  if (currentWidth === w && currentHeight === h) return;
35660
35670
  options.width = w;
35661
35671
  options.height = h;
@@ -36529,7 +36539,9 @@ var joint = (function (exports) {
36529
36539
 
36530
36540
  resolveHighlighter: function (opt = {}) {
36531
36541
  let {
36532
- highlighter: highlighterDef,
36542
+ highlighter: highlighterDef
36543
+ } = opt;
36544
+ const {
36533
36545
  type
36534
36546
  } = opt;
36535
36547
  const {
@@ -38278,7 +38290,7 @@ var joint = (function (exports) {
38278
38290
  const isSingleVertex = data.originalVertices.length === 1;
38279
38291
  const origVIndex = isSingleVertex ? 0 : handleIndex;
38280
38292
  const additionalOffset = data.firstHandleShifted && !isSingleVertex ? 1 : 0;
38281
- let nextVIndex = 1 + indexOffset;
38293
+ const nextVIndex = 1 + indexOffset;
38282
38294
  vertices.splice(handleIndex + nextVIndex, 0, data.originalVertices[origVIndex - additionalOffset]);
38283
38295
  }
38284
38296
  }
@@ -38880,7 +38892,7 @@ var joint = (function (exports) {
38880
38892
  } = this;
38881
38893
  handleNode.setAttribute('transform', this.getHandleTransformString());
38882
38894
  if (handleAttributes) {
38883
- for (let attrName in handleAttributes) {
38895
+ for (const attrName in handleAttributes) {
38884
38896
  handleNode.setAttribute(attrName, handleAttributes[attrName]);
38885
38897
  }
38886
38898
  }
@@ -39078,7 +39090,9 @@ var joint = (function (exports) {
39078
39090
  const labelPosition = this.getLabelPosition(label);
39079
39091
  const coords = view.getLabelCoordinates(labelPosition);
39080
39092
  let {
39081
- angle = 0,
39093
+ angle = 0
39094
+ } = labelPosition;
39095
+ const {
39082
39096
  args = {}
39083
39097
  } = labelPosition;
39084
39098
  const keepGradient = args.keepGradient;
@@ -39160,15 +39174,18 @@ var joint = (function (exports) {
39160
39174
  const {
39161
39175
  relatedView: view
39162
39176
  } = this;
39177
+ const toolOptions = getToolOptions(this);
39163
39178
  let {
39164
39179
  x = 0,
39165
- y = 0,
39166
- offset = {},
39180
+ y = 0
39181
+ } = toolOptions;
39182
+ const {
39167
39183
  useModelGeometry,
39184
+ offset = {},
39168
39185
  rotate,
39169
39186
  scale,
39170
39187
  relative
39171
- } = getToolOptions(this);
39188
+ } = toolOptions;
39172
39189
  let bbox = getViewBBox(view, {
39173
39190
  useModelGeometry,
39174
39191
  relative
@@ -39606,11 +39623,12 @@ var joint = (function (exports) {
39606
39623
  const {
39607
39624
  relatedView: view
39608
39625
  } = this;
39609
- let {
39626
+ const {
39610
39627
  useModelGeometry,
39611
39628
  relative,
39612
- trackPath = 'M 0 0 H calc(w) V calc(h) H 0 Z'
39629
+ trackPath: initialTrackPath = 'M 0 0 H calc(w) V calc(h) H 0 Z'
39613
39630
  } = getToolOptions(this);
39631
+ let trackPath = initialTrackPath;
39614
39632
  if (typeof trackPath === 'function') {
39615
39633
  trackPath = trackPath.call(this, view);
39616
39634
  }
@@ -39631,7 +39649,7 @@ var joint = (function (exports) {
39631
39649
  const {
39632
39650
  relatedView: view
39633
39651
  } = this;
39634
- let {
39652
+ const {
39635
39653
  useModelGeometry,
39636
39654
  rotate
39637
39655
  } = getToolOptions(this);
@@ -39657,7 +39675,7 @@ var joint = (function (exports) {
39657
39675
  Remove: Remove
39658
39676
  };
39659
39677
 
39660
- var version = "4.2.2";
39678
+ var version = "4.2.3";
39661
39679
 
39662
39680
  const Vectorizer = V;
39663
39681
  const layout$1 = {