Skip to content

Commit

Permalink
15.8.8 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Nov 30, 2021
1 parent 0f4adef commit 82b0303
Show file tree
Hide file tree
Showing 13 changed files with 186 additions and 156 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
30-NOV-2021: 15.8.8

- Hides xml extension in library title https://github.com/jgraph/drawio/issues/2448
- [vsdx] Improves font-size and line height and links to internal pages
- Fixes file exists check in GitHub

29-NOV-2021: 15.8.7

- Fixed string replace when label has a new line https://github.com/jgraph/drawio/issues/2015
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.8.7
15.8.8
Binary file not shown.
104 changes: 52 additions & 52 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion src/main/webapp/js/diagramly/EditorUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -3092,7 +3092,18 @@
}

// Adds new sidebar entry for this library
var tmp = (optionalTitle != null && optionalTitle.length > 0) ? optionalTitle : file.getTitle();
var tmp = optionalTitle;

if (tmp == null)
{
tmp = file.getTitle();

if (tmp != null && /(\.xml)$/i.test(tmp))
{
tmp = tmp.substring(0, tmp.lastIndexOf('.'));
}
}

var contentDiv = this.sidebar.addPalette(file.getHash(), tmp,
(expand != null) ? expand : true, mxUtils.bind(this, function(content)
{
Expand Down
17 changes: 12 additions & 5 deletions src/main/webapp/js/diagramly/GitHubClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ GitHubClient.prototype.showAuthorizeDialog = function(retryFn, cancelFn)
/**
* Authorizes the client, gets the userId and calls <open>.
*/
GitHubClient.prototype.executeRequest = function(req, success, error, ignoreNotFound)
GitHubClient.prototype.executeRequest = function(req, success, error, ignoreNotFound, returnNotFound)
{
var doExecute = mxUtils.bind(this, function(failOnAuth)
{
Expand Down Expand Up @@ -387,7 +387,14 @@ GitHubClient.prototype.executeRequest = function(req, success, error, ignoreNotF
}
else if (req.getStatus() === 404)
{
authorizeApp();
if (returnNotFound)
{
error({code: req.getStatus(), message: this.getErrorMessage(req, mxResources.get('fileNotFound'))});
}
else
{
authorizeApp();
}
}
else if (req.getStatus() === 409)
{
Expand Down Expand Up @@ -449,7 +456,7 @@ GitHubClient.prototype.getLibrary = function(path, success, error)
/**
* Checks if the client is authorized and calls the next step.
*/
GitHubClient.prototype.getSha = function(org, repo, path, ref, success, error)
GitHubClient.prototype.getSha = function(org, repo, path, ref, success, error, returnNotFound)
{
// Adds random parameter to bypass cache
var rnd = '&t=' + new Date().getTime();
Expand All @@ -466,7 +473,7 @@ GitHubClient.prototype.getSha = function(org, repo, path, ref, success, error)
{
error(e);
}
}), error);
}), error, null, returnNotFound);
};

/**
Expand Down Expand Up @@ -754,7 +761,7 @@ GitHubClient.prototype.checkExists = function(path, askReplace, fn)
}), mxUtils.bind(this, function(err)
{
fn(true);
}), null, true);
}), true);
};

/**
Expand Down
19 changes: 12 additions & 7 deletions src/main/webapp/js/diagramly/vsdx/importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,8 @@ var com;
//var pageName_1 = org.apache.commons.lang3.StringEscapeUtils.escapeXml11(page.getPageName());
//TODO FIXME htmlEntities is not exactly as escapeXml11 but close
var pageName_1 = mxUtils.htmlEntities(page.getPageName()) + (page.isBackground()? ' (Background)' : '');
output += '<diagram name="' + pageName_1 + '" id="' + pageName_1.replace(/\s/g, '_') + '">';
var pageNameU = mxUtils.htmlEntities(page.getPageNameU());
output += '<diagram name="' + pageName_1 + '" id="' + pageNameU.replace(/\s/g, '_') + '">';
}

output += Graph.compress(modelString);
Expand Down Expand Up @@ -904,7 +905,7 @@ var com;
}
else if (lnkObj.pageLink)
{
graph.setLinkForCell(v1, 'data:page/id,' + lnkObj.pageLink);
graph.setLinkForCell(v1, 'data:page/id,' + lnkObj.pageLink.replace(/\s/g, '_'));
}

// Add Shape properties
Expand Down Expand Up @@ -3543,6 +3544,8 @@ var com;
}
this.Id = parseFloat(pageElem.getAttribute(com.mxgraph.io.vsdx.mxVsdxConstants.ID));
this.pageName = pageElem.getAttribute(com.mxgraph.io.vsdx.mxVsdxConstants.NAME) || "";
this.pageNameU = pageElem.getAttribute(com.mxgraph.io.vsdx.mxVsdxConstants.NAME_U) || this.pageName;

var pageSheets = com.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(pageElem, "PageSheet");
if (pageSheets.length > 0) {
var pageSheet = pageSheets[0];
Expand Down Expand Up @@ -3855,6 +3858,9 @@ var com;
mxVsdxPage.prototype.getPageName = function () {
return this.pageName;
};
mxVsdxPage.prototype.getPageNameU = function () {
return this.pageNameU;
};
mxVsdxPage.prototype.getShapes = function () {
return this.shapes;
};
Expand Down Expand Up @@ -5002,8 +5008,8 @@ var com;
* @param {string} tag Name of the tag.
* @return {string} &lt tag &gt text &lt /tag &gt
*/
mxVsdxUtils.surroundByTags = function (text, tag) {
return "<" + tag + ">" + text + "</" + tag + ">";
mxVsdxUtils.surroundByTags = function (text, tag, style) {
return "<" + tag + (style? ' style="' + style + '"' : '') + ">" + text + "</" + tag + ">";
};
/**
* Converts the ampersand, quote, prime, less-than and greater-than
Expand Down Expand Up @@ -9678,7 +9684,7 @@ var com;
Shape.prototype.getTextSize = function (index) {
var sizeElem = this.getCellElement$java_lang_String$java_lang_String$java_lang_String(com.mxgraph.io.vsdx.mxVsdxConstants.SIZE, index, com.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);
var size = this.getScreenNumericalValue$org_w3c_dom_Element$double(sizeElem, 12);
return ('' + (Math.floor(Math.round(size * 100) / 100)));
return ('' + (Math.round(size * 100) / 100));
};
/**
* Returns the vertical align of the label.<br/>
Expand Down Expand Up @@ -10457,8 +10463,7 @@ var com;

var end = first ? "" : "</p>";
ret += end;
com.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(ret, "div");
return ret;
return com.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(ret, "div", "font-size: 1px");
};

/**
Expand Down
Loading

0 comments on commit 82b0303

Please sign in to comment.