Skip to content

Commit

Permalink
7.8.4 release
Browse files Browse the repository at this point in the history
Former-commit-id: 85d5dff
  • Loading branch information
alderg committed Dec 5, 2017
1 parent e5bccd4 commit e31aa62
Show file tree
Hide file tree
Showing 18 changed files with 2,802 additions and 2,924 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
05-DEC-2017: 7.8.4

- Fixes font rendering in library dialog
- Adds move subtree handle for tree containers
- Fixes special cases for font size changes
- Adds fixes for older versions of IE

04-DEC-2017: 7.8.3

- Improves handling of fontsize in format panel
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.8.3
7.8.4
2 changes: 1 addition & 1 deletion war/cache.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CACHE MANIFEST

# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 12/05/2017 12:09 AM
# 12/05/2017 03:12 PM

app.html
index.html?offline=1
Expand Down
Binary file modified war/images/move.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,252 changes: 625 additions & 627 deletions war/js/app.min.js

Large diffs are not rendered by default.

1,288 changes: 643 additions & 645 deletions war/js/atlas-viewer.min.js

Large diffs are not rendered by default.

1,432 changes: 715 additions & 717 deletions war/js/atlas.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions war/js/diagramly/Dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7545,7 +7545,7 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
{
evt.stopPropagation();
evt.preventDefault();
errorShowed = false;
errorShowed = false;

dropTargetIndex = getIndexForEvent(evt);

Expand All @@ -7565,11 +7565,11 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
}
else if (evt.dataTransfer.files.length > 0)
{
editorUi.importFiles(evt.dataTransfer.files, 0, 0, editorUi.maxImageSize, createImportHandler(evt));
editorUi.importFiles(evt.dataTransfer.files, 0, 0, editorUi.maxImageSize, createImportHandler(evt));
}
else if (mxUtils.indexOf(evt.dataTransfer.types, 'text/uri-list') >= 0)
{
var uri = decodeURIComponent(evt.dataTransfer.getData('text/uri-list'));
var uri = decodeURIComponent(evt.dataTransfer.getData('text/uri-list'));

if (/(\.jpg)($|\?)/i.test(uri) || /(\.png)($|\?)/i.test(uri) ||
/(\.gif)($|\?)/i.test(uri) || /(\.svg)($|\?)/i.test(uri))
Expand Down
29 changes: 7 additions & 22 deletions war/js/diagramly/EditorUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@
// Workaround for CSS error in IE8 (standards and quirks)
if (!mxClient.IS_QUIRKS && document.documentMode != 8)
{
buttons.style.backgroundColor = 'inherit';
buttons.style.backgroundColor = 'inherit';
}

title.style.position = 'relative';
Expand Down Expand Up @@ -1783,22 +1783,10 @@
}
}));

// Shows tooltip if mouse over background
mxEvent.addListener(contentDiv, 'mousemove', mxUtils.bind(this, function(evt)
{
if (mxEvent.getSource(evt) == contentDiv)
{
contentDiv.setAttribute('title', mxResources.get('libraryTooltip'));
}
else
{
contentDiv.removeAttribute('title');
}
}));

if (file.isEditable())
{
var graph = this.editor.graph;
var spinBtn = null;

var editLibrary = mxUtils.bind(this, function(evt)
{
Expand Down Expand Up @@ -2193,10 +2181,11 @@
}
});

btn = btn.cloneNode(false);
btn.setAttribute('src', Editor.plusImage);
btn.setAttribute('title', mxResources.get('add'));
buttons.insertBefore(btn, buttons.firstChild);
var btn2 = btn.cloneNode(false);
btn2.setAttribute('src', Editor.plusImage);
btn2.setAttribute('title', mxResources.get('add'));
buttons.insertBefore(btn2, buttons.firstChild);
mxEvent.addListener(btn2, 'click', addSelection);

if (!this.isOffline() && file.title == '.scratchpad' && EditorUi.scratchpadHelpLink != null)
{
Expand All @@ -2214,10 +2203,6 @@

buttons.insertBefore(link, buttons.firstChild);
}

var spinBtn = null;

mxEvent.addListener(btn, 'click', addSelection);
}

