Skip to content

Commit

Permalink
24.0.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Mar 6, 2024
1 parent d9782fa commit 62c0b20
Show file tree
Hide file tree
Showing 15 changed files with 2,853 additions and 2,799 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
05-MAR-2024: 24.0.2

- Fixes DRAWIO_SERVER_URL if query string contains forward slash
- Handles double-quotes in page URLs
- Fixes waypoints for grouped edges [drawio-desktop-1646]
- Fixes ignored null bytes in mxUtils.trim

02-MAR-2024: 24.0.1

- Updates DOMPurify from 3.0.8 to 3.0.9
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.0.1
24.0.2
4 changes: 2 additions & 2 deletions src/main/mxgraph/util/mxUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3021,7 +3021,7 @@ var mxUtils =
*/
ltrim: function(str, chars)
{
chars = chars || "\\s";
chars = chars || "\\s|\\0";

return (str != null) ? str.replace(new RegExp("^[" + chars + "]+", "g"), "") : null;
},
Expand All @@ -3041,7 +3041,7 @@ var mxUtils =
*/
rtrim: function(str, chars)
{
chars = chars || "\\s";
chars = chars || "\\s|\\0";

return (str != null) ? str.replace(new RegExp("[" + chars + "]+$", "g"), "") : null;
},
Expand Down
34 changes: 21 additions & 13 deletions src/main/mxgraph/view/mxGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -4025,6 +4025,9 @@ mxGraph.prototype.groupCells = function(group, border, cells)
this.model.setGeometry(group, new mxGeometry());
}

// Resizes the group
this.cellsResized([group], [bounds], false);

// Adds the group into the parent
var index = this.model.getChildCount(parent);
this.cellsAdded([group], parent, index, null, null, false, false, false);
Expand All @@ -4033,10 +4036,7 @@ mxGraph.prototype.groupCells = function(group, border, cells)
index = this.model.getChildCount(group);
this.cellsAdded(cells, group, index, null, null, false, false, false);
this.cellsMoved(cells, -bounds.x, -bounds.y, false, false, false);

// Resizes the group
this.cellsResized([group], [bounds], false);


this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS,
'group', group, 'border', border, 'cells', cells));
}
Expand Down Expand Up @@ -4855,7 +4855,19 @@ mxGraph.prototype.cellsAdded = function(cells, parent, index, source, target, ab
index--;
}

// Stops maintaining edge parent on edges that are being added
var updateEdgeParent = this.model.updateEdgeParent;

this.model.updateEdgeParent = function(edge, root)
{
if (mxUtils.indexOf(cells, edge) < 0)
{
updateEdgeParent.apply(this, arguments);
}
};

this.model.add(parent, cells[i], index + i);
this.model.updateEdgeParent = updateEdgeParent;

if (this.autoSizeCellsOnAdd)
{
Expand Down Expand Up @@ -7687,13 +7699,13 @@ mxGraph.prototype.getBoundingBoxFromGeometry = function(cells, includeEdges,
{
if (pt != null)
{
if (tmp == null)
if (bbox == null)
{
tmp = new mxRectangle(pt.x, pt.y, 0, 0);
bbox = new mxRectangle(pt.x, pt.y, 0, 0);
}
else
{
tmp.add(new mxRectangle(pt.x, pt.y, 0, 0));
bbox.add(new mxRectangle(pt.x, pt.y, 0, 0));
}
}
};
Expand All @@ -7710,18 +7722,14 @@ mxGraph.prototype.getBoundingBoxFromGeometry = function(cells, includeEdges,

var pts = geo.points;

if (pts != null && pts.length > 0)
if (pts != null)
{
var tmp = new mxRectangle(pts[0].x, pts[0].y, 0, 0);

for (var j = 1; j < pts.length; j++)
for (var j = 0; j < pts.length; j++)
{
addPoint(pts[j]);
}
}

bbox = tmp;

if (bbox != null && this.model.isVertex(parent) && mxUtils.indexOf(
(ancestors != null) ? ancestors : cells, parent) >= 0)
{
Expand Down
444 changes: 222 additions & 222 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/main/webapp/js/diagramly/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,14 @@
return mxUtils.getValue(state.style, 'flowAnimation', null) == '1';
}
},
{name: 'flowAnimationDirection', dispName: 'Flow Direction', type: 'enum', defVal: 'normal',
enumList: [{val: 'normal', dispName: 'Normal'}, {val: 'reverse', dispName: 'Reverse'},
{val: 'alternate', dispName: 'Alternate'}, {val: 'alternate-reverse', dispName: 'Alternate-Reverse'}],
isVisible: function(state)
{
return mxUtils.getValue(state.style, 'flowAnimation', null) == '1';
}
},
{name: 'editable', dispName: 'Editable', type: 'bool', defVal: true},
{name: 'metaEdit', dispName: 'Edit Dialog', type: 'bool', defVal: false},
{name: 'backgroundOutline', dispName: 'Background Outline', type: 'bool', defVal: false},
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/js/diagramly/Init.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ window.isSvgBrowser = true;
// Base URL defines cases where an absolute URL is needed (eg. embedding)
window.DRAWIO_BASE_URL = window.DRAWIO_BASE_URL || ((/.*\.draw\.io$/.test(window.location.hostname)) || (/.*\.diagrams\.net$/.test(window.location.hostname)) ?
window.location.protocol + '//' + window.location.hostname : 'https://app.diagrams.net');
window.DRAWIO_SERVER_URL = window.DRAWIO_SERVER_URL || window.location.href.substring(0, window.location.href.lastIndexOf('/')) + '/';
window.DRAWIO_SERVER_URL = window.DRAWIO_SERVER_URL || window.location.origin + window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/')) + '/';
window.DRAWIO_LIGHTBOX_URL = window.DRAWIO_LIGHTBOX_URL || 'https://viewer.diagrams.net';
window.EXPORT_URL = window.EXPORT_URL || 'https://convert.diagrams.net/node/export';
window.PLANT_URL = window.PLANT_URL || 'https://plant-aws.diagrams.net';
Expand Down
Loading

0 comments on commit 62c0b20

Please sign in to comment.