Skip to content

Commit

Permalink
24.0.6 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Mar 13, 2024
1 parent 3dc336d commit 2e1b677
Show file tree
Hide file tree
Showing 16 changed files with 3,129 additions and 3,078 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
13-MAR-2024: 24.0.6

- Moves subtree when tree is collapsed [drawio-3113]
- Fixes ignored given local filename [drawio-3555]
- Fixes possible NPE in Graph.executeCustomActions
- Fixes event handling on background pages
- Fixes %length% placeholder in child edge labels [drawio-1677]

11-MAR-2024: 24.0.5

- Adds checkbox for text shadow [drawio-4247]
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
24.0.5
24.0.6
11 changes: 4 additions & 7 deletions src/main/mxgraph/view/mxGraphView.js
Expand Up @@ -2520,17 +2520,14 @@ mxGraphView.prototype.getDecoratorPane = function()
mxGraphView.prototype.isContainerEvent = function(evt)
{
var source = mxEvent.getSource(evt);

return (source == this.graph.container ||
source.parentNode == this.backgroundPane ||
(source.parentNode != null &&
source.parentNode.parentNode == this.backgroundPane) ||

return source == this.graph.container ||
this.backgroundPane.contains(source) ||
source == this.canvas.parentNode ||
source == this.canvas ||
source == this.backgroundPane ||
source == this.drawPane ||
source == this.overlayPane ||
source == this.decoratorPane);
source == this.decoratorPane;
};

/**
Expand Down
872 changes: 437 additions & 435 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/main/webapp/js/diagramly/App.js
Expand Up @@ -3944,8 +3944,7 @@ App.prototype.createFileSystemOptions = function(name)
}
}

// TODO: Specify default filename
return {types: ext, fileName: name};
return {types: ext, suggestedName: name};
};

/**
Expand Down
5 changes: 5 additions & 0 deletions src/main/webapp/js/diagramly/Editor.js
Expand Up @@ -7378,6 +7378,11 @@

if (action.tags.hidden != null)
{
if (hidden == null)
{
hidden = [];
}

hidden = hidden.concat(action.tags.hidden);
}

Expand Down
74 changes: 50 additions & 24 deletions src/main/webapp/js/diagramly/Trees.js
Expand Up @@ -493,6 +493,24 @@
graph.moveCells = function(cells, dx, dy, clone, target, evt, mapping)
{
var result = null;

// Adds collapsed subtrees
var allCells = [];

for (var i = 0; i < cells.length; i++)
{
if (((isTreeMoving(cells[i]) || isTreeVertex(cells[i])) &&
!hasLayoutParent(cells[i])) && this.isCellCollapsed(cells[i]) )
{
allCells = allCells.concat(this.getSubtree(cells[i]));
}
else
{
allCells.push(cells[i]);
}
}

cells = mxUtils.removeDuplicates(allCells);

this.model.beginUpdate();
try
Expand Down Expand Up @@ -1224,36 +1242,44 @@
return cells;
};

var vertexHandlerInit = mxVertexHandler.prototype.init;
var vertexHandlerRefresh = mxVertexHandler.prototype.refresh;

mxVertexHandler.prototype.init = function()
mxVertexHandler.prototype.refresh = function()
{
vertexHandlerInit.apply(this, arguments);
vertexHandlerRefresh.apply(this, arguments);

if (((isTreeMoving(this.state.cell) || isTreeVertex(this.state.cell)) &&
!hasLayoutParent(this.state.cell)) && this.graph.getOutgoingTreeEdges(
this.state.cell).length > 0)
this.state.cell).length > 0 && !this.graph.isCellCollapsed(this.state.cell))
{
this.moveHandle = mxUtils.createImage(Editor.moveImage);
this.moveHandle.setAttribute('title', 'Move Subtree');
this.moveHandle.style.position = 'absolute';
this.moveHandle.style.cursor = 'pointer';
this.moveHandle.style.width = '24px';
this.moveHandle.style.height = '24px';
this.graph.container.appendChild(this.moveHandle);
this.redrawMoveHandle();

mxEvent.addGestureListeners(this.moveHandle, mxUtils.bind(this, function(evt)
if (this.moveHandle == null)
{
this.graph.graphHandler.start(this.state.cell,
mxEvent.getClientX(evt), mxEvent.getClientY(evt),
this.graph.getSubtree(this.state.cell));
this.graph.graphHandler.cellWasClicked = true;
this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
this.graph.isMouseDown = true;
ui.hoverIcons.reset();
mxEvent.consume(evt);
}));
this.moveHandle = mxUtils.createImage(Editor.moveImage);
this.moveHandle.setAttribute('title', 'Move Subtree');
this.moveHandle.style.position = 'absolute';
this.moveHandle.style.cursor = 'pointer';
this.moveHandle.style.width = '24px';
this.moveHandle.style.height = '24px';
this.graph.container.appendChild(this.moveHandle);
this.redrawMoveHandle();

mxEvent.addGestureListeners(this.moveHandle, mxUtils.bind(this, function(evt)
{
this.graph.graphHandler.start(this.state.cell,
mxEvent.getClientX(evt), mxEvent.getClientY(evt),
this.graph.getSubtree(this.state.cell));
this.graph.graphHandler.cellWasClicked = true;
this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
this.graph.isMouseDown = true;
ui.hoverIcons.reset();
mxEvent.consume(evt);
}));
}
}
else if (this.moveHandle != null)
{
this.moveHandle.parentNode.removeChild(this.moveHandle);
this.moveHandle = null;
}
};

Expand Down
18 changes: 13 additions & 5 deletions src/main/webapp/js/grapheditor/Graph.js
Expand Up @@ -2168,7 +2168,7 @@ Graph.exploreFromCell = function(sourceGraph, selectionCell, config)
}
}
};

// Gets the edges from the source cell and adds the targets
function rootChanged(graph, cell)
{
Expand All @@ -2185,10 +2185,10 @@ Graph.exploreFromCell = function(sourceGraph, selectionCell, config)
if (edges[i].getTerminal(true) != null &&
edges[i].getTerminal(false) != null &&
sourceGraph.isCellVisible(edges[i]) &&
!sourceGraph.isEdgeIgnored(edges[i]) &&
sourceGraph.isCellVisible(edges[i].getTerminal(true)) &&
sourceGraph.isCellVisible(edges[i].getTerminal(false)) &&
sourceGraph.isCellVisible(sourceGraph.getLayerForCell(edges[i])) &&
mxUtils.getValue(sourceGraph.getCellStyle(edges[i]), 'ignoreEdge', '0') != '1')
sourceGraph.isCellVisible(sourceGraph.getLayerForCell(edges[i])))
{
validEdges.push(edges[i]);
}
Expand Down Expand Up @@ -5116,9 +5116,17 @@ Graph.prototype.replacePlaceholders = function(cell, str, vars, translate)
tmp = geo.height;
}
}
else if (name == 'length' && this.model.isEdge(cell))
else if (name == 'length')
{
var state = this.view.getState(cell);
// Gets ancestor edge
var edge = cell;

while (edge != null && !this.model.isEdge(edge))
{
edge = this.model.getParent(edge);
}

var state = this.view.getState(edge);

if (state != null)
{
Expand Down

0 comments on commit 2e1b677

Please sign in to comment.