Skip to content

Commit

Permalink
Release v3.6.3 (#1909)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumilingus authored Nov 28, 2022
1 parent 85d1ab9 commit 192b83f
Show file tree
Hide file tree
Showing 37 changed files with 311 additions and 17,712 deletions.
17 changes: 12 additions & 5 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
28-11-2022 (v3.6.3)

* dia.Cell - prevent exception when `removeProp()` called on non-existing top-level attribute
* linkTools.Segments - fix non-orthogonal edge cases
* Vectorizer - fix removing & toggling multiple classes at once
* Vectorizer - remove deprecated hasFeature check

20-10-2022 (v3.6.2)

* dia.Cell: fix `isEmbeddedIn()` with `deep` option set to `false`
* util.svg: support embedded expressions
* util.svg: prevent `className` set to `null`
* dia.Cell - fix `isEmbeddedIn()` with `deep` option set to `false`
* util.svg - support embedded expressions
* util.svg - prevent `className` set to `null`

14-10-2022 (v3.6.1)

* util.breakText: prevent infinite loop when using `preserveSpaces`
* util.breakText: always account for `height` when using `preserveSpaces`
* util.breakText - prevent infinite loop when using `preserveSpaces`
* util.breakText - always account for `height` when using `preserveSpaces`

12-10-2022 (v3.6.0)

Expand Down
2 changes: 1 addition & 1 deletion dist/geometry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! JointJS v3.6.2 (2022-10-21) - JavaScript diagramming library
/*! JointJS v3.6.3 (2022-11-28) - JavaScript diagramming library
This Source Code Form is subject to the terms of the Mozilla Public
Expand Down
2 changes: 1 addition & 1 deletion dist/geometry.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/joint.core.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

100 changes: 68 additions & 32 deletions dist/joint.core.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! JointJS v3.6.2 (2022-10-21) - JavaScript diagramming library
/*! JointJS v3.6.3 (2022-11-28) - JavaScript diagramming library


This Source Code Form is subject to the terms of the Mozilla Public
Expand Down Expand Up @@ -7944,11 +7944,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.

var V = (function() {

var hasSvg = typeof window === 'object' &&
!!(
window.SVGAngle ||
document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1')
);
var hasSvg = typeof window === 'object' && !!window.SVGAngle;

// SVG support is required.
if (!hasSvg) {
Expand Down Expand Up @@ -8967,41 +8963,39 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
return this;
};

VPrototype.hasClass = function(className) {

return new RegExp('(\\s|^)' + className + '(\\s|$)').test(this.node.getAttribute('class'));
// Split a string into an array of tokens.
// https://infra.spec.whatwg.org/#ascii-whitespace
var noHTMLWhitespaceRegex = /[^\x20\t\r\n\f]+/g;
function getTokenList(str) {
if (!V.isString(str)) { return []; }
return str.trim().match(noHTMLWhitespaceRegex) || [];
}

VPrototype.hasClass = function(className) {
if (!V.isString(className)) { return false; }
return this.node.classList.contains(className.trim());
};

VPrototype.addClass = function(className) {
var ref;

if (className && !this.hasClass(className)) {
var prevClasses = this.node.getAttribute('class') || '';
this.node.setAttribute('class', (prevClasses + ' ' + className).trim());
}

(ref = this.node.classList).add.apply(ref, getTokenList(className));
return this;
};

VPrototype.removeClass = function(className) {
var ref;

if (className && this.hasClass(className)) {
var newClasses = this.node.getAttribute('class').replace(new RegExp('(\\s|^)' + className + '(\\s|$)', 'g'), '$2');
this.node.setAttribute('class', newClasses);
}

(ref = this.node.classList).remove.apply(ref, getTokenList(className));
return this;
};

VPrototype.toggleClass = function(className, toAdd) {

var toRemove = V.isUndefined(toAdd) ? this.hasClass(className) : !toAdd;

if (toRemove) {
this.removeClass(className);
} else {
this.addClass(className);
var tokens = getTokenList(className);
for (var i = 0; i < tokens.length; i++) {
this.node.classList.toggle(tokens[i], toAdd);
}

return this;
};

Expand Down Expand Up @@ -13770,7 +13764,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.

// A nested property
var nestedPath = pathArray.slice(1);
var propertyValue = cloneDeep(this.get(property));
var propertyValue = this.get(property);
if (propertyValue === undefined || propertyValue === null) { return this; }
propertyValue = cloneDeep(propertyValue);

unsetByPath(propertyValue, nestedPath, '/');

Expand Down Expand Up @@ -31575,11 +31571,49 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
var offset = (this.options.snapHandle) ? 0 : (coords[axis] - position[axis]);
var link = relatedView.model;
var vertices = cloneDeep(link.vertices());
var vertex = vertices[index$1];
var nextVertex = vertices[index$1 + 1];
var anchorFn = this.options.anchor;
if (typeof anchorFn !== 'function') { anchorFn = null; }

var handleIndex = handle.options.index;

var vertexPoints = [relatedView.sourcePoint.clone() ].concat( vertices, [relatedView.targetPoint.clone()]);
var indexOffset = 0;

// check if vertex before handle vertex exists
if (handleIndex - 1 >= 0) {
var v1 = vertexPoints[handleIndex - 1];
var v2 = vertexPoints[handleIndex];

var theta = new Line(v1, v2).vector().theta();

// check only non-orthogonal segments
if (theta % 90 !== 0) {
vertices.splice(handleIndex - 1, 0, data.originalVertices[handleIndex - 1]);
indexOffset++;
this.shiftHandleIndexes(1);
}
}

var vertex = vertices[index$1 + indexOffset];
var nextVertex = vertices[index$1 + 1 + indexOffset];

// check if vertex after handle vertex exists
if (handleIndex + 2 < vertexPoints.length) {
var v1$1 = vertexPoints[handleIndex + 1];
var v2$1 = vertexPoints[handleIndex + 2];

var theta$1 = new Line(v1$1, v2$1).vector().theta();

// check only non-orthogonal segments
if (theta$1 % 90 !== 0) {
var isSingleVertex = data.originalVertices.length === 1;
var origVIndex = isSingleVertex ? 0 : handleIndex;
var additionalOffset = data.firstHandleShifted && !isSingleVertex ? 1 : 0;
var nextVIndex = 1 + indexOffset;
vertices.splice(handleIndex + nextVIndex, 0, data.originalVertices[origVIndex - additionalOffset]);
}
}

// First Segment
var sourceView = relatedView.sourceView;
var sourceBBox = relatedView.sourceBBox;
Expand All @@ -31595,6 +31629,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
// we left the area of the source magnet for the first time
vertices.unshift(vertex);
this.shiftHandleIndexes(1);
data.firstHandleShifted = true;
deleteSourceAnchor = true;
}
} else if (index$1 === 0) {
Expand Down Expand Up @@ -31660,7 +31695,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
this.resetAnchor('target', data.targetAnchorDef);
}
}

link.vertices(vertices, { ui: true, tool: this.cid });
this.updateHandle(handle, vertex, nextVertex, offset);
if (!options.stopPropagation) { relatedView.notifyPointermove(normalizedEvent, coords.x, coords.y); }
Expand All @@ -31682,7 +31716,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
sourceAnchor: linkView.sourceAnchor.clone(),
targetAnchor: linkView.targetAnchor.clone(),
sourceAnchorDef: clone(model.prop(['source', 'anchor'])),
targetAnchorDef: clone(model.prop(['target', 'anchor']))
targetAnchorDef: clone(model.prop(['target', 'anchor'])),
originalVertices: cloneDeep(model.vertices()),
firstHandleShifted: false
});
model.startBatch('segment-move', { ui: true, tool: this.cid });
if (!options.stopPropagation) { linkView.notifyPointerdown.apply(linkView, paper.getPointerArgs(evt)); }
Expand Down Expand Up @@ -32736,7 +32772,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
Control: Control
});

var version = "3.6.2";
var version = "3.6.3";

var Vectorizer = V;
var layout = { PortLabel: PortLabel, Port: Port };
Expand Down
2 changes: 1 addition & 1 deletion dist/joint.core.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/joint.core.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/joint.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/joint.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! JointJS v3.6.2 (2022-10-21) - JavaScript diagramming library
/*! JointJS v3.6.3 (2022-11-28) - JavaScript diagramming library
This Source Code Form is subject to the terms of the Mozilla Public
Expand Down
Loading

0 comments on commit 192b83f

Please sign in to comment.