Skip to content
Permalink
Browse files

9.5.5 release

  • Loading branch information...
alderg committed Dec 3, 2018
1 parent 2172052 commit 55d983c600b04367188ad06a9ed0fd8b1c23f16c
@@ -1,6 +1,11 @@
03-DEC-2018: 9.5.5

- Adds unsaved status for new files in Desktop
- Fixes minor CSS issues

03-DEC-2018: 9.5.4

- Fixes possible NPE in Desktop app
- Fixes possible NPE in Desktop

03-DEC-2018: 9.5.3

@@ -1 +1 @@
9.5.4
9.5.5
@@ -1,7 +1,7 @@
CACHE MANIFEST

# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 12/03/2018 07:26 PM
# 12/03/2018 10:08 PM

app.html
index.html?offline=1

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -4530,6 +4530,8 @@ App.prototype.descriptorChanged = function()
}
}
}

this.updateUi();
};

/**
@@ -318,7 +318,7 @@ DrawioFile.prototype.reloadFile = function(success)
{
this.ui.confirm(mxResources.get('allChangesLost'), mxUtils.bind(this, function()
{
this.handleFileError();
this.handleFileSuccess(DrawioFile.SYNC == 'manual');
}), fn, mxResources.get('cancel'), mxResources.get('discardChanges'));
}
else
@@ -1315,7 +1315,7 @@ DrawioFile.prototype.fileChanged = function()
else if ((!this.isAutosaveOptional() || !this.ui.editor.autosave) &&
!this.inConflictState)
{
this.handleFileError();
this.addUnsavedStatus();
}
};

@@ -566,8 +566,18 @@ DriveClient.prototype.updateUser = function(success, error, remember)
// Requests more information about the user (email address is sometimes not in info)
this.executeRequest(gapi.client.drive.about.get(), mxUtils.bind(this, function(resp)
{
this.setUser(new DrawioUser(info.id, resp.user.emailAddress, resp.user.displayName,
(resp.user.picture != null) ? resp.user.picture.url : null, info.locale));
var email = mxResources.get('notAvailable');
var name = email;
var pic = null;

if (resp != null && resp.user != null)
{
email = resp.user.emailAddress;
name = resp.user.displayName;
pic = (resp.user.picture != null) ? resp.user.picture.url : null;
}

this.setUser(new DrawioUser(info.id, email, name, pic, info.locale));
this.setUserId(info.id, remember);

if (success != null)
@@ -1337,7 +1337,7 @@
}
});

option.style.paddingTop = '0px';
option.style.paddingTop = '5px';
div.appendChild(option);

var help = ui.menus.createHelpLink('https://desk.draw.io/support/solutions/articles/16000032875');
@@ -927,7 +927,10 @@

if (forceReload)
{
currentFile.reloadFile();
currentFile.reloadFile(mxUtils.bind(this, function()
{
currentFile.handleFileSuccess(DrawioFile.SYNC == 'manual');
}));
}
else
{
@@ -4111,7 +4114,7 @@
cb.style.marginRight = '8px';
cb.style.marginTop = '16px';
cb.setAttribute('type', asRadio? 'radio' : 'checkbox');
var id = 'cb' + Math.random();
var id = 'geCheckbox-' + Editor.guid();
cb.id = id;

if (radioGroupName != null)
@@ -540,12 +540,22 @@ FeedbackDialog.feedbackUrl = 'https://log.draw.io/email';

LocalFile.prototype.getLatestVersion = function(success, error)
{
this.ui.readGraphFile(mxUtils.bind(this, function(fileEntry, data, stat)
if (this.fileObject == null)
{
var file = new LocalFile(this, data, '');
file.stat = stat;
success(file);
}), error, this.fileObject.path);
if (error != null)
{
error({message: mxResources.get('fileNotFound')});
}
}
else
{
this.ui.readGraphFile(mxUtils.bind(this, function(fileEntry, data, stat)
{
var file = new LocalFile(this, data, '');
file.stat = stat;
success(file);
}), error, this.fileObject.path);
}
};

// Call save as for copy
@@ -570,54 +580,61 @@ FeedbackDialog.feedbackUrl = 'https://log.draw.io/email';

LocalFile.prototype.reloadFile = function(success)
{
this.ui.spinner.stop();

var fn = mxUtils.bind(this, function()
if (this.fileObject == null)
{
this.ui.handleError({message: mxResources.get('fileNotFound')});
}
else
{
this.setModified(false);
var page = this.ui.currentPage;
var viewState = this.ui.editor.graph.getViewState();
var selection = this.ui.editor.graph.getSelectionCells();
this.ui.spinner.stop();

if (this.ui.spinner.spin(document.body, mxResources.get('loading')))
var fn = mxUtils.bind(this, function()
{
this.ui.readGraphFile(mxUtils.bind(this, function(fileEntry, data, stat)
this.setModified(false);
var page = this.ui.currentPage;
var viewState = this.ui.editor.graph.getViewState();
var selection = this.ui.editor.graph.getSelectionCells();

if (this.ui.spinner.spin(document.body, mxResources.get('loading')))
{
this.ui.spinner.stop();

var file = new LocalFile(this.ui, data, '');
file.fileObject = fileEntry;
file.stat = stat;

this.ui.fileLoaded(file);
this.ui.restoreViewState(page, viewState, selection);

if (this.backupPatch != null)
this.ui.readGraphFile(mxUtils.bind(this, function(fileEntry, data, stat)
{
this.patch([this.backupPatch]);
}

if (success != null)
this.ui.spinner.stop();

var file = new LocalFile(this.ui, data, '');
file.fileObject = fileEntry;
file.stat = stat;

this.ui.fileLoaded(file);
this.ui.restoreViewState(page, viewState, selection);

if (this.backupPatch != null)
{
this.patch([this.backupPatch]);
}

if (success != null)
{
success();
}
}), mxUtils.bind(this, function(err)
{
success();
}
}), mxUtils.bind(this, function(err)
this.ui.handleFileError(err);
}), this.fileObject.path);
}
});

if (this.isModified() && this.backupPatch == null)
{
this.ui.confirm(mxResources.get('allChangesLost'), mxUtils.bind(this, function()
{
this.ui.handleFileError(err);
}), this.fileObject.path);
this.handleFileSuccess(DrawioFile.SYNC == 'manual');
}), fn, mxResources.get('cancel'), mxResources.get('discardChanges'));
}
});

if (this.isModified() && this.backupPatch == null)
{
this.ui.confirm(mxResources.get('allChangesLost'), mxUtils.bind(this, function()
else
{
this.handleFileError();
}), fn, mxResources.get('cancel'), mxResources.get('discardChanges'));
}
else
{
fn();
fn();
}
}
};

@@ -936,6 +953,19 @@ FeedbackDialog.feedbackUrl = 'https://log.draw.io/email';
}
};


/**
* Updates action states depending on the selection.
*/
var editorUiUpdateActionStates = EditorUi.prototype.updateActionStates;
EditorUi.prototype.updateActionStates = function()
{
editorUiUpdateActionStates.apply(this, arguments);

var file = this.getCurrentFile();
this.actions.get('synchronize').setEnabled(file != null && file.fileObject != null);
};