title.appendChild(buttons);
Expand Down
250 changes: 67 additions & 183 deletions war/js/diagramly/Trees.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Defines resources.
*/
var moveImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/move.png' :
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAhFBMVEUAAAD///8KCgpNTU24uLgBAQEBAQEMDAxFRUWEhIQBAQEBAQEBAQEAAAAVFRXAwMBYWFgBAQEBAQEAAAAAAAAAAAAAAAAAAAABAQEBAQEAAAAAAAAAAAABAQEBAQEAAAAAAAASEhLAwMC+vr4BAQEBAQEAAAAAAAAAAAABAQEAAAD///+vipwtAAAAKnRSTlMA/Prw9f7A+fHq1uvFOfPv7+TOmkUyCwb3kT9UT+yPLAL49PTbkmloKvYw/P7BAAABe0lEQVRIx52W63LCIBBGwRhUkFxNYtTEa9Xi+79fR9KxrgtY9/xjMmcIH5ddhmmqSylk3nW5FOWlath7dCsNQLY6bOzWwjgQ64CzmhsPYuVR6jY2XuK2djnbwgQptthZKPMGtXh1NkvzluXmZR7geC0w17YziNHIILrrU26FwzkeHVbxl+GXwxnfbmOH1T72NHY6Tiv+3eXd3Ol4rPnOSmv0YWIda03QxyF3NNE+5XxwOE/3aCp7F9CKkiyacevMoixBq9JDdJjpIE2NcQbYnIyDaJAi4+DUsCqGGSRYSmAaccXOMOs0w1KWwuTPrIT7w6dwTcMA7lfJBHDugd2x6T0NgCWYfDkH3GKdpwGwJMuB4wFaOVOP3A63IIdHhookkX6PFAQpctLmko4R6cCSrgbtEjJtCNed8LAQnjDSY0l4ljWhAPT0UmO5/rOoqSulfH5eqL83lJaA1nxg6j7U5vS1r6ESgYbKj7d1C6N7Cf9L9joogHZUKW87+gMYYTZWVGas2QAAAABJRU5ErkJggg==';
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==';

