Skip to content

Commit

Permalink
Release v3.7.7 (#2384)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbynekstara authored Nov 7, 2023
1 parent c314a3d commit 59647a9
Show file tree
Hide file tree
Showing 37 changed files with 182 additions and 103 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
07-11-2023 (v3.7.7)

* dia.Paper - fix custom events on link label
* util.breakText - fix hyphenation regex to take international characters into account

20-10-2023 (v3.7.6)

* dia.Cell - make prop()'s internal set() call more efficient
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.7.6 (2023-10-20) - JavaScript diagramming library
/*! JointJS v3.7.7 (2023-11-07) - 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.

68 changes: 46 additions & 22 deletions dist/joint.core.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! JointJS v3.7.6 (2023-10-20) - JavaScript diagramming library
/*! JointJS v3.7.7 (2023-11-07) - JavaScript diagramming library


This Source Code Form is subject to the terms of the Mozilla Public
Expand Down Expand Up @@ -13673,7 +13673,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
// If separator is a RegExp, we use the space character to join words together again (not ideal)
var separatorChar = (typeof separator === 'string') ? separator : space;
var eol = opt.eol || '\n';
var hyphen = opt.hyphen ? new RegExp(opt.hyphen) : /[^\w\d]/;
var hyphen = opt.hyphen ? new RegExp(opt.hyphen) : /[^\w\d\u00C0-\u1FFF\u2800-\uFFFD]/;
var maxLineCount = opt.maxLineCount;
if (!isNumber(maxLineCount)) { maxLineCount = Infinity; }

Expand Down Expand Up @@ -34373,22 +34373,12 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
view.preventDefaultInteraction(evt);
}

var rootViewEl = view.el;

// Custom event
var eventNode = target.closest('[event]');
if (eventNode && rootViewEl !== eventNode && view.el.contains(eventNode)) {
var eventEvt = normalizeEvent($.Event(evt.originalEvent, {
data: evt.data,
// Originally the event listener was attached to the event element.
currentTarget: eventNode
}));
this.onevent(eventEvt);
if (eventEvt.isDefaultPrevented()) {
evt.preventDefault();
}
// `onevent` can stop propagation
var eventEvt = this.customEventTrigger(evt, view);
if (eventEvt) {
// `onevent` could have stopped propagation
if (eventEvt.isPropagationStopped()) { return; }

evt.data = eventEvt.data;
}

Expand Down Expand Up @@ -34722,15 +34712,24 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
onlabel: function(evt) {

var labelNode = evt.currentTarget;

var view = this.findView(labelNode);
if (view) {
if (!view) { return; }

evt = normalizeEvent(evt);
if (this.guard(evt, view)) { return; }
evt = normalizeEvent(evt);
if (this.guard(evt, view)) { return; }

var localPoint = this.snapToGrid(evt.clientX, evt.clientY);
view.onlabel(evt, localPoint.x, localPoint.y);
// Custom event
var eventEvt = this.customEventTrigger(evt, view, labelNode);
if (eventEvt) {
// `onevent` could have stopped propagation
if (eventEvt.isPropagationStopped()) { return; }

evt.data = eventEvt.data;
}

var localPoint = this.snapToGrid(evt.clientX, evt.clientY);
view.onlabel(evt, localPoint.x, localPoint.y);
},

getPointerArgs: function getPointerArgs(evt) {
Expand Down Expand Up @@ -35253,6 +35252,31 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
markerContentVEl.appendTo(markerVEl);
markerVEl.appendTo(defs);
return id;
},

customEventTrigger: function(evt, view, rootNode) {
if ( rootNode === void 0 ) rootNode = view.el;


var eventNode = evt.target.closest('[event]');

if (eventNode && rootNode !== eventNode && view.el.contains(eventNode)) {
var eventEvt = normalizeEvent($.Event(evt.originalEvent, {
data: evt.data,
// Originally the event listener was attached to the event element.
currentTarget: eventNode
}));

this.onevent(eventEvt);

if (eventEvt.isDefaultPrevented()) {
evt.preventDefault();
}

return eventEvt;
}

return null;
}

}, {
Expand Down Expand Up @@ -37368,7 +37392,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
Control: Control
});

var version = "3.7.6";
var version = "3.7.7";

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.

4 changes: 3 additions & 1 deletion dist/joint.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! JointJS v3.7.6 (2023-10-20) - JavaScript diagramming library
/*! JointJS v3.7.7 (2023-11-07) - JavaScript diagramming library
This Source Code Form is subject to the terms of the Mozilla Public
Expand Down Expand Up @@ -2919,6 +2919,8 @@ export namespace dia {
protected insertView(cellView: CellView, isInitialInsert: boolean): void;

protected detachView(cellView: CellView): void;

protected customEventTrigger(event: dia.Event, view: CellView, rootNode?: SVGElement): dia.Event | null;
}

namespace PaperLayer {
Expand Down
68 changes: 46 additions & 22 deletions dist/joint.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! JointJS v3.7.6 (2023-10-20) - JavaScript diagramming library
/*! JointJS v3.7.7 (2023-11-07) - JavaScript diagramming library


This Source Code Form is subject to the terms of the Mozilla Public
Expand Down Expand Up @@ -13961,7 +13961,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
// If separator is a RegExp, we use the space character to join words together again (not ideal)
var separatorChar = (typeof separator === 'string') ? separator : space;
var eol = opt.eol || '\n';
var hyphen = opt.hyphen ? new RegExp(opt.hyphen) : /[^\w\d]/;
var hyphen = opt.hyphen ? new RegExp(opt.hyphen) : /[^\w\d\u00C0-\u1FFF\u2800-\uFFFD]/;
var maxLineCount = opt.maxLineCount;
if (!isNumber(maxLineCount)) { maxLineCount = Infinity; }

Expand Down Expand Up @@ -33289,22 +33289,12 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
view.preventDefaultInteraction(evt);
}

var rootViewEl = view.el;

// Custom event
var eventNode = target.closest('[event]');
if (eventNode && rootViewEl !== eventNode && view.el.contains(eventNode)) {
var eventEvt = normalizeEvent($.Event(evt.originalEvent, {
data: evt.data,
// Originally the event listener was attached to the event element.
currentTarget: eventNode
}));
this.onevent(eventEvt);
if (eventEvt.isDefaultPrevented()) {
evt.preventDefault();
}
// `onevent` can stop propagation
var eventEvt = this.customEventTrigger(evt, view);
if (eventEvt) {
// `onevent` could have stopped propagation
if (eventEvt.isPropagationStopped()) { return; }

evt.data = eventEvt.data;
}

Expand Down Expand Up @@ -33638,15 +33628,24 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
onlabel: function(evt) {

var labelNode = evt.currentTarget;

var view = this.findView(labelNode);
if (view) {
if (!view) { return; }

evt = normalizeEvent(evt);
if (this.guard(evt, view)) { return; }
evt = normalizeEvent(evt);
if (this.guard(evt, view)) { return; }

var localPoint = this.snapToGrid(evt.clientX, evt.clientY);
view.onlabel(evt, localPoint.x, localPoint.y);
// Custom event
var eventEvt = this.customEventTrigger(evt, view, labelNode);
if (eventEvt) {
// `onevent` could have stopped propagation
if (eventEvt.isPropagationStopped()) { return; }

evt.data = eventEvt.data;
}

var localPoint = this.snapToGrid(evt.clientX, evt.clientY);
view.onlabel(evt, localPoint.x, localPoint.y);
},

getPointerArgs: function getPointerArgs(evt) {
Expand Down Expand Up @@ -34169,6 +34168,31 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
markerContentVEl.appendTo(markerVEl);
markerVEl.appendTo(defs);
return id;
},

customEventTrigger: function(evt, view, rootNode) {
if ( rootNode === void 0 ) rootNode = view.el;


var eventNode = evt.target.closest('[event]');

if (eventNode && rootNode !== eventNode && view.el.contains(eventNode)) {
var eventEvt = normalizeEvent($.Event(evt.originalEvent, {
data: evt.data,
// Originally the event listener was attached to the event element.
currentTarget: eventNode
}));

this.onevent(eventEvt);

if (eventEvt.isDefaultPrevented()) {
evt.preventDefault();
}

return eventEvt;
}

return null;
}

}, {
Expand Down Expand Up @@ -38952,7 +38976,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
Control: Control
});

var version = "3.7.6";
var version = "3.7.7";

var Vectorizer = V;
var layout = { PortLabel: PortLabel, Port: Port };
Expand Down
2 changes: 1 addition & 1 deletion dist/joint.layout.DirectedGraph.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! JointJS v3.7.6 (2023-10-20) - JavaScript diagramming library
/*! JointJS v3.7.7 (2023-11-07) - 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/joint.layout.DirectedGraph.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.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.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 59647a9

Please sign in to comment.