Skip to content

Commit

Permalink
24.4.7 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed May 23, 2024
1 parent d575ea7 commit aa42ebb
Show file tree
Hide file tree
Showing 12 changed files with 374 additions and 353 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
23-MAY-2024: 24.4.7

- Fixes possible NPE for inserted pages
- Forces XML update for inserted default root and layer
- [vsdx] Another trial to fix edge as a group [drawio-1722]
- [conf cloud] Potential fix for copy/paste in draft pages [DID-11494]
- Fixes possible empty diagram node in mxfile [DID-11645]

22-MAY-2024: 24.4.6

- Fixes possible NPE in Graph.initTouch
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.4.6
24.4.7
5 changes: 3 additions & 2 deletions src/main/webapp/js/diagramly/DrawioFileSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -1497,8 +1497,9 @@ DrawioFileSync.prototype.fastForward = function(desc)

for (var i = 0; i < this.file.ownPages.length; i++)
{
if (this.ui.getHashValueForPages([this.file.ownPages[i]]) !=
this.ui.getHashValueForPages([prevOwnPages[i]]))
if (prevOwnPages[i] != null &&
(this.ui.getHashValueForPages([this.file.ownPages[i]]) !=
this.ui.getHashValueForPages([prevOwnPages[i]])))
{
this.file.ownPages[i].needsUpdate = true;
}
Expand Down
9 changes: 7 additions & 2 deletions src/main/webapp/js/diagramly/Pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -1092,14 +1092,16 @@ EditorUi.prototype.updatePageRoot = function(page, checked)
// Sets default cell IDs
page.root.setId('0');
page.root.children[0].setId('1');

// Marks the page as needing an update
page.needsUpdate = true;
}
}
else if (page.viewState == null)
{
if (page.graphModelNode == null)
{
var node = this.editor.extractGraphModel(page.node);

var cause = Editor.extractParserError(node);

if (cause)
Expand All @@ -1124,6 +1126,9 @@ EditorUi.prototype.updatePageRoot = function(page, checked)
var layer = new mxCell();
layer.setId('1');
page.root.insert(layer);

// Marks the page as needing an update
page.needsUpdate = true;
}

return page;
Expand Down Expand Up @@ -1457,7 +1462,7 @@ EditorUi.prototype.initDiagramNode = function(page, node)
}

this.editor.graph.saveViewState(page.viewState, node);
EditorUi.removeChildNodes(this.currentPage.node);
EditorUi.removeChildNodes(page.node);
page.node.appendChild(node);
};

Expand Down
20 changes: 14 additions & 6 deletions src/main/webapp/js/diagramly/vsdx/importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,15 @@ var com;

return v1;
}
else {
else
{
// When an edge is a group, we need to process the children (and keep the edge, so no fill (color) for the group)
// TODO Not the best results (e.g, an extra edge is added in some cases), but covers most cases
if (shape.isGroup())
{
this.addGroup(graph, shape, parent, pageId, parentHeight, true);
}

shape.setShapeIndex(graph.getModel().getChildCount(parent));
/* put */ (function (m, k, v) { if (m.entries == null)
m.entries = []; for (var i = 0; i < m.entries.length; i++)
Expand Down Expand Up @@ -1027,16 +1035,16 @@ var com;
* @param {com.mxgraph.io.vsdx.VsdxShape} shape
* @param {number} pageId
*/
mxVsdxCodec.prototype.addGroup = function (graph, shape, parent, pageId, parentHeight) {
mxVsdxCodec.prototype.addGroup = function (graph, shape, parent, pageId, parentHeight, forceNoFill) {
var d = shape.getDimensions();
var master = shape.getMaster();
var styleMap = shape.getStyleFromShape();
var geomList = shape.getGeomList();
if (geomList.isNoFill()) {
if (geomList.isNoFill() || forceNoFill) {
/* put */ (styleMap[mxConstants.STYLE_FILLCOLOR] = "none");
/* put */ (styleMap[mxConstants.STYLE_GRADIENTCOLOR] = "none");
}
if (geomList.isNoLine()) {
if (geomList.isNoLine() || forceNoFill) {
/* put */ (styleMap[mxConstants.STYLE_STROKECOLOR] = "none");
}
/* put */ (styleMap["html"] = "1");
Expand Down Expand Up @@ -10111,8 +10119,8 @@ var com;

// TODO It's hard to detect edges that should be treated like vertexes whhen they are groups and have child shapes.
// TODO Check this again if more complains are received or if we can have an edge group
_this.vertex = vertex || (!page.connectsMap[_this.Id] && (_this.childShapes != null && !(function (m) { if (m.entries == null)
m.entries = []; return m.entries.length == 0; })(_this.childShapes)) || (_this.geomList != null && (!_this.geomList.isNoFill() || _this.geomList.getGeoCount() > 1)));
_this.vertex = vertex; //|| (!page.connectsMap[_this.Id] && (_this.childShapes != null && !(function (m) { if (m.entries == null)
//m.entries = []; return m.entries.length == 0; })(_this.childShapes)) || (_this.geomList != null && (!_this.geomList.isNoFill() || _this.geomList.getGeoCount() > 1)));
_this.layerMember = _this.getValue(_this.getCellElement$java_lang_String("LayerMember"));

if (_this.layerMember)
Expand Down
Loading

0 comments on commit aa42ebb

Please sign in to comment.