/**
* Overrides folding based on treeFolding style.
Expand Down Expand Up @@ -1075,212 +1075,96 @@
}
else
{
this.model.beginUpdate();
try
{
var cells = graphConnectVertex.call(this, source, direction, length, evt, forceClone,
ignoreCellAt || edges.length == 0);
}
finally
{
this.model.endUpdate();
}

return cells;
return graphConnectVertex.call(this, source, direction,
length, evt, forceClone, ignoreCellAt);
}
};

// Keeps edges connected in trees
var graphHandlerGetCells = graph.graphHandler.getCells;

graph.graphHandler.getCells = function(initialCell)

graph.getSubtree = function(initialCell)
{
var cells = graphHandlerGetCells.apply(this, arguments);
var temp = cells.slice(0);

// Removes all edges first
for (var i = 0; i < temp.length; i++)
{
if (isTreeVertex(temp[i]))
{
// Avoids disconnecting subtree by removing all incoming edges
var edges = graph.getIncomingEdges(temp[i]);

for (var j = 0; j < edges.length; j++)
{
mxUtils.remove(edges[j], cells);
}
}
}
var cells = [initialCell];

for (var i = 0; i < temp.length; i++)
if (isTreeVertex(initialCell) && !hasLayoutParent(initialCell))
{
var target = cells[i];

// LATER: Move edge should move subtree
// if (model.isEdge(target) && hasTreeParent(target))
// {
// target = model.getTerminal(target, false);
// }

if (isTreeVertex(target) && !hasLayoutParent(target))
// Gets the subtree from cell downwards
graph.traverse(initialCell, true, function(vertex, edge)
{
// Gets the subtree from cell downwards
graph.traverse(target, true, function(vertex, edge)
// LATER: Use dictionary to avoid duplicates
if (edge != null && mxUtils.indexOf(cells, edge) < 0)
{
// LATER: Use dictionary to avoid duplicates
if (edge != null && mxUtils.indexOf(cells, edge) < 0)
{
cells.push(edge);
}
cells.push(edge);
}

if (mxUtils.indexOf(cells, vertex) < 0)
{
cells.push(vertex);
}

return true;
});
}
if (mxUtils.indexOf(cells, vertex) < 0)
{
cells.push(vertex);
}

return true;
});
}

return cells;
};

// Defines a new class for all icons
function mxIconSet(state)


var vertexHandlerInit = mxVertexHandler.prototype.init;

mxVertexHandler.prototype.init = function()
{
this.images = [];
var graph = state.view.graph;

// Delete
var img = mxUtils.createImage(moveImage);
img.setAttribute('title', 'Move Cell without Subtree');
img.style.position = 'absolute';
img.style.cursor = 'pointer';
img.style.width = '26px';
img.style.height = '26px';
img.style.left = (state.getCenterX() - 13) + 'px';
img.style.top = (state.getCenterY() - 13) + 'px';
vertexHandlerInit.apply(this, arguments);

mxEvent.addGestureListeners(img, mxUtils.bind(this, function(evt)
if (isTreeVertex(this.state.cell) && this.graph.getOutgoingEdges(this.state.cell).length > 0)
{
graph.stopEditing(false);
ui.hoverIcons.reset();
this.moveHandle = mxUtils.createImage(moveImage);
this.moveHandle.setAttribute('title', 'Move Subtree');
this.moveHandle.style.position = 'absolute';
this.moveHandle.style.cursor = 'pointer';
this.moveHandle.style.width = '18px';
this.moveHandle.style.height = '18px';
this.graph.container.appendChild(this.moveHandle);

if (!graph.isCellSelected(state.cell))
mxEvent.addGestureListeners(this.moveHandle, mxUtils.bind(this, function(evt)
{
graph.setSelectionCell(state.cell);
}

graph.graphHandler.start(state.cell, mxEvent.getClientX(evt), mxEvent.getClientY(evt));

graph.graphHandler.cells = [state.cell];
graph.graphHandler.bounds = graph.graphHandler.graph.getView().getBounds(graph.graphHandler.cells);
graph.graphHandler.pBounds = graph.graphHandler.getPreviewBounds(graph.graphHandler.cells);

graph.graphHandler.cellWasClicked = true;
graph.isMouseDown = true;
graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
mxEvent.consume(evt);

// Disables dragging the image
mxEvent.consume(evt);
this.destroy();
}));

state.view.graph.container.appendChild(img);
this.images.push(img);
this.graph.graphHandler.start(this.state.cell, mxEvent.getClientX(evt), mxEvent.getClientY(evt));
this.graph.graphHandler.cells = this.graph.getSubtree(this.state.cell);
this.graph.graphHandler.bounds = this.state.view.getBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.pBounds = this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.cellWasClicked = true;
this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
this.graph.isMouseDown = true;
mxEvent.consume(evt);
}));
}
};

mxIconSet.prototype.destroy = function()

var vertexHandlerRedrawHandles = mxVertexHandler.prototype.redrawHandles;

mxVertexHandler.prototype.redrawHandles = function()
{
if (this.images != null)
vertexHandlerRedrawHandles.apply(this, arguments);

if (this.moveHandle != null)
{
for (var i = 0; i < this.images.length; i++)
{
var img = this.images[i];
img.parentNode.removeChild(img);
}
this.moveHandle.style.left = this.state.x + this.state.width +
((this.state.width < 40) ? 10 : 0) + 2 + 'px';
this.moveHandle.style.top = this.state.y + this.state.height +
((this.state.height < 40) ? 10 : 0) + 2 + 'px';
}

this.images = null;
};

// Defines the tolerance before removing the icons
var iconTolerance = 20;

// Shows icons if the mouse is over a cell
graph.addMouseListener(
var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;

mxVertexHandler.prototype.destroy = function(sender, me)
{
currentState: null,
currentIconSet: null,
mouseDown: function(sender, me)
{
// Hides icons on mouse down
if (this.currentState != null)
{
this.dragLeave(me.getEvent(), this.currentState);
this.currentState = null;
}
},
mouseMove: function(sender, me)
{
if (this.currentState != null && (me.getState() == this.currentState ||
me.getState() == null))
{
var tol = iconTolerance;
var tmp = new mxRectangle(me.getGraphX() - tol,
me.getGraphY() - tol, 2 * tol, 2 * tol);

if (mxUtils.intersects(tmp, this.currentState))
{
return;
}
}

var tmp = me.getState();

// Ignores everything but vertices
if ((graph.isMouseDown && !mxEvent.isTouchEvent(me.getEvent())) ||
graph.isEditing() || (tmp != null && (!graph.getModel().isVertex(tmp.cell) ||
!isTreeVertex(me.getCell()) || hasLayoutParent(tmp.cell))))
{
tmp = null;
}

if (tmp != this.currentState)
{
if (this.currentState != null)
{
this.dragLeave(me.getEvent(), this.currentState);
}

this.currentState = tmp;

if (this.currentState != null)
{
this.dragEnter(me.getEvent(), this.currentState);
}
}
},
mouseUp: function(sender, me) { },
dragEnter: function(evt, state)
{
if (this.currentIconSet == null)
{
this.currentIconSet = new mxIconSet(state);
}
},
dragLeave: function(evt, state)
{
if (this.currentIconSet != null)
{
this.currentIconSet.destroy();
this.currentIconSet = null;
}
}
});
vertexHandlerDestroy.apply(this, arguments);

if (this.moveHandle != null)
{
this.moveHandle.parentNode.removeChild(this.moveHandle);
this.moveHandle = null;
}
};
};

/**
Expand Down
Loading

0 comments on commit e31aa62

Please sign in to comment.