Skip to content

Commit 59647a9

Browse files
authored
Release v3.7.7 (#2384)
1 parent c314a3d commit 59647a9

37 files changed

+182
-103
lines changed

CHANGELOG

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
07-11-2023 (v3.7.7)
2+
3+
* dia.Paper - fix custom events on link label
4+
* util.breakText - fix hyphenation regex to take international characters into account
5+
16
20-10-2023 (v3.7.6)
27

38
* dia.Cell - make prop()'s internal set() call more efficient

dist/geometry.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! JointJS v3.7.6 (2023-10-20) - JavaScript diagramming library
1+
/*! JointJS v3.7.7 (2023-11-07) - JavaScript diagramming library
22
33
44
This Source Code Form is subject to the terms of the Mozilla Public

dist/geometry.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/joint.core.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/joint.core.js

+46-22
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! JointJS v3.7.6 (2023-10-20) - JavaScript diagramming library
1+
/*! JointJS v3.7.7 (2023-11-07) - JavaScript diagramming library
22

33

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

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

34376-
var rootViewEl = view.el;
34377-
3437834376
// Custom event
34379-
var eventNode = target.closest('[event]');
34380-
if (eventNode && rootViewEl !== eventNode && view.el.contains(eventNode)) {
34381-
var eventEvt = normalizeEvent($.Event(evt.originalEvent, {
34382-
data: evt.data,
34383-
// Originally the event listener was attached to the event element.
34384-
currentTarget: eventNode
34385-
}));
34386-
this.onevent(eventEvt);
34387-
if (eventEvt.isDefaultPrevented()) {
34388-
evt.preventDefault();
34389-
}
34390-
// `onevent` can stop propagation
34377+
var eventEvt = this.customEventTrigger(evt, view);
34378+
if (eventEvt) {
34379+
// `onevent` could have stopped propagation
3439134380
if (eventEvt.isPropagationStopped()) { return; }
34381+
3439234382
evt.data = eventEvt.data;
3439334383
}
3439434384

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

3472434714
var labelNode = evt.currentTarget;
34715+
3472534716
var view = this.findView(labelNode);
34726-
if (view) {
34717+
if (!view) { return; }
3472734718

34728-
evt = normalizeEvent(evt);
34729-
if (this.guard(evt, view)) { return; }
34719+
evt = normalizeEvent(evt);
34720+
if (this.guard(evt, view)) { return; }
3473034721

34731-
var localPoint = this.snapToGrid(evt.clientX, evt.clientY);
34732-
view.onlabel(evt, localPoint.x, localPoint.y);
34722+
// Custom event
34723+
var eventEvt = this.customEventTrigger(evt, view, labelNode);
34724+
if (eventEvt) {
34725+
// `onevent` could have stopped propagation
34726+
if (eventEvt.isPropagationStopped()) { return; }
34727+
34728+
evt.data = eventEvt.data;
3473334729
}
34730+
34731+
var localPoint = this.snapToGrid(evt.clientX, evt.clientY);
34732+
view.onlabel(evt, localPoint.x, localPoint.y);
3473434733
},
3473534734

3473634735
getPointerArgs: function getPointerArgs(evt) {
@@ -35253,6 +35252,31 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
3525335252
markerContentVEl.appendTo(markerVEl);
3525435253
markerVEl.appendTo(defs);
3525535254
return id;
35255+
},
35256+
35257+
customEventTrigger: function(evt, view, rootNode) {
35258+
if ( rootNode === void 0 ) rootNode = view.el;
35259+
35260+
35261+
var eventNode = evt.target.closest('[event]');
35262+
35263+
if (eventNode && rootNode !== eventNode && view.el.contains(eventNode)) {
35264+
var eventEvt = normalizeEvent($.Event(evt.originalEvent, {
35265+
data: evt.data,
35266+
// Originally the event listener was attached to the event element.
35267+
currentTarget: eventNode
35268+
}));
35269+
35270+
this.onevent(eventEvt);
35271+
35272+
if (eventEvt.isDefaultPrevented()) {
35273+
evt.preventDefault();
35274+
}
35275+
35276+
return eventEvt;
35277+
}
35278+
35279+
return null;
3525635280
}
3525735281

3525835282
}, {
@@ -37368,7 +37392,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
3736837392
Control: Control
3736937393
});
3737037394

37371-
var version = "3.7.6";
37395+
var version = "3.7.7";
3737237396

3737337397
var Vectorizer = V;
3737437398
var layout = { PortLabel: PortLabel, Port: Port };

dist/joint.core.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/joint.core.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/joint.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/joint.d.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! JointJS v3.7.6 (2023-10-20) - JavaScript diagramming library
1+
/*! JointJS v3.7.7 (2023-11-07) - JavaScript diagramming library
22
33
44
This Source Code Form is subject to the terms of the Mozilla Public
@@ -2919,6 +2919,8 @@ export namespace dia {
29192919
protected insertView(cellView: CellView, isInitialInsert: boolean): void;
29202920

29212921
protected detachView(cellView: CellView): void;
2922+
2923+
protected customEventTrigger(event: dia.Event, view: CellView, rootNode?: SVGElement): dia.Event | null;
29222924
}
29232925

29242926
namespace PaperLayer {

dist/joint.js

+46-22
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! JointJS v3.7.6 (2023-10-20) - JavaScript diagramming library
1+
/*! JointJS v3.7.7 (2023-11-07) - JavaScript diagramming library
22

33

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

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

33292-
var rootViewEl = view.el;
33293-
3329433292
// Custom event
33295-
var eventNode = target.closest('[event]');
33296-
if (eventNode && rootViewEl !== eventNode && view.el.contains(eventNode)) {
33297-
var eventEvt = normalizeEvent($.Event(evt.originalEvent, {
33298-
data: evt.data,
33299-
// Originally the event listener was attached to the event element.
33300-
currentTarget: eventNode
33301-
}));
33302-
this.onevent(eventEvt);
33303-
if (eventEvt.isDefaultPrevented()) {
33304-
evt.preventDefault();
33305-
}
33306-
// `onevent` can stop propagation
33293+
var eventEvt = this.customEventTrigger(evt, view);
33294+
if (eventEvt) {
33295+
// `onevent` could have stopped propagation
3330733296
if (eventEvt.isPropagationStopped()) { return; }
33297+
3330833298
evt.data = eventEvt.data;
3330933299
}
3331033300

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

3364033630
var labelNode = evt.currentTarget;
33631+
3364133632
var view = this.findView(labelNode);
33642-
if (view) {
33633+
if (!view) { return; }
3364333634

33644-
evt = normalizeEvent(evt);
33645-
if (this.guard(evt, view)) { return; }
33635+
evt = normalizeEvent(evt);
33636+
if (this.guard(evt, view)) { return; }
3364633637

33647-
var localPoint = this.snapToGrid(evt.clientX, evt.clientY);
33648-
view.onlabel(evt, localPoint.x, localPoint.y);
33638+
// Custom event
33639+
var eventEvt = this.customEventTrigger(evt, view, labelNode);
33640+
if (eventEvt) {
33641+
// `onevent` could have stopped propagation
33642+
if (eventEvt.isPropagationStopped()) { return; }
33643+
33644+
evt.data = eventEvt.data;
3364933645
}
33646+
33647+
var localPoint = this.snapToGrid(evt.clientX, evt.clientY);
33648+
view.onlabel(evt, localPoint.x, localPoint.y);
3365033649
},
3365133650

3365233651
getPointerArgs: function getPointerArgs(evt) {
@@ -34169,6 +34168,31 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
3416934168
markerContentVEl.appendTo(markerVEl);
3417034169
markerVEl.appendTo(defs);
3417134170
return id;
34171+
},
34172+
34173+
customEventTrigger: function(evt, view, rootNode) {
34174+
if ( rootNode === void 0 ) rootNode = view.el;
34175+
34176+
34177+
var eventNode = evt.target.closest('[event]');
34178+
34179+
if (eventNode && rootNode !== eventNode && view.el.contains(eventNode)) {
34180+
var eventEvt = normalizeEvent($.Event(evt.originalEvent, {
34181+
data: evt.data,
34182+
// Originally the event listener was attached to the event element.
34183+
currentTarget: eventNode
34184+
}));
34185+
34186+
this.onevent(eventEvt);
34187+
34188+
if (eventEvt.isDefaultPrevented()) {
34189+
evt.preventDefault();
34190+
}
34191+
34192+
return eventEvt;
34193+
}
34194+
34195+
return null;
3417234196
}
3417334197

3417434198
}, {
@@ -38952,7 +38976,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
3895238976
Control: Control
3895338977
});
3895438978

38955-
var version = "3.7.6";
38979+
var version = "3.7.7";
3895638980

3895738981
var Vectorizer = V;
3895838982
var layout = { PortLabel: PortLabel, Port: Port };

dist/joint.layout.DirectedGraph.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! JointJS v3.7.6 (2023-10-20) - JavaScript diagramming library
1+
/*! JointJS v3.7.7 (2023-11-07) - JavaScript diagramming library
22
33
44
This Source Code Form is subject to the terms of the Mozilla Public

dist/joint.layout.DirectedGraph.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/joint.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/joint.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)