Skip to content

Commit

Permalink
8.8.7 release
Browse files Browse the repository at this point in the history
  • Loading branch information
alderg committed Jun 26, 2018
1 parent 9394fb0 commit 9c86bba
Show file tree
Hide file tree
Showing 25 changed files with 2,738 additions and 1,630 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
26-JUN-2018: 8.8.7

- Fixes custom content view in Confluence Cloud
- Disables click sidebar collapse
- Uses inline window for text plugin
- Adds showStartScreen in Chrome App
- Disables plantUML when offline

21-JUN-2018: 8.8.6

- Improves detection of gliffy macro in conf cloud
Expand Down
13 changes: 0 additions & 13 deletions Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ A development guide is being started on the GitHub project wiki. There is a [dra

The [mxGraph documentation](https://jgraph.github.io/mxgraph/) provides a lot of the docs for the bottom part of the stack. There is an [mxgraph tag on SO](http://stackoverflow.com/questions/tagged/mxgraph).


Docker
------
After successful build, from the project directory run
```bash
docker build -t draw .
docker run -d -p 8888:8080 draw
```
Now the app will be accessible at http://localhost:8888/draw/?https=0

Running
-------
The simplest way to run draw.io initially is to fork this project, [publish the master branch to GitHub pages](https://help.github.com/categories/github-pages-basics/) and the [pages sites](https://jgraph.github.io/drawio/src/main/webapp/index.html) will have the full editor functionality (sans the integrations).
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.8.6
8.8.7
2 changes: 1 addition & 1 deletion src/main/webapp/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!
# 06/21/2018 06:20 PM
# 06/26/2018 04:33 PM

app.html
index.html?offline=1
Expand Down
517 changes: 259 additions & 258 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

1,041 changes: 521 additions & 520 deletions src/main/webapp/js/atlas-viewer.min.js

Large diffs are not rendered by default.

497 changes: 249 additions & 248 deletions src/main/webapp/js/atlas.min.js

Large diffs are not rendered by default.

29 changes: 16 additions & 13 deletions src/main/webapp/js/diagramly/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2164,26 +2164,29 @@ App.prototype.start = function()

if (urlParams['splash'] == '0' && (id == null || id.length == 0))
{
var draft = this.getDraft();
var fileData = (draft != null) ? draft.data : this.getFileData();
var prev = Editor.useLocalStorage;
this.createFile(this.defaultFilename, fileData, null, null, null, null, null, true);
Editor.useLocalStorage = prev;

// Draft was used so the user should save the file
if (draft != null)
if (!mxClient.IS_CHROMEAPP)
{
var file = this.getCurrentFile();
var draft = this.getDraft();
var fileData = (draft != null) ? draft.data : this.getFileData();
var prev = Editor.useLocalStorage;
this.createFile(this.defaultFilename, fileData, null, null, null, null, null, true);
Editor.useLocalStorage = prev;

if (file != null)
// Draft was used so the user should save the file
if (draft != null)
{
file.addUnsavedStatus();
var file = this.getCurrentFile();

if (file != null)
{
file.addUnsavedStatus();
}
}
}
}
else
{
this.loadFile(this.getDiagramId());
this.loadFile(id);
}
}
}
Expand Down Expand Up @@ -2364,7 +2367,7 @@ App.prototype.showSplash = function(force)
this.showSplash();
}));
}
else if (this.mode == null || force)
else if (!mxClient.IS_CHROMEAPP && (this.mode == null || force))
{
var rowLimit = (serviceCount == 4) ? 2 : 3;

Expand Down
13 changes: 10 additions & 3 deletions src/main/webapp/js/diagramly/Dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ var ErrorDialog = function(editorUi, title, message, buttonText, fn, retry, butt
/**
* Constructs a new embed dialog
*/
var EmbedDialog = function(editorUi, result, timeout, ignoreSize, previewFn)
var EmbedDialog = function(editorUi, result, timeout, ignoreSize, previewFn, title)
{
var div = document.createElement('div');
var maxSize = 500000;
Expand All @@ -970,8 +970,15 @@ var EmbedDialog = function(editorUi, result, timeout, ignoreSize, previewFn)
// Checks if result is a link
var validUrl = /^https?:\/\//.test(result) || /^mailto:\/\//.test(result);

mxUtils.write(div, mxResources.get((result.length < maxSize) ?
((validUrl) ? 'link' : 'mainEmbedNotice') : 'preview') + ':');
if (title != null)
{
mxUtils.write(div, title);
}
else
{
mxUtils.write(div, mxResources.get((result.length < maxSize) ?
((validUrl) ? 'link' : 'mainEmbedNotice') : 'preview') + ':');
}
mxUtils.br(div);

var size = document.createElement('div');
Expand Down
18 changes: 9 additions & 9 deletions src/main/webapp/js/diagramly/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1486,12 +1486,14 @@
cells = this.getCellsForAction(action.select);
this.setSelectionCells(cells);
}
if (action.scroll != null)

if (action.highlight != null)
{
cells = this.getCellsForAction(action.scroll);
cells = this.getCellsForAction(action.highlight);
this.highlightCells(cells, action.highlight.color,
action.highlight.duration, action.highlight.opacity);
}

if (action.toggle != null)
{
this.toggleCells(this.getCellsForAction(action.toggle));
Expand All @@ -1507,13 +1509,11 @@
this.setCellsVisible(this.getCellsForAction(action.hide), false);
}

if (action.highlight != null)
if (action.scroll != null)
{
cells = this.getCellsForAction(action.highlight);
this.highlightCells(cells, action.highlight.color,
action.highlight.duration, action.highlight.opacity);
cells = this.getCellsForAction(action.scroll);
}

if (cells.length > 0)
{
this.scrollCellToVisible(cells[0]);
Expand Down
40 changes: 23 additions & 17 deletions src/main/webapp/js/diagramly/EditorUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -6190,25 +6190,31 @@
{
// Fires cellsInserted to apply the current style to the inserted text.
// This requires the value to be empty when the event is fired.
cell = graph.insertVertex(graph.getDefaultParent(), null, '',
cell = graph.insertVertex(graph.getDefaultParent(), null, '',
graph.snap(dx), graph.snap(dy), 1, 1, 'text;' + ((html) ? 'html=1;' : ''));
graph.fireEvent(new mxEventObject('textInserted', 'cells', [cell]));

// Apply value and updates the cell size to fit the text block
cell.value = text;
graph.updateCellSize(cell);

// See http://stackoverflow.com/questions/6927719/url-regex-does-not-work-in-javascript
var regexp = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»]))/i;
graph.fireEvent(new mxEventObject('textInserted', 'cells', [cell]));

if (regexp.test(cell.value))
{
graph.setLinkForCell(cell, cell.value);
}

// Adds spacing
cell.geometry.width += graph.gridSize;
cell.geometry.height += graph.gridSize;
// Single tag is converted
if (text.charAt(0) == '<' && text.indexOf('>') == text.length - 1)
{
text = mxUtils.htmlEntities(text);
}

// Apply value and updates the cell size to fit the text block
cell.value = text;
graph.updateCellSize(cell);

// See http://stackoverflow.com/questions/6927719/url-regex-does-not-work-in-javascript
var regexp = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»]))/i;