EditorUi.prototype.saveLocalFile = function(data, filename, mimeType, base64Encoded, format, allowBrowser)
{
this.saveData(filename, format, data, mimeType, base64Encoded);
@@ -18,17 +18,19 @@ EditorUi.initMinimalTheme = function()
var style = document.createElement('style')
style.type = 'text/css';
style.innerHTML = '* { -webkit-font-smoothing: antialiased; }' +
'html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}' +
'html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }' +
'html body table.mxWindow td.mxWindowPane div.mxWindowPane * { font-size:9pt; }' +
'html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }' +
'html body button.geBtn:active { opacity: 0.6; }' +
'.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }' +
'html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }' +
'div.geDialog { border-radius: 5px; }' +
'html body div.geDialog button.geBigButton { color: #fff !important; }' +
'.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }' +
'html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }' +
'html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }' +
'html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }' +
'html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }' +
'html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }' +
'div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }' +
'div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }' +
'div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }' +
'html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }' +
'html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }' +
@@ -118,7 +120,7 @@ EditorUi.initMinimalTheme = function()
{
ui.formatWindow = new WrapperWindow(ui, mxResources.get('format'),
Math.max(20, ui.diagramContainer.clientWidth - 240 - 12), 56,
240, Math.min(550, graph.container.clientHeight - 10), function(container)
240, Math.min(560, graph.container.clientHeight - 10), function(container)
{
var format = ui.createFormat(container);
format.init();

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -363,6 +363,7 @@ Format.prototype.refresh = function()
label.style.paddingTop = '8px';
label.style.height = (mxClient.IS_QUIRKS) ? '34px' : '25px';
label.style.width = '100%';
label.style.cursor = 'pointer';
this.container.appendChild(div);

if (graph.isSelectionEmpty())
@@ -450,6 +451,10 @@ Format.prototype.refresh = function()
});

mxEvent.addListener(elt, 'click', clickHandler);
mxEvent.addListener(elt, 'mousedown', function(evt)
{
mxEvent.consume(evt);
});

if (index == ((containsLabel) ? this.labelIndex : this.currentIndex))
{
@@ -3565,7 +3570,7 @@ TextFormatPanel.prototype.addFont = function(container)

function getRelativeLineHeight(fontSize, css, elt)
{
if (css != null)
if (elt.style != null && css != null)
{
var lineHeight = css.lineHeight

@@ -3585,20 +3590,22 @@ TextFormatPanel.prototype.addFont = function(container)
}
};

function getAbsoluteFontSize(fontSize)
function getAbsoluteFontSize(css)
{
if (fontSize.substring(fontSize.length - 2) == 'px')
var fontSize = (css != null) ? css.fontSize : null;

if (fontSize != null && fontSize.substring(fontSize.length - 2) == 'px')
{
return parseFloat(fontSize);
}
else
{
return mxConstants.DEFAULT_FONTSIZE;
}
}
};

var css = mxUtils.getCurrentStyle(node);
var fontSize = getAbsoluteFontSize(css.fontSize);
var fontSize = getAbsoluteFontSize(css);
var lineHeight = getRelativeLineHeight(fontSize, css, node);

// Finds common font size
@@ -3614,7 +3621,7 @@ TextFormatPanel.prototype.addFont = function(container)
if (selection.containsNode(elts[i], true))
{
temp = mxUtils.getCurrentStyle(elts[i]);
fontSize = Math.max(getAbsoluteFontSize(temp.fontSize), fontSize);
fontSize = Math.max(getAbsoluteFontSize(temp), fontSize);
var lh = getRelativeLineHeight(fontSize, temp, elts[i]);

if (lh != lineHeight || isNaN(lh))
Oops, something went wrong.

0 comments on commit 55d983c

Please sign in to comment.
You can’t perform that action at this time.