Skip to content

Commit

Permalink
15.9.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Dec 13, 2021
1 parent 6acf9a8 commit 515ec8c
Show file tree
Hide file tree
Showing 37 changed files with 5,679 additions and 5,323 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
13-DEC-2021: 15.9.5

- Ctrl disables copy if enabled by default
- Uses action state for (un)group buttons
- Altered AWS group styles for better usability
- Fixes no pointerEvents for no (fill)opacity
- Fixes for AWS container usability
- Uses lazyZoom and adds trackpad in outline window
- Fixes dark mode support in browser picker
- Fixes ignored stroke option in SVG getBBox https://github.com/jgraph/drawio/issues/2484
-

08-DEC-2021: 15.9.4

- Adds mxShape.intersectsRectangle
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.9.4
15.9.5
Binary file added src/main/webapp/images/sidebar-gcpicons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
616 changes: 310 additions & 306 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/main/webapp/js/diagramly/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@

return format.editorUi.editor.graph.isSwimlane(state.vertices[0]) ||
fillColor == null || fillColor == mxConstants.NONE ||
mxUtils.getValue(state.style, mxConstants.STYLE_FILL_OPACITY, 100) == 0 ||
mxUtils.getValue(state.style, mxConstants.STYLE_OPACITY, 100) == 0 ||
state.style['pointerEvents'] != null;
}},
{name: 'moveCells', dispName: 'Move Cells on Fold', type: 'bool', defVal: false, isVisible: function(state, format)
Expand Down
49 changes: 37 additions & 12 deletions src/main/webapp/js/diagramly/EditorUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -7413,18 +7413,43 @@
{
try
{
EditorUi.logEvent({category: 'LUCIDCHART-IMPORT-FILE',
action: 'size_' + data.length});
EditorUi.debug('convertLucidChart', data);
}
catch (e)
{
// ignore
}

try
{
success(LucidImporter.importState(JSON.parse(data)));
var obj = JSON.parse(data);
success(LucidImporter.importState(obj));

try
{
EditorUi.logEvent({category: 'LUCIDCHART-IMPORT-FILE',
action: 'size_' + data.length});

if (window.console != null && urlParams['test'] == '1')
{
var args = [new Date().toISOString(), 'convertLucidChart', obj];

if (obj.state != null)
{
args.push(JSON.parse(obj.state));
}

if (obj.svgThumbs != null)
{
for (var i = 0; i < obj.svgThumbs.length; i++)
{
args.push(Editor.createSvgDataUri(obj.svgThumbs[i]));
}
}

if (obj.thumb != null)
{
args.push(obj.thumb);
}

console.log.apply(console, args);
}
}
catch (e)
{
// ignore
}
}
catch (e)
{
Expand Down
1,983 changes: 1,115 additions & 868 deletions src/main/webapp/js/diagramly/Extensions.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/main/webapp/js/diagramly/sidebar/Sidebar-AWS4.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@

Sidebar.prototype.addAWS4GroupsPalette = function(s, gn, sb, pts)
{
var n4 = pts + 'outlineConnect=0;gradientColor=none;html=1;whiteSpace=wrap;fontSize=12;fontStyle=0;' + mxConstants.STYLE_SHAPE + "=mxgraph.aws4.";
var n4 = pts + 'outlineConnect=0;gradientColor=none;html=1;whiteSpace=wrap;fontSize=12;fontStyle=0;container=1;pointerEvents=0;collapsible=0;recursiveResize=0;' + mxConstants.STYLE_SHAPE + "=mxgraph.aws4.";

var dt = 'aws amazon web service groups group ';

this.addPaletteFunctions('aws4Groups', 'AWS / Groups', false,
Expand Down
2,334 changes: 1,180 additions & 1,154 deletions src/main/webapp/js/extensions.min.js

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions src/main/webapp/js/grapheditor/Dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2015,6 +2015,7 @@ var OutlineWindow = function(editorUi, x, y, w, h)

var zoomInAction = editorUi.actions.get('zoomIn');
var zoomOutAction = editorUi.actions.get('zoomOut');

mxEvent.addMouseWheelListener(function(evt, up)
{
var outlineWheel = false;
Expand All @@ -2033,14 +2034,16 @@ var OutlineWindow = function(editorUi, x, y, w, h)

if (outlineWheel)
{
if (up)
{
zoomInAction.funct();
}
else
var factor = graph.zoomFactor;

// Slower zoom for pinch gesture on trackpad
if (evt.deltaY != null && Math.round(evt.deltaY) != evt.deltaY)
{
zoomOutAction.funct();
factor = 1 + (Math.abs(evt.deltaY) / 20) * (factor - 1);
}

graph.lazyZoom(up, null, null, factor);
mxEvent.consume(evt);
}
});
};
Expand Down
21 changes: 16 additions & 5 deletions src/main/webapp/js/grapheditor/EditorUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2904,9 +2904,11 @@ EditorUi.prototype.initCanvas = function()

scrollPosition = new mxPoint(graph.container.scrollLeft, graph.container.scrollTop);

var cx = (ignoreCursorPosition) ? graph.container.scrollLeft + graph.container.clientWidth / 2 :
var cx = (ignoreCursorPosition || cursorPosition == null) ?
graph.container.scrollLeft + graph.container.clientWidth / 2 :
cursorPosition.x + graph.container.scrollLeft - graph.container.offsetLeft;
var cy = (ignoreCursorPosition) ? graph.container.scrollTop + graph.container.clientHeight / 2 :
var cy = (ignoreCursorPosition || cursorPosition == null) ?
graph.container.scrollTop + graph.container.clientHeight / 2 :
cursorPosition.y + graph.container.scrollTop - graph.container.offsetTop;
mainGroup.style.transformOrigin = cx + 'px ' + cy + 'px';
mainGroup.style.transform = 'scale(' + this.cumulativeZoomFactor + ')';
Expand Down Expand Up @@ -3802,6 +3804,9 @@ EditorUi.prototype.updateActionStates = function()
var vertexSelected = false;
var groupSelected = false;
var edgeSelected = false;
var tableSelected = false;
var rowSelected = false;
var cellSelected = false;
var selected = false;
var editable = [];

Expand All @@ -3813,6 +3818,10 @@ EditorUi.prototype.updateActionStates = function()
{
var cell = cells[i];

tableSelected = tableSelected || graph.isTable(cell);
cellSelected = cellSelected || graph.isTableCell(cell);
rowSelected = rowSelected || graph.isTableRow(cell);

if (graph.isCellEditable(cell))
{
editable.push(cell);
Expand Down Expand Up @@ -3861,9 +3870,11 @@ EditorUi.prototype.updateActionStates = function()
this.actions.get('wordWrap').setEnabled(vertexSelected);
this.actions.get('autosize').setEnabled(vertexSelected);
var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1;
this.actions.get('group').setEnabled(graph.getSelectionCount() > 1 ||
(oneVertexSelected && !graph.isContainer(graph.getSelectionCell())));
this.actions.get('ungroup').setEnabled(groupSelected);
this.actions.get('group').setEnabled((graph.getSelectionCount() > 1 ||
(oneVertexSelected && !graph.isContainer(graph.getSelectionCell()) &&
graph.model.getChildCount(graph.getSelectionCell()) == 0)) &&
!rowSelected && !cellSelected);
this.actions.get('ungroup').setEnabled(groupSelected && !rowSelected && !cellSelected);
this.actions.get('removeFromGroup').setEnabled(oneVertexSelected &&
graph.getModel().isVertex(graph.getModel().getParent(editable[0])));

Expand Down
61 changes: 33 additions & 28 deletions src/main/webapp/js/grapheditor/Format.js
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,32 @@ BaseFormatPanel.prototype.createTitle = function(title)
return div;
};

/**
*
*/
BaseFormatPanel.prototype.addAction = function(div, action, width)
{
var result = false;

if (action != null && action.isEnabled())
{
var btn = mxUtils.button(action.label, function(evt)
{
action.funct();
});

var short = (action.shortcut != null) ? ' (' + action.shortcut + ')' : '';
btn.setAttribute('title', action.label + short);
width = (width != null) ? width : 210;
btn.style.width = width + 'px';
btn.style.marginBottom = '2px';
div.appendChild(btn);
result = true;
}

return result;
};

/**
*
*/
Expand Down Expand Up @@ -1965,42 +1991,21 @@ ArrangePanel.prototype.addGroupOps = function(div)
div.style.paddingTop = '8px';
div.style.paddingBottom = '6px';

if (graph.getSelectionCount() > 1)
if (this.addAction(div, ui.actions.get('group')))
{
btn = mxUtils.button(mxResources.get('group'), function(evt)
{
ui.actions.get('group').funct();
})

btn.setAttribute('title', mxResources.get('group') + ' (' + this.editorUi.actions.get('group').shortcut + ')');
btn.style.width = '210px';
btn.style.marginBottom = '2px';
div.appendChild(btn);
mxUtils.br(div);
count++;
}
else if (ss.cells.length == 1 && !graph.getModel().isEdge(cell) && !graph.isSwimlane(cell) &&
!graph.isTable(cell) && !ss.row && !ss.cell && graph.getModel().getChildCount(cell) > 0)

if (this.addAction(div, ui.actions.get('ungroup')))
{
btn = mxUtils.button(mxResources.get('ungroup'), function(evt)
{
ui.actions.get('ungroup').funct();
})

btn.setAttribute('title', mxResources.get('ungroup') + ' (' +
this.editorUi.actions.get('ungroup').shortcut + ')');
btn.style.width = '210px';
btn.style.marginBottom = '2px';
div.appendChild(btn);
mxUtils.br(div);
count++;
}

if (graph.getModel().isVertex(graph.getSelectionCell()))
{
if (count > 0)
{
mxUtils.br(div);
count = 0;
}
count = 0;

var btn = mxUtils.button(mxResources.get('copySize'), function(evt)
{
Expand Down
Loading

0 comments on commit 515ec8c

Please sign in to comment.