if (regexp.test(cell.value))
{
graph.setLinkForCell(cell, cell.value);
}

// Adds spacing
cell.geometry.width += graph.gridSize;
cell.geometry.height += graph.gridSize;
}
finally
{
Expand Down
1 change: 0 additions & 1 deletion src/main/webapp/js/diagramly/Init.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ function setCurrentXml(data, filename)
// Enables offline mode
if (urlParams['offline'] == '1' || urlParams['demo'] == '1' || urlParams['stealth'] == '1' || urlParams['local'] == '1')
{
urlParams['analytics'] = '0';
urlParams['picker'] = '0';
urlParams['gapi'] = '0';
urlParams['db'] = '0';
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/js/diagramly/Menus.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@
action.isEnabled = isGraphEnabled;
}

if (isLocalStorage)
if (isLocalStorage || mxClient.IS_CHROMEAPP)
{
var action = editorUi.actions.addAction('showStartScreen', function()
{
Expand Down Expand Up @@ -1957,7 +1957,7 @@

var addInsertItem = function(menu, parent, title, method)
{
if (method != 'plantUml' || EditorUi.enablePlantUml)
if (method != 'plantUml' || (EditorUi.enablePlantUml && !editorUi.isOffline()))
{
menu.addItem(title, null, mxUtils.bind(this, function()
{
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/js/diagramly/Minimal.js
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ EditorUi.initMinimalTheme = function()
toggleFormat(ui);
}));

if (EditorUi.enablePlantUml)
if (EditorUi.enablePlantUml && !ui.isOffline())
{
ui.actions.put('plantUml', new Action(mxResources.get('plantUml') + '...', function()
{
Expand Down Expand Up @@ -868,7 +868,7 @@ EditorUi.initMinimalTheme = function()

this.put('insertAdvanced', new Menu(mxUtils.bind(this, function(menu, parent)
{
ui.menus.addMenuItems(menu, ['importText', 'createShape', 'plantUml', '-', 'importCsv', 'formatSql', 'editDiagram'], parent);
ui.menus.addMenuItems(menu, ['importText', 'plantUml', '-', 'formatSql', 'importCsv', '-', 'createShape', 'editDiagram'], parent);
})));

mxResources.parse('insertLayout=' + mxResources.get('layout'));
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/js/diagramly/sidebar/Sidebar-WebIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
this.createVertexTemplateEntry(s + 'drawio2;fillColor=#1A5BA3',
w * 261, h * 354, '', 'Draw.io', null, null, this.getTagsForStencil(gn, 'drawio draw io draw.io', dt).join(' ')),
this.createVertexTemplateEntry(s + 'drawio3;fillColor=#1A5BA3;fontSize=15;fontColor=#1A5BA3;fontStyle=1',
w * 261, h * 261, 'draw<font color="#f08707">.io</font>', 'Draw.io', null, null, this.getTagsForStencil(gn, 'drawio draw io draw.io', dt).join(' ')),
w * 261, h * 261, 'draw.<font color="#f08707">io</font>', 'Draw.io', null, null, this.getTagsForStencil(gn, 'drawio draw io draw.io', dt).join(' ')),
this.createVertexTemplateEntry(s + 'dribbble;fillColor=#EB548D',
w * 337, h * 336, '', 'Dribbble', null, null, this.getTagsForStencil(gn, 'dribbble', dt).join(' ')),
this.createVertexTemplateEntry(s + 'dropbox;fillColor=#0287EA',
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/js/embed-static.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions src/main/webapp/js/mxgraph/EditorUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -975,11 +975,6 @@ EditorUi.prototype.footerHeight = 28;
*/
EditorUi.prototype.sidebarFooterHeight = 34;

/**
* Specifies the link for the edit button in chromeless mode.
*/
EditorUi.prototype.editButtonLink = null;

/**
* Specifies the position of the horizontal split bar. Default is 208 or 118 for
* screen widths <= 640px.
Expand All @@ -1001,6 +996,11 @@ EditorUi.prototype.lightboxMaxFitScale = 2;
*/
EditorUi.prototype.lightboxVerticalDivider = 4;

/**
* Specifies if single click on horizontal split should collapse sidebar. Default is false.
*/
EditorUi.prototype.hsplitClickEnabled = false;

/**
* Installs the listeners to update the action states.
*/
Expand Down Expand Up @@ -3247,16 +3247,16 @@ EditorUi.prototype.addSplitHandler = function(elt, horizontal, dx, onChange)
mxEvent.consume(evt);
});

mxEvent.addListener(elt, 'click', function(evt)
mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
{
if (!ignoreClick)
if (!ignoreClick && this.hsplitClickEnabled)
{
var next = (last != null) ? last - dx : 0;
last = getValue();
onChange(next);
mxEvent.consume(evt);
}
});
}));

mxEvent.addGestureListeners(document, null, moveHandler, dropHandler);

Expand Down
Loading

0 comments on commit 9c86bba

Please sign in to comment.