10.5.3 release
This commit is contained in:
parent
e236aeef7a
commit
49306e1369
10 changed files with 268 additions and 255 deletions
|
@ -1,3 +1,9 @@
|
|||
21-MAR-2019: 10.5.3
|
||||
|
||||
- Fixes timing issue in graph viewer
|
||||
- Fixes date formats in VSDX import
|
||||
- Fixes possible cropping for PDF export
|
||||
|
||||
20-MAR-2019: 10.5.2
|
||||
|
||||
- Fixes bug for comments in Confluence cloud
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
10.5.2
|
||||
10.5.3
|
|
@ -1,7 +1,7 @@
|
|||
CACHE MANIFEST
|
||||
|
||||
# THIS FILE WAS GENERATED. DO NOT MODIFY!
|
||||
# 03/20/2019 08:08 AM
|
||||
# 03/21/2019 05:03 PM
|
||||
|
||||
app.html
|
||||
index.html?offline=1
|
||||
|
|
|
@ -389,7 +389,7 @@
|
|||
|
||||
// Gets the diagram bounds and sets the document size
|
||||
bounds = (graph.pdfPageVisible) ? graph.view.getBackgroundPageBounds() : graph.getGraphBounds();
|
||||
bounds.width = Math.ceil(bounds.width + data.border);
|
||||
bounds.width = Math.ceil(bounds.width + data.border) + 1; //The 1 extra pixels to prevent cutting the cells on the edges when crop is enabled
|
||||
bounds.height = Math.ceil(bounds.height + data.border);
|
||||
|
||||
// Converts the graph to a vertical sequence of pages for PDF export
|
||||
|
@ -407,7 +407,7 @@
|
|||
|
||||
// Applies print scale
|
||||
pf = mxRectangle.fromRectangle(pf);
|
||||
pf.width = Math.ceil(pf.width);
|
||||
pf.width = Math.ceil(pf.width) + 1; //The 1 extra pixels to prevent cutting the cells on the right edge of the page
|
||||
pf.height = Math.ceil(pf.height);
|
||||
|
||||
// Starts at first visible page
|
||||
|
|
12
src/main/webapp/js/app.min.js
vendored
12
src/main/webapp/js/app.min.js
vendored
|
@ -8250,7 +8250,7 @@ document.createElement("canvas"),F=new Image;F.onload=function(){try{I.getContex
|
|||
var ErrorDialog=function(a,c,b,d,g,e,l,m,p,q,f){p=null!=p?p:!0;var k=document.createElement("div");k.style.textAlign="center";if(null!=c){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,c);n.setAttribute("title",c);k.appendChild(n)}c=
|
||||
document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=b;k.appendChild(c);b=document.createElement("div");b.style.marginTop="12px";b.style.textAlign="center";null!=e&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=q&&(q=mxUtils.button(q,function(){null!=f&&f()}),q.className="geBtn",b.appendChild(q));var u=mxUtils.button(d,function(){p&&a.hideDialog();null!=g&&g()});
|
||||
u.className="geBtn";b.appendChild(u);null!=l&&(d=mxUtils.button(l,function(){p&&a.hideDialog();null!=m&&m()}),d.className="geBtn gePrimaryBtn",b.appendChild(d));this.init=function(){u.focus()};k.appendChild(b);this.container=k};
|
||||
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.5.2";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=
|
||||
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.5.3";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=
|
||||
EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",k=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=k+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+
|
||||
encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+encodeURIComponent(e.stack):"")}}catch(z){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):
|
||||
"")}catch(n){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(n){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.dev){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);
|
||||
|
@ -8733,11 +8733,11 @@ value:Editor.guid(32)}),m.push({key:"secret",value:Editor.guid(32)}));B||(null!=
|
|||
resons.push("stale revision");var l=": "+g.join(", ");p({message:mxResources.get("errorSavingFile")+l},d);try{EditorUi.sendReport("Critical: Error saving to Google Drive "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+a.desc.id+" "+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"unknown")+"."+(null!=a.sync?a.sync.clientId:"nosync")+"\nErrors="+l+"\nOld="+u+" "+n+" etag-hash="+this.ui.hashValue(k)+"\nNew="+d.headRevisionId+" "+d.modifiedDate+" etag-hash="+this.ui.hashValue(d.etag)),
|
||||
EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+u+"."+n+"-"+this.ui.hashValue(k)+"-to-"+d.headRevisionId+"."+d.modifiedDate+"-"+this.ui.hashValue(d.etag)+(0<l.length?"-errors-"+l:""),null!=this.user?this.user.id:"unknown")}catch(M){}}else{b(d,A);if(null!=v){this.executeRequest(gapi.client.drive.revisions.get({fileId:v.id,revisionId:v.headRevisionId,supportsTeamDrives:!0}),mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest(gapi.client.drive.revisions.update({fileId:v.id,
|
||||
revisionId:v.headRevisionId,resource:a}))})));try{EditorUi.logEvent({category:a.convertedFrom+"-CONVERT-FILE-"+a.getHash(),action:"from-"+v.id+"."+v.headRevisionId+"-to-"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?this.user.id:"unknown-user."+(null!=a.sync?a.sync.clientId:"nosync")})}catch(M){}}try{EditorUi.logEvent({category:"SUCCESS-SAVE-FILE-"+a.getHash()+"."+u+"."+n,action:"saved-"+d.headRevisionId+"."+d.modifiedDate,label:(null!=this.user?this.user.id:"unknown-user")+"."+(null!=
|
||||
a.sync?a.sync.clientId:"nosync")})}catch(M){}}}catch(M){q(M)}}),D=mxUtils.bind(this,function(b,e){try{null!=m&&(x.properties=m);var f=l||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,k=mxUtils.bind(this,function(d){try{var l=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType;this.executeRequest(this.createUploadRequest(a.getId(),x,b,c||d||l,e,d?null:f,y),z,mxUtils.bind(this,function(b){try{a.isConflict(b)?
|
||||
this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(k,2*g*this.coolOff*(1+.1*(Math.random()-.5)));else{k(!0);try{EditorUi.logError("Warning: Stale Etag Overwrite "+a.getHash(),null,a.desc.id+"."+a.desc.headRevisionId,null!=this.user?this.user.id:"unknown."+(null!=a.sync?a.sync.clientId:"nosync"))}catch(Y){}}else null!=p&&p(b,c)}catch(Y){q(Y)}}),
|
||||
mxUtils.bind(this,function(){null!=p&&p(b)})):p(b)}catch(W){q(W)}}))}catch(U){q(U)}});if(t&&null==d){var n=new Image;n.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/n.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(n.height*a);b.getContext("2d").drawImage(n,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");x.thumbnail={image:c,mimeType:"image/png"};k(!1)}catch(W){k(!1)}});n.src=
|
||||
"data:image/png;base64,"+b}else k(!1)}catch(O){q(O)}});t?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),p,this.ui.getCurrentFile()!=a?A:null):D(A,!1)}catch(H){q(H)}}),A=mxUtils.bind(this,function(){(e||t||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(B){}b=
|
||||
null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");y(b,"image/png")}catch(B){q(B)}})))&&y(null,null,a.constructor!=DriveLibrary)});g||!c?A():this.verifyMimeType(a.getId(),A,!0)}else this.ui.editor.graph.reset(),null!=p&&p({message:mxResources.get("readOnly")})}catch(z){q(z)}};
|
||||
a.sync?a.sync.clientId+"-chan-"+(a.sync.channelId||"none"):"nosync")})}catch(M){}}}catch(M){q(M)}}),D=mxUtils.bind(this,function(b,e){try{null!=m&&(x.properties=m);var f=l||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,k=mxUtils.bind(this,function(d){try{var l=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType;this.executeRequest(this.createUploadRequest(a.getId(),x,b,c||d||l,e,d?null:
|
||||
f,y),z,mxUtils.bind(this,function(b){try{a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){try{if(null!=c&&c.etag==f)if(g<this.maxRetries)g++,window.setTimeout(k,2*g*this.coolOff*(1+.1*(Math.random()-.5)));else{k(!0);try{EditorUi.logError("Warning: Stale Etag Overwrite "+a.getHash(),null,a.desc.id+"."+a.desc.headRevisionId,null!=this.user?this.user.id:"unknown."+(null!=a.sync?a.sync.clientId:
|
||||
"nosync"))}catch(Y){}}else null!=p&&p(b,c)}catch(Y){q(Y)}}),mxUtils.bind(this,function(){null!=p&&p(b)})):p(b)}catch(W){q(W)}}))}catch(U){q(U)}});if(t&&null==d){var n=new Image;n.onload=mxUtils.bind(this,function(){try{var a=this.thumbnailWidth/n.width,b=document.createElement("canvas");b.width=this.thumbnailWidth;b.height=Math.floor(n.height*a);b.getContext("2d").drawImage(n,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");x.thumbnail=
|
||||
{image:c,mimeType:"image/png"};k(!1)}catch(W){k(!1)}});n.src="data:image/png;base64,"+b}else k(!1)}catch(O){q(O)}});t?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),p,this.ui.getCurrentFile()!=a?A:null):D(A,!1)}catch(H){q(H)}}),A=mxUtils.bind(this,function(){(e||t||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=a.desc.mimeType&&"application/vnd.jgraph.mxfile"!=a.desc.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,
|
||||
function(a){try{var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(B){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");y(b,"image/png")}catch(B){q(B)}})))&&y(null,null,a.constructor!=DriveLibrary)});g||!c?A():this.verifyMimeType(a.getId(),A,!0)}else this.ui.editor.graph.reset(),null!=p&&p({message:mxResources.get("readOnly")})}catch(z){q(z)}};
|
||||
DriveClient.prototype.verifyMimeType=function(a,c,b,d){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var g=(new Date).getTime();if(b||g-this.lastMimeCheck>this.mimeTypeCheckCoolOff)this.lastMimeCheck=g,this.checkingMimeType||(this.checkingMimeType=!0,this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:"mimeType",supportsTeamDrives:!0}),mxUtils.bind(this,function(b){this.checkingMimeType=!1;null!=b&&"application/vnd.jgraph.mxfile.realtime"==b.mimeType?this.redirectToNewApp(d,a):null!=
|
||||
c&&c()})))};
|
||||
DriveClient.prototype.redirectToNewApp=function(a,c){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var b=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#G"+c,d=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==b?window.location.reload():window.location.href=b});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),d,mxUtils.bind(this,function(){this.redirectDialogShowing=
|
||||
|
|
|
@ -1296,7 +1296,8 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec
|
|||
'.' + head0 + '.' + mod0, action: 'saved-' + resp.headRevisionId +
|
||||
'.' + resp.modifiedDate, label: ((this.user != null) ?
|
||||
this.user.id : 'unknown-user') + '.' + ((file.sync != null) ?
|
||||
file.sync.clientId : 'nosync')});
|
||||
(file.sync.clientId + '-chan-' + (file.sync.channelId || 'none')) :
|
||||
'nosync')});
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
|
|
|
@ -208,6 +208,9 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
|
|||
|
||||
this.selectPage = function(number)
|
||||
{
|
||||
if(this.handlingResize)
|
||||
return;
|
||||
|
||||
this.currentPage = mxUtils.mod(number, this.diagrams.length);
|
||||
this.updateGraphXml(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(
|
||||
this.diagrams[this.currentPage]))).documentElement);
|
||||
|
@ -532,18 +535,18 @@ GraphViewer.prototype.addSizeHandler = function()
|
|||
|
||||
var lastOffsetWidth = null;
|
||||
var cachedOffsetWidth = null;
|
||||
var handlingResize = false;
|
||||
this.handlingResize = false;
|
||||
|
||||
// Installs function on instance
|
||||
this.fitGraph = function(maxScale)
|
||||
this.fitGraph = mxUtils.bind(this, function(maxScale)
|
||||
{
|
||||
var cachedOffsetWidth = container.offsetWidth;
|
||||
|
||||
if (cachedOffsetWidth != lastOffsetWidth)
|
||||
{
|
||||
if (!handlingResize)
|
||||
if (!this.handlingResize)
|
||||
{
|
||||
handlingResize = true;
|
||||
this.handlingResize = true;
|
||||
|
||||
this.graph.maxFitScale = (maxScale != null) ? maxScale : (this.graphConfig.zoom ||
|
||||
((this.allowZoomIn) ? null : 1));
|
||||
|
@ -561,13 +564,13 @@ GraphViewer.prototype.addSizeHandler = function()
|
|||
lastOffsetWidth = cachedOffsetWidth;
|
||||
|
||||
// Workaround for fit triggering scrollbars triggering doResize (infinite loop)
|
||||
window.setTimeout(function()
|
||||
window.setTimeout(mxUtils.bind(this, function()
|
||||
{
|
||||
handlingResize = false;
|
||||
}, 0);
|
||||
this.handlingResize = false;
|
||||
}), 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
// Fallback for older browsers
|
||||
if (GraphViewer.useResizeSensor)
|
||||
|
@ -608,7 +611,7 @@ GraphViewer.prototype.addSizeHandler = function()
|
|||
{
|
||||
window.clearTimeout(scheduledResize);
|
||||
|
||||
if (!handlingResize)
|
||||
if (!this.handlingResize)
|
||||
{
|
||||
scheduledResize = window.setTimeout(mxUtils.bind(this, this.fitGraph), 100);
|
||||
}
|
||||
|
|
|
@ -8649,9 +8649,11 @@ var com;
|
|||
if (position === void 0) { position = 0; }
|
||||
return str.substr(position, searchString.length) === searchString;
|
||||
})(format, "{{")) {
|
||||
//TODO FIXME find a date formatter (may be https://github.com/noahcooper/SimpleDateFormatJS)
|
||||
//value = new java.text.SimpleDateFormat(/* replaceAll */ format.replace(new RegExp("\\{|\\}", 'g'), "")).format(new Date(Shape.VSDX_START_TIME + Math.floor((parseFloat(value) * 24 * 60 * 60 * 1000))));
|
||||
value = new Date(Shape.VSDX_START_TIME + Math.floor((parseFloat(value) * 24 * 60 * 60 * 1000))).toString();
|
||||
//Our date format function swaps M/m meaning
|
||||
format = format.replace(/m/g, '@').replace(/M/g, 'm').replace(/@/g, 'M');
|
||||
//Date can be in string date format or a number
|
||||
var date = isNaN(value)? new Date(value) : new Date(Shape.VSDX_START_TIME + Math.floor((parseFloat(value) * 24 * 60 * 60 * 1000)));
|
||||
value = Graph.prototype.formatDate(date, /* replaceAll */ format.replace(new RegExp("\\{|\\}", 'g'), ""));
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
|
|
30
src/main/webapp/js/extensions.min.js
vendored
30
src/main/webapp/js/extensions.min.js
vendored
|
@ -879,21 +879,21 @@ this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,d){f.prototype
|
|||
a.equals?a.equals(b):a===b}(g,"Enhanced Metafile")||function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"EnhMetaFile"))h="png";else return;g=a.firstChild;if(null!=g){if(null!=g&&1==g.nodeType){var m=g;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(m.nodeName.toLowerCase(),"rel")&&(m=m.getAttribute("r:id"),null!=m&&0!==m.length)){var g=p.lastIndexOf("/"),l="",n="";try{l=p.substring(0,g),n=p.substring(g,p.length)}catch(z){return}g=d.getRelationship(m,l+"/_rels"+n+".rels");if(null!=g){p=g.getAttribute("Target")||
|
||||
"";m=g.getAttribute("Type");g=p.lastIndexOf("/");try{p=p.substring(g+1,p.length)}catch(z){return}null!=m&&function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(m,"image")&&(this.imageData={},(g=d.getMedia(c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+p))?(this.imageData.iData=g,function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(p.toLowerCase(),".bmp")&&(h="jpg"),this.imageData.iType=h):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}return}}g=
|
||||
g.nextSibling}}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(h,c.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=a)};b.prototype.parseSection=function(a){var d=a.getAttribute("N");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Geometry"))null==this.geom&&(this.geom=[]),0<this.geom.push(a);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Field")){a=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var h=0;h<a.length;h++){var d=a[h],p=d.getAttribute("IX")||
|
||||
"";if(0!==p.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1",d.getAttribute("Del")))this.fields[p]="";else{for(var g=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),m="",l="",n=0;n<g.length;n++){var z=g[n],d=z.getAttribute("N"),z=z.getAttribute("V")||z.textContent||"";switch(d){case "Value":m=z;break;case "Format":l=z}}if(0!==m.length){try{(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b})(l,"{{")&&(m=(new Date(b.VSDX_START_TIME+
|
||||
Math.floor(864E5*parseFloat(m)))).toString())}catch(I){}this.fields[p]=m}}}}else f.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};b.prototype.getWidth=function(){return 0===this.width&&0<this.height?1:this.width};b.prototype.getHeight=function(){return 0===
|
||||
this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.textToList=function(a,b){if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"")){var d=this.getBullet(b);if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(d,
|
||||
"0")){var f=a.split("\n");f[f.length-1]||f.pop();for(var g="",m=0;m<f.length;m++)g+=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(f[m],"li");g=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(g,"ul");f={};(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"4")?f["list-style-type"]="square":f["list-style-type"]="disc";return g=this.insertAttributes(g,f)}}return a};b.prototype.getTextParagraphFormated=function(a){var b="",c={};c.align=this.getHorizontalAlign(this.pp,!0);c["margin-left"]=this.getIndentLeft(this.pp);
|
||||
c["margin-right"]=this.getIndentRight(this.pp);c["margin-top"]=this.getSpBefore(this.pp)+"px";c["margin-bottom"]=this.getSpAfter(this.pp)+"px";c["text-indent"]=this.getIndentFirst(this.pp);c.valign=this.getAlignVertical();c.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,c)};b.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",h="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",g=
|
||||
"direction:"+this.getRtlText(this.cp)+";",m="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",l="line-height:"+this.getSpcLine(this.pp),n=";opacity:"+this.getTextOpacity(this.cp),z=this.getTextPos(this.cp),I=this.getTextCase(this.cp);(function(a,b){return a&&a.equals?a.equals(b):a===b})(I,"1")?a=a.toUpperCase():function(a,b){return a&&a.equals?a.equals(b):a===b}(I,"2")&&(a=c.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(a,b){return a&&a.equals?a.equals(b):a===b})(z,
|
||||
"1")?a=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(a,b){return a&&a.equals?a.equals(b):a===b}(z,"2")&&(a=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"i"):a;a=this.isUnderline(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;
|
||||
a=this.isSmallCaps(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return""+('<font style="'+h+f+b+g+m+l+n+'">'+a+"</font>")};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===
|
||||
a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};b.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};b.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d),d=a.substring(0,d),g=' style="'+c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return d+g+f}return a};b.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,
|
||||
a,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};b.prototype.isItalic=function(a){var b=!1;a=
|
||||
this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};b.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=4===(parseInt(a)&4));return b};b.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);
|
||||
(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};b.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};b.prototype.getTextSize=
|
||||
function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.floor(Math.round(100*a)/100)};b.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),"1"));0===b?a=mxConstants.ALIGN_TOP:2===
|
||||
b&&(a=mxConstants.ALIGN_BOTTOM);return a};b.prototype.getGeomList=function(){return this.geomList};b.prototype.getLastX=function(){return this.lastX};b.prototype.getLastY=function(){return this.lastY};b.prototype.getLastMoveX=function(){return this.lastMoveX};b.prototype.getLastMoveY=function(){return this.lastMoveY};b.prototype.getLastKnot=function(){return this.lastKnot};b.prototype.setLastX=function(a){this.lastX=a};b.prototype.setLastY=function(a){this.lastY=a};b.prototype.setLastMoveX=function(a){this.lastMoveX=
|
||||
a};b.prototype.setLastMoveY=function(a){this.lastMoveY=a};b.prototype.setLastKnot=function(a){this.lastKnot=a};return b}(c.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=-22091688E5;g.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(l.vsdx||(l.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
|
||||
"";if(0!==p.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1",d.getAttribute("Del")))this.fields[p]="";else{for(var g=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),m="",l="",n=0;n<g.length;n++){var z=g[n],d=z.getAttribute("N"),z=z.getAttribute("V")||z.textContent||"";switch(d){case "Value":m=z;break;case "Format":l=z}}if(0!==m.length){try{if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(l,"{{"))var l=l.replace(/m/g,
|
||||
"@").replace(/M/g,"m").replace(/@/g,"M"),I=isNaN(m)?new Date(m):new Date(b.VSDX_START_TIME+Math.floor(864E5*parseFloat(m))),m=Graph.prototype.formatDate(I,l.replace(RegExp("\\{|\\}","g"),""))}catch(G){}this.fields[p]=m}}}}else f.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?
|
||||
this.text.childNodes:null};b.prototype.getWidth=function(){return 0===this.width&&0<this.height?1:this.width};b.prototype.getHeight=function(){return 0===this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.textToList=function(a,
|
||||
b){if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(b,"")){var d=this.getBullet(b);if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"0")){var f=a.split("\n");f[f.length-1]||f.pop();for(var g="",m=0;m<f.length;m++)g+=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(f[m],"li");g=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(g,"ul");f={};(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"4")?f["list-style-type"]="square":f["list-style-type"]="disc";return g=this.insertAttributes(g,f)}}return a};
|
||||
b.prototype.getTextParagraphFormated=function(a){var b="",c={};c.align=this.getHorizontalAlign(this.pp,!0);c["margin-left"]=this.getIndentLeft(this.pp);c["margin-right"]=this.getIndentRight(this.pp);c["margin-top"]=this.getSpBefore(this.pp)+"px";c["margin-bottom"]=this.getSpAfter(this.pp)+"px";c["text-indent"]=this.getIndentFirst(this.pp);c.valign=this.getAlignVertical();c.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,c)};b.prototype.getTextCharFormated=function(a){var b=
|
||||
"color:"+this.getTextColor(this.cp)+";",h="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",g="direction:"+this.getRtlText(this.cp)+";",m="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",l="line-height:"+this.getSpcLine(this.pp),n=";opacity:"+this.getTextOpacity(this.cp),z=this.getTextPos(this.cp),I=this.getTextCase(this.cp);(function(a,b){return a&&a.equals?a.equals(b):a===b})(I,"1")?a=a.toUpperCase():function(a,b){return a&&
|
||||
a.equals?a.equals(b):a===b}(I,"2")&&(a=c.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(a,b){return a&&a.equals?a.equals(b):a===b})(z,"1")?a=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(a,b){return a&&a.equals?a.equals(b):a===b}(z,"2")&&(a=c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"i"):a;a=this.isUnderline(this.cp)?
|
||||
c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?c.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return""+('<font style="'+h+f+b+g+m+l+n+'">'+a+"</font>")};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};
|
||||
b.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};b.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};b.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d),d=a.substring(0,d),g=' style="'+c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return d+g+f}return a};b.prototype.getRtlText=
|
||||
function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?
|
||||
a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};b.prototype.isItalic=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};b.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),
|
||||
"themed")||(b=4===(parseInt(a)&4));return b};b.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};b.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getValue(a,
|
||||
"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};b.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.floor(Math.round(100*a)/100)};b.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),
|
||||
"1"));0===b?a=mxConstants.ALIGN_TOP:2===b&&(a=mxConstants.ALIGN_BOTTOM);return a};b.prototype.getGeomList=function(){return this.geomList};b.prototype.getLastX=function(){return this.lastX};b.prototype.getLastY=function(){return this.lastY};b.prototype.getLastMoveX=function(){return this.lastMoveX};b.prototype.getLastMoveY=function(){return this.lastMoveY};b.prototype.getLastKnot=function(){return this.lastKnot};b.prototype.setLastX=function(a){this.lastX=a};b.prototype.setLastY=function(a){this.lastY=
|
||||
a};b.prototype.setLastMoveX=function(a){this.lastMoveX=a};b.prototype.setLastMoveY=function(a){this.lastMoveY=a};b.prototype.setLastKnot=function(a){this.lastKnot=a};return b}(c.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=-22091688E5;g.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(l.vsdx||(l.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
|
||||
(function(c){(function(n){(function(l){(function(g){var m=function(f){function b(a,b,h,p,g,m){var d=this;d.masterShape=null;d.master=null;d.parentHeight=0;d=f.call(this,b,m)||this;d.htmlLabels=!0;d.rootShape=d;d.shapeName=null;d.shapeIndex=0;d.vertex=!0;d.childShapes={};var l=d.getMasterId(),n=d.getShapeMasterId();d.master=null!=l?p[l]?p[l]:null:g;null!=d.master&&(d.masterShape=null==l&&null!=n?d.master.getSubShape(n):d.master.getMasterShape());p=d.getNameU();g=p.lastIndexOf(".");-1!==g&&(p=p.substring(0,
|
||||
g));d.shapeName=p;b=b.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=b&&0<b.length&&(b=b.item(0),d.childShapes=a.parseShapes(b,d.master,!1));b=d.calcRotation();d.rotation=100*b/100;d.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(d.getValue(d.getCellElement$java_lang_String("ThemeIndex"),"0")));m=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===
|
||||
b)return a.entries[d].value;return null}(m.getThemes(),b);a=a.getCellIntValue("VariationColorIndex",0);d.setThemeAndVariant(m,a);b=function(a){null==a.entries&&(a.entries=[]);return a.entries}(d.childShapes);for(p=0;p<b.length;p++)g=b[p].getValue(),g.setRootShape(d),null==g.theme&&g.setThemeAndVariant(m,a);d.quickStyleVals=new c.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillColor"),
|
||||
|
|
435
src/main/webapp/js/viewer.min.js
vendored
435
src/main/webapp/js/viewer.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue