10.0.29 release
This commit is contained in:
parent
943c4bc362
commit
bed4c31a32
13 changed files with 1568 additions and 1525 deletions
|
@ -1,3 +1,8 @@
|
|||
10-JAN-2019: 10.0.29
|
||||
|
||||
- Improved error handling for CSV import
|
||||
- Uses mxGraph 3.9.13 beta 5
|
||||
|
||||
10-JAN-2019: 10.0.28
|
||||
|
||||
- Uses mxGraph 3.9.13 beta 4
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
10.0.28
|
||||
10.0.29
|
|
@ -1037,7 +1037,7 @@ mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a)
|
|||
0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
|
||||
mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
|
||||
mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
|
||||
mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
|
||||
mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}if(c.getParent(e)==c.getRoot()||e==this.currentRoot)e=null;return e};
|
||||
mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,k=f.y,l=c,m=k,n=1;n<b.length;n++){var p=b[n];null!=p&&(e=f.x-p.x,f=f.y-p.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=p,c=Math.min(f.x,c),k=Math.min(f.y,k),l=Math.max(f.x,l),m=Math.max(f.y,m))}a.length=d;a.segments=g;a.x=c;a.y=k;a.width=Math.max(1,l-c);a.height=
|
||||
Math.max(1,m-k)}};
|
||||
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(m=b.offset,null!=m&&(c+=m.x,d+=m.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],k=0,l=1;f>=Math.round(k+g)&&l<e-1;)k+=g,g=a.segments[l++];e=0==g?0:(f-k)/g;f=a.absolutePoints[l-1];l=a.absolutePoints[l];if(null!=f&&null!=l){k=c=d=0;if(null!=b){var d=b.y,m=b.offset;null!=m&&(c=m.x,k=m.y)}m=l.x-f.x;l=l.y-f.y;c=
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
CACHE MANIFEST
|
||||
|
||||
# THIS FILE WAS GENERATED. DO NOT MODIFY!
|
||||
# 01/10/2019 12:38 PM
|
||||
# 01/10/2019 04:12 PM
|
||||
|
||||
app.html
|
||||
index.html?offline=1
|
||||
|
|
1411
src/main/webapp/js/app.min.js
vendored
1411
src/main/webapp/js/app.min.js
vendored
File diff suppressed because it is too large
Load diff
665
src/main/webapp/js/atlas-viewer.min.js
vendored
665
src/main/webapp/js/atlas-viewer.min.js
vendored
File diff suppressed because one or more lines are too long
267
src/main/webapp/js/atlas.min.js
vendored
267
src/main/webapp/js/atlas.min.js
vendored
|
@ -1180,7 +1180,7 @@ mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a)
|
|||
0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
|
||||
mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
|
||||
mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
|
||||
mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
|
||||
mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}if(c.getParent(e)==c.getRoot()||e==this.currentRoot)e=null;return e};
|
||||
mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,k=f.y,l=c,m=k,n=1;n<b.length;n++){var p=b[n];null!=p&&(e=f.x-p.x,f=f.y-p.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=p,c=Math.min(f.x,c),k=Math.min(f.y,k),l=Math.max(f.x,l),m=Math.max(f.y,m))}a.length=d;a.segments=g;a.x=c;a.y=k;a.width=Math.max(1,l-c);a.height=
|
||||
Math.max(1,m-k)}};
|
||||
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(m=b.offset,null!=m&&(c+=m.x,d+=m.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],k=0,l=1;f>=Math.round(k+g)&&l<e-1;)k+=g,g=a.segments[l++];e=0==g?0:(f-k)/g;f=a.absolutePoints[l-1];l=a.absolutePoints[l];if(null!=f&&null!=l){k=c=d=0;if(null!=b){var d=b.y,m=b.offset;null!=m&&(c=m.x,k=m.y)}m=l.x-f.x;l=l.y-f.y;c=
|
||||
|
@ -7401,9 +7401,10 @@ DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var c=new mxCodec(mxUt
|
|||
DrawioFile.prototype.checkPages=function(){this.ui.getCurrentFile()!=this||null!=this.ui.pages&&0!=this.ui.pages.length||this.sendErrorReport("Pages is null or empty","ShadowPages: "+(null!=this.shadowPages)+"\nShadowData: "+(null!=this.shadowData))};
|
||||
DrawioFile.prototype.checkShadow=function(a){if(null==a||0==a.length){var c=null==this.shadowData?"null":this.compressReportData(this.ui.anonymizeString(this.shadowData),null,5E3);this.sendErrorReport("Shadow is null or empty","Shadow: "+(null!=a?a.length:"null")+"\nShadowPages: "+(null!=this.shadowPages?this.shadowPages.length:"null")+"\nShadowData: "+c)}};
|
||||
DrawioFile.prototype.compressReportData=function(a,c,b){null!=a&&a.length>(null!=c?c:1E4)&&(a=this.ui.editor.graph.compress(a)+"\n");null!=b&&null!=a&&a.length>b&&(a=a.substring(0,b)+"[...]");return a};
|
||||
DrawioFile.prototype.checksumError=function(a,c,b){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var e=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),2E4),g=this.compressReportData(JSON.stringify(c,null,2));this.sendErrorReport("Checksum Error",(null!=b?b:"")+"\n\nPatches:\n"+g+"\n\nData:\n"+e)}catch(h){}};
|
||||
DrawioFile.prototype.sendErrorReport=function(a,c,b){try{var e=this.getCurrentUser(),g=null!=e?this.ui.hashValue(e.id):"unknown",h=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var l=this.getTitle(),p=l.lastIndexOf("."),e="xml";0<p&&(e=l.substring(p));var n=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+
|
||||
this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+e+")\nUser="+g+" ("+h+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nStack:\n"+n)}catch(d){}};
|
||||
DrawioFile.prototype.checksumError=function(a,c,b,e){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(null!=c)for(a=0;a<c.length;a++)this.ui.anonymizePatch(c[a]);var g=mxUtils.bind(this,function(a){var e=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),g=this.compressReportData(JSON.stringify(c,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
|
||||
25E3):"n/a";this.sendErrorReport("Checksum Error",(null!=b?b:"")+"\n\nPatches:\n"+g+"\n\nLocal:\n"+e+(null!=a?"\nRemote:\n"+a:""),null,7E4)});null==e?g(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==e?g(a):g(null)}),function(){})}catch(h){}};
|
||||
DrawioFile.prototype.sendErrorReport=function(a,c,b,e){try{var g=this.getCurrentUser(),h=null!=g?this.ui.hashValue(g.id):"unknown",l=null!=this.sync?this.sync.clientId:"no sync";null!=this.stats.start&&(this.stats.uptime=Math.round(((new Date).getTime()-(new Date(this.stats.start)).getTime())/1E3));var p=this.getTitle(),n=p.lastIndexOf("."),g="xml";0<n&&(g=p.substring(n));var d=null!=b?b.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+":\n\nBrowser="+navigator.userAgent+"\nFile="+
|
||||
this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+g+")\nUser="+h+" ("+l+")\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\nSync="+DrawioFile.SYNC+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=c?"\n\n"+c:"")+"\n\nStack:\n"+d,e)}catch(f){}};
|
||||
DrawioFile.prototype.reloadFile=function(a,c){try{this.ui.spinner.stop();var b=mxUtils.bind(this,function(){this.stats.reload++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),c=this.ui.editor.graph.getSelectionCells(),h=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(h,b,c);null!=this.backupPatch&&this.patch([this.backupPatch]);var e=this.ui.getCurrentFile();null!=e&&(e.stats=this.stats);
|
||||
null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}catch(e){null!=c&&c(e)}};DrawioFile.prototype.copyFile=function(a,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
|
||||
DrawioFile.prototype.ignorePatches=function(a){for(var c=!0,b=0;b<a.length&&c;b++)c=c&&0==Object.keys(a[b]).length;return c};
|
||||
|
@ -7538,21 +7539,21 @@ p.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setNa
|
|||
n=document.createElement("option");n.setAttribute("value","diagram");mxUtils.write(n,mxResources.get("diagram"));"plantUml"!=b&&p.appendChild(n);n=document.createElement("option");n.setAttribute("value","plantUmlSvg");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&n.setAttribute("selected","selected");var d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
|
||||
")");var f=document.createElement("option");f.setAttribute("value","plantUmlTxt");mxUtils.write(f,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(p.appendChild(n),p.appendChild(d),p.appendChild(f));var m=g();l.value=m;c.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.addEventListener("drop",function(a){a.stopPropagation();
|
||||
a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){l.value=a.target.result};b.readAsText(a)}},!1));c.appendChild(p);mxEvent.addListener(p,"change",function(){var a=g();if(0==l.value.length||l.value==m)m=a,l.value=m});b=mxUtils.button(mxResources.get("close"),function(){l.value==m?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("insert"),
|
||||
function(){a.hideDialog();e(l.value,p.value)});c.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,e,g,h,l,p,n,d,f,m,q,t,u){function w(){var a=!0;if(null!=O)for(;C<O.length&&(a||0!=mxUtils.mod(C,30));)a=O[C++],v(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview),a=!1}function y(){if(aa)b||a.hideDialog(),t(aa,Z,G.value);else if(e)b||a.hideDialog(),e(P,G.value);else{var d=G.value;
|
||||
null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,P,null!=T&&0<T.length?T:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function k(a,b,d,f,k){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");F.removeAttribute("disabled");P=b;T=d;S=a;aa=f;Z=k;S.style.backgroundColor=p;S.style.border=n}function v(b,d,f,c,m,e,q,t,z){var u=document.createElement("div");u.className="geTemplate";
|
||||
u.style.height=Q+"px";u.style.width=L+"px";null!=c&&0<c.length&&u.setAttribute("title",c);if(null!=e)u.style.backgroundImage="url("+e+")",u.style.backgroundSize="contain",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",mxEvent.addListener(u,"click",function(a){k(u,null,null,b,q)}),mxEvent.addListener(u,"dblclick",function(a){y()});else if(null!=b&&0<b.length){f=z||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";u.style.backgroundImage="url("+f+")";u.style.backgroundPosition=
|
||||
function(){a.hideDialog();e(l.value,p.value)});c.appendChild(n);n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(b);this.container=c},NewDialog=function(a,c,b,e,g,h,l,p,n,d,f,m,q,t,u){function w(){var a=!0;if(null!=P)for(;C<P.length&&(a||0!=mxUtils.mod(C,30));)a=P[C++],v(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick,a.preview),a=!1}function y(){if(Z)b||a.hideDialog(),t(Z,Y,G.value);else if(e)b||a.hideDialog(),e(Q,G.value);else{var d=G.value;
|
||||
null!=d&&0<d.length&&a.pickFolder(a.mode,function(b){a.createFile(d,Q,null!=T&&0<T.length?T:null,null,function(){a.hideDialog()},null,b)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function k(a,b,d,f,k){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");F.removeAttribute("disabled");Q=b;T=d;S=a;Z=f;Y=k;S.style.backgroundColor=p;S.style.border=n}function v(b,d,f,c,m,e,q,t,z){var u=document.createElement("div");u.className="geTemplate";
|
||||
u.style.height=R+"px";u.style.width=L+"px";null!=c&&0<c.length&&u.setAttribute("title",c);if(null!=e)u.style.backgroundImage="url("+e+")",u.style.backgroundSize="contain",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",mxEvent.addListener(u,"click",function(a){k(u,null,null,b,q)}),mxEvent.addListener(u,"dblclick",function(a){y()});else if(null!=b&&0<b.length){f=z||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";u.style.backgroundImage="url("+f+")";u.style.backgroundPosition=
|
||||
"center center";u.style.backgroundRepeat="no-repeat";var v=!1;mxEvent.addListener(u,"click",function(f){F.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";f=b;f=/^https?:\/\//.test(f)&&!a.isCorsEnabledForUrl(f)?PROXY_URL+"?url="+encodeURIComponent(f):TEMPLATE_PATH+"/"+f;mxUtils.get(f,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(k(u,a.getText(),d),v&&y())}))});mxEvent.addListener(u,"dblclick",function(a){v=!0})}else u.innerHTML=
|
||||
'<table width="100%" height="100%" style="line-height:1em;"><tr><td align="center" valign="middle">'+mxResources.get(f)+"</td></tr></table>",m&&k(u),null!=t?mxEvent.addListener(u,"click",t):(mxEvent.addListener(u,"click",function(a){k(u)}),mxEvent.addListener(u,"dblclick",function(a){y()}));N.appendChild(u)}function z(){mxEvent.addListener(N,"scroll",function(a){N.scrollTop+N.clientHeight>=N.scrollHeight&&(w(),mxEvent.consume(a))});var a=null,b;for(b in U){var f=document.createElement("div"),k=mxResources.get(b),
|
||||
c=U[b];null==k&&(k=b.substring(0,1).toUpperCase()+b.substring(1));18<k.length&&(k=k.substring(0,18)+"…");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";f.setAttribute("title",k+" ("+c.length+")");mxUtils.write(f,f.getAttribute("title"));null!=d&&(f.style.padding=d);Y.appendChild(f);null==a&&(a=f,a.style.backgroundColor=l);(function(b,d){mxEvent.addListener(f,"click",function(){a!=d&&(a.style.backgroundColor=
|
||||
"",a=d,a.style.backgroundColor=l,N.scrollTop=0,N.innerHTML="",C=0,O=U[b],A=null,w())})})(b,f)}w()}b=null!=b?b:!0;g=null!=g?g:!1;l=null!=l?l:"#ebf2f9";p=null!=p?p:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";b&&D.appendChild(B);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");
|
||||
c=U[b];null==k&&(k=b.substring(0,1).toUpperCase()+b.substring(1));18<k.length&&(k=k.substring(0,18)+"…");f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";f.setAttribute("title",k+" ("+c.length+")");mxUtils.write(f,f.getAttribute("title"));null!=d&&(f.style.padding=d);X.appendChild(f);null==a&&(a=f,a.style.backgroundColor=l);(function(b,d){mxEvent.addListener(f,"click",function(){a!=d&&(a.style.backgroundColor=
|
||||
"",a=d,a.style.backgroundColor=l,N.scrollTop=0,N.innerHTML="",C=0,P=U[b],A=null,w())})})(b,f)}w()}b=null!=b?b:!0;g=null!=g?g:!1;l=null!=l?l:"#ebf2f9";p=null!=p?p:"#e6eff8";n=null!=n?n:"1px solid #ccd9ea";f=null!=f?f:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.height="46px";b&&D.appendChild(B);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");
|
||||
x.style.width="40px";x.style.height="40px";x.style.marginRight="10px";x.style.paddingBottom="4px";x.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!c&&b&&B.appendChild(x);
|
||||
b&&mxUtils.write(B,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");x=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?x=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?x=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?x=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?x=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(x=a.trello.extension);var G=document.createElement("input");
|
||||
G.setAttribute("value",a.defaultFilename+x);G.style.marginRight="20px";G.style.marginLeft="10px";G.style.width=c?"220px":"430px";this.init=function(){b&&(G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?G.select():document.execCommand("selectAll",!1,null))};b&&B.appendChild(G);var B=!1,C=0,F=mxUtils.button(mxResources.get("create"),function(){F.setAttribute("disabled","disabled");y();F.removeAttribute("disabled")});F.className="geBtn gePrimaryBtn";if(m||q){var H=
|
||||
[],A=null,E=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<H.length;b++)H[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},B=!0,x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";D.appendChild(x);var I=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Y.style.display="";N.style.left="160px";E(0);N.scrollTop=0;N.innerHTML="";C=0;A!=O&&(O=A,w(),A=null)});H.push(I);x.appendChild(I);var M=function(a){Y.style.display="none";N.style.left=
|
||||
"30px";E(a?-1:1);null==A&&(A=O);N.scrollTop=0;N.innerHTML="";var b=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});b.spin(N);C=0;var d=function(a,d){b.stop();O=a;d?N.innerHTML=d:0==a.length?N.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(N.innerHTML="",w())};a?q(K.value,d):m(d)};m&&(I=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),x.appendChild(I),H.push(I));if(q){I=
|
||||
document.createElement("span");I.style.marginLeft="10px";I.innerHTML=mxResources.get("search")+":";x.appendChild(I);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(a){13==a.keyCode&&M(!0)});x.appendChild(K);I=mxUtils.button(mxResources.get("search"),function(){M(!0)});I.className="geBtn";x.appendChild(I)}E(0)}var T=null,P=null,S=null,aa=null,Z=null,N=document.createElement("div");N.style.border=
|
||||
"1px solid #d3d3d3";N.style.position="absolute";N.style.left="160px";N.style.right="34px";B=(b?72:40)+(B?30:0);N.style.top=B+"px";N.style.bottom="68px";N.style.margin="6px 0 0 -1px";N.style.padding="6px";N.style.overflow="auto";var Y=document.createElement("div");Y.style.cssText="position:absolute;left:30px;width:128px;top:"+B+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var Q=140,L=140,U={},R=1;U.basic=[{title:"blankDiagram",select:!0}];var O=U.basic;if(!c){D.appendChild(Y);
|
||||
D.appendChild(N);var V=!1;/^https?:\/\//.test(f)&&!a.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));mxUtils.get(f,function(a){if(!V){V=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=a.getAttribute("section");null==d&&(d=b.indexOf("/"),d=b.substring(0,d));b=U[d];null==b&&(R++,b=[],U[d]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),
|
||||
[],A=null,E=function(a){F.setAttribute("disabled","disabled");for(var b=0;b<H.length;b++)H[b].className=b==a?"geBtn gePrimaryBtn":"geBtn"},B=!0,x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";D.appendChild(x);var I=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){X.style.display="";N.style.left="160px";E(0);N.scrollTop=0;N.innerHTML="";C=0;A!=P&&(P=A,w(),A=null)});H.push(I);x.appendChild(I);var M=function(a){X.style.display="none";N.style.left=
|
||||
"30px";E(a?-1:1);null==A&&(A=P);N.scrollTop=0;N.innerHTML="";var b=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});b.spin(N);C=0;var d=function(a,d){b.stop();P=a;d?N.innerHTML=d:0==a.length?N.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(N.innerHTML="",w())};a?q(K.value,d):m(d)};m&&(I=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),x.appendChild(I),H.push(I));if(q){I=
|
||||
document.createElement("span");I.style.marginLeft="10px";I.innerHTML=mxResources.get("search")+":";x.appendChild(I);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(a){13==a.keyCode&&M(!0)});x.appendChild(K);I=mxUtils.button(mxResources.get("search"),function(){M(!0)});I.className="geBtn";x.appendChild(I)}E(0)}var T=null,Q=null,S=null,Z=null,Y=null,N=document.createElement("div");N.style.border=
|
||||
"1px solid #d3d3d3";N.style.position="absolute";N.style.left="160px";N.style.right="34px";B=(b?72:40)+(B?30:0);N.style.top=B+"px";N.style.bottom="68px";N.style.margin="6px 0 0 -1px";N.style.padding="6px";N.style.overflow="auto";var X=document.createElement("div");X.style.cssText="position:absolute;left:30px;width:128px;top:"+B+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var R=140,L=140,U={},O=1;U.basic=[{title:"blankDiagram",select:!0}];var P=U.basic;if(!c){D.appendChild(X);
|
||||
D.appendChild(N);var V=!1;/^https?:\/\//.test(f)&&!a.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(f));mxUtils.get(f,function(a){if(!V){V=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=a.getAttribute("section");null==d&&(d=b.indexOf("/"),d=b.substring(0,d));b=U[d];null==b&&(O++,b=[],U[d]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),
|
||||
preview:a.getAttribute("preview")})}}a=a.nextSibling}z()}})}mxEvent.addListener(G,"keypress",function(b){a.dialog.container.firstChild==D&&13==b.keyCode&&y()});f=document.createElement("div");f.style.marginTop=c?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom="24px";f.style.right="40px";B=mxUtils.button(mxResources.get("cancel"),function(){null!=h&&h();a.hideDialog(!0)});B.className="geBtn";!a.editor.cancelFirst||g&&null==h||f.appendChild(B);c||
|
||||
a.isOffline()||!b||null!=e||g||(x=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),x.className="geBtn",f.appendChild(x));c||"1"==urlParams.embed||g||(c=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(G.value)+"&create="+encodeURIComponent(b)),
|
||||
null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),c.className="geBtn",f.appendChild(c));Graph.fileSupport&&u&&(u=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(d){a.openFiles(b.files,!0)});b.click()}),u.className="geBtn",f.appendChild(u));f.appendChild(F);
|
||||
|
@ -7615,14 +7616,14 @@ a.saveLocalFile(d,b,"text/xml"):(d="undefined"===typeof pako?"&xml="+encodeURICo
|
|||
t.save(!0,function(b){a.spinner.stop();a.replaceFileData(k);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});C.className="geBtn";C.setAttribute("disabled","disabled");var F=document.createElement("select");F.setAttribute("disabled","disabled");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";F.style.display="none";var H=null;mxEvent.addListener(F,
|
||||
"change",function(a){null!=H&&(H(a),mxEvent.consume(a))});var A=mxUtils.button(mxResources.get("open"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),a.openLink(a.getUrl(),null,!0))});A.className="geBtn";A.setAttribute("disabled","disabled");null!=b&&(A.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=w&&a.openLink(w.getUrl(F.selectedIndex))});E.className="geBtn gePrimaryBtn";
|
||||
E.setAttribute("disabled","disabled");null!=b&&(E.style.display="none",C.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.padding="2px";I.style.border="none";I.style.left="199px";I.style.top="442px";var M=null;if(null!=c&&0<c.length){l.style.cursor="move";var K=document.createElement("table");
|
||||
K.style.border="1px solid lightGray";K.style.borderCollapse="collapse";K.style.borderSpacing="0px";K.style.width="100%";var T=document.createElement("tbody"),P=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var S=c.length-1;0<=S;S--){var aa=function(b){var m=new Date(b.modifiedDate),e=null;if(0<=m.getTime()){var g=function(c){q.stop();var u=mxUtils.parseXml(c),g=a.editor.extractGraphModel(u.documentElement,!0);if(null!=g){var w=function(b){null!=
|
||||
K.style.border="1px solid lightGray";K.style.borderCollapse="collapse";K.style.borderSpacing="0px";K.style.width="100%";var T=document.createElement("tbody"),Q=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var S=c.length-1;0<=S;S--){var Z=function(b){var m=new Date(b.modifiedDate),e=null;if(0<=m.getTime()){var g=function(c){q.stop();var u=mxUtils.parseXml(c),g=a.editor.extractGraphModel(u.documentElement,!0);if(null!=g){var w=function(b){null!=
|
||||
b&&(b=h(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},h=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,p.getModel());p.maxFitScale=1;p.fit(8);p.center();return a};F.style.display="none";F.innerHTML="";y=u;k=c;d=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){u=g.getElementsByTagName("diagram");d=[];for(c=0;c<u.length;c++)d.push(u[c]);
|
||||
f=Math.min(n,d.length-1);0<d.length&&w(d[f]);if(1<d.length)for(F.removeAttribute("disabled"),F.style.display="",c=0;c<d.length;c++)u=document.createElement("option"),mxUtils.write(u,d[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),u.setAttribute("value",c),c==f&&u.setAttribute("selected","selected"),F.appendChild(u);H=function(){f=n=parseInt(F.value);w(d[n])}}else h(g);c=b.lastModifyingUserName;null!=c&&20<c.length&&(c=c.substring(0,20)+"...");x.innerHTML="";mxUtils.write(x,(null!=
|
||||
c?c+" ":"")+m.toLocaleDateString()+" "+m.toLocaleTimeString());x.setAttribute("title",e.getAttribute("title"));v.removeAttribute("disabled");z.removeAttribute("disabled");D.removeAttribute("disabled");B.removeAttribute("disabled");null!=t&&t.isRestricted()||(a.editor.graph.isEnabled()&&C.removeAttribute("disabled"),G.removeAttribute("disabled"),E.removeAttribute("disabled"),A.removeAttribute("disabled"));mxUtils.setOpacity(v,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(B,
|
||||
60)}else F.style.display="none",F.innerHTML="",x.innerHTML="",mxUtils.write(x,mxResources.get("errorLoadingFile"))},e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var h=document.createElement("td");h.style.padding="6px";h.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(h,mxResources.get("current")):m.toDateString()===P?mxUtils.write(h,m.toLocaleTimeString()):mxUtils.write(h,m.toLocaleDateString()+" "+m.toLocaleTimeString());
|
||||
60)}else F.style.display="none",F.innerHTML="",x.innerHTML="",mxUtils.write(x,mxResources.get("errorLoadingFile"))},e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var h=document.createElement("td");h.style.padding="6px";h.style.whiteSpace="nowrap";b==c[c.length-1]?mxUtils.write(h,mxResources.get("current")):m.toDateString()===Q?mxUtils.write(h,m.toLocaleTimeString()):mxUtils.write(h,m.toLocaleDateString()+" "+m.toLocaleTimeString());
|
||||
e.appendChild(h);e.setAttribute("title",m.toLocaleDateString()+" "+m.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){w!=b&&(q.stop(),null!=u&&(u.style.backgroundColor=""),w=b,u=e,u.style.backgroundColor="#ebf2f9",k=y=null,x.removeAttribute("title"),x.innerHTML=mxResources.get("loading")+"...",l.style.backgroundColor="#ffffff",p.getModel().clear(),C.setAttribute("disabled","disabled"),
|
||||
G.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),mxUtils.setOpacity(v,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(D,20),mxUtils.setOpacity(B,20),q.spin(l),b.getXml(function(a){w==b&&g(a)},function(a){q.stop();F.style.display="none";F.innerHTML=
|
||||
"";x.innerHTML="";mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(e)}return e}(c[S]);null!=aa&&S==c.length-1&&(M=aa)}K.appendChild(T);h.appendChild(K)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(l.style.display=
|
||||
"";x.innerHTML="";mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);T.appendChild(e)}return e}(c[S]);null!=Z&&S==c.length-1&&(M=Z)}K.appendChild(T);h.appendChild(K)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(l.style.display=
|
||||
"none",I.style.display="none",mxUtils.write(h,mxResources.get("notAvailable"))):(l.style.display="none",I.style.display="none",mxUtils.write(h,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};h=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});h.className="geBtn";I.appendChild(F);I.appendChild(v);I.appendChild(z);I.appendChild(B);I.appendChild(D);a.editor.cancelFirst?(g.appendChild(h),g.appendChild(G),g.appendChild(A),g.appendChild(C),g.appendChild(E)):(g.appendChild(G),
|
||||
g.appendChild(A),g.appendChild(C),g.appendChild(E),g.appendChild(h));e.appendChild(g);e.appendChild(I);e.appendChild(x);this.container=e},DraftDialog=function(a,c,b,e,g,h,l,p){var n=document.createElement("div"),d=document.createElement("div");d.style.marginTop="0px";d.style.whiteSpace="nowrap";d.style.overflow="auto";mxUtils.write(d,c);n.appendChild(d);var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";
|
||||
f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);n.appendChild(f);var m=new Graph(f);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;c=mxUtils.parseXml(b);var q=a.editor.extractGraphModel(c.documentElement,!0),t=0,u=null,w=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[t]?u[t].getAttribute("name"):
|
||||
|
@ -7681,29 +7682,29 @@ v.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13
|
|||
b=0;null!=d&&d!=a;)d=d.nextSibling,b++;return b}function p(b,d,c,m,k,e,q,g,h){try{if(null==d||"image/"==d.substring(0,6))if(null==b&&null!=q||null==w[b]){var B=function(){C.innerHTML="";C.style.cursor="pointer";C.style.whiteSpace="nowrap";C.style.textOverflow="ellipsis";mxUtils.write(C,null!=K.title&&0<K.title.length?K.title:mxResources.get("untitled"));C.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};t.style.backgroundImage="";u.style.display="none";var x=k,n=e;if(k>a.maxImageSize||e>
|
||||
a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,k)),a.maxImageSize/Math.max(1,e));k*=A;e*=A}x>n?(n=Math.round(100*n/x),x=100):(x=Math.round(100*x/n),n=100);var G=document.createElement("div");G.setAttribute("draggable","true");G.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";G.style.position="relative";G.style.cursor="move";mxUtils.setPrefixedStyle(G.style,"transition","transform .1s ease-in-out");if(null!=b){var E=document.createElement("img");E.setAttribute("src",z.convert(b));
|
||||
E.style.width=x+"px";E.style.height=n+"px";E.style.margin="10px";E.style.paddingBottom=Math.floor((100-n)/2)+"px";E.style.paddingLeft=Math.floor((100-x)/2)+"px";G.appendChild(E)}else if(null!=q){var F=a.stringToCells(a.editor.graph.decompress(q.xml));0<F.length&&(a.sidebar.createThumb(F,100,100,G,null,!0,!1),G.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",G.firstChild.style.cursor="")}var I=document.createElement("img");I.setAttribute("src",Editor.closeImage);I.setAttribute("border",
|
||||
"0");I.setAttribute("title",mxResources.get("delete"));I.setAttribute("align","top");I.style.paddingTop="4px";I.style.position="absolute";I.style.marginLeft="-12px";I.style.zIndex="1";I.style.cursor="pointer";mxEvent.addListener(I,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,d){mxEvent.addListener(I,"click",function(c){w[b]=null;for(var k=0;k<f.length;k++)if(null!=f[k].data&&f[k].data==b||null!=f[k].xml&&null!=d&&f[k].xml==d.xml){f.splice(k,1);break}G.parentNode.removeChild(a);0==f.length&&
|
||||
"0");I.setAttribute("title",mxResources.get("delete"));I.setAttribute("align","top");I.style.paddingTop="4px";I.style.position="absolute";I.style.marginLeft="-12px";I.style.zIndex="1";I.style.cursor="pointer";mxEvent.addListener(I,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,d){mxEvent.addListener(I,"click",function(c){w[b]=null;for(var m=0;m<f.length;m++)if(null!=f[m].data&&f[m].data==b||null!=f[m].xml&&null!=d&&f[m].xml==d.xml){f.splice(m,1);break}G.parentNode.removeChild(a);0==f.length&&
|
||||
(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(c)});mxEvent.addListener(I,"dblclick",function(a){mxEvent.consume(a)})})(G,b,q);G.appendChild(I);G.style.marginBottom="30px";var C=document.createElement("div");C.style.position="absolute";C.style.boxSizing="border-box";C.style.bottom="-18px";C.style.left="10px";C.style.right="10px";C.style.backgroundColor="#ffffff";C.style.overflow="hidden";C.style.textAlign="center";var K=null;null!=b?(K={data:b,
|
||||
w:k,h:e,title:h},null!=g&&(K.aspect=g),w[b]=E,f.push(K)):null!=q&&(q.aspect="fixed",f.push(q),K=q);mxEvent.addListener(C,"keydown",function(a){13==a.keyCode&&null!=v&&(v(),v=null,mxEvent.consume(a))});B();G.appendChild(C);mxEvent.addListener(C,"mousedown",function(a){"true"!=C.getAttribute("contentEditable")&&mxEvent.consume(a)});F=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var d=new FilenameDialog(a,K.title||"",mxResources.get("ok"),
|
||||
function(a){null!=a&&(K.title=a,B())},mxResources.get("enterValue"));a.showDialog(d.container,300,80,!0,!0);d.init();mxEvent.consume(b)}else if("true"!=C.getAttribute("contentEditable")){null!=v&&(v(),v=null);if(null==K.title||0==K.title.length)C.innerHTML="";C.style.textOverflow="";C.style.whiteSpace="";C.style.cursor="text";C.style.color="";C.setAttribute("contentEditable","true");C.focus();document.execCommand("selectAll",!1,null);v=function(){C.removeAttribute("contentEditable");C.style.cursor=
|
||||
"pointer";K.title=C.innerHTML;B()};mxEvent.consume(b)}};mxEvent.addListener(C,"click",F);mxEvent.addListener(G,"dblclick",F);t.appendChild(G);mxEvent.addListener(G,"dragstart",function(a){null==b&&null!=q&&(I.style.visibility="hidden",C.style.visibility="hidden");mxClient.IS_FF&&null!=q.xml&&a.dataTransfer.setData("Text",q.xml);y=l(a);mxClient.IS_GC&&(G.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(G.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(G,30);I.style.visibility=
|
||||
"";C.style.visibility=""},0)});mxEvent.addListener(G,"dragend",function(a){"hidden"==I.style.visibility&&(I.style.visibility="",C.style.visibility="");y=null;mxUtils.setOpacity(G,100);mxUtils.setPrefixedStyle(G.style,"transform",null)})}else D||(D=!0,a.handleError({message:mxResources.get("fileExists")}));else{k=!1;try{if(a.spinner.stop(),x=mxUtils.parseXml(b),"mxlibrary"==x.documentElement.nodeName){n=JSON.parse(mxUtils.getTextContent(x.documentElement));if(null!=n&&0<n.length)for(var M=0;M<n.length;M++)null!=
|
||||
n[M].xml?p(null,null,0,0,0,0,n[M]):p(n[M].data,null,0,0,n[M].w,n[M].h,null,"fixed",n[M].title);k=!0}else if("mxfile"==x.documentElement.nodeName){for(var H=x.documentElement.getElementsByTagName("diagram"),M=0;M<H.length;M++){var n=mxUtils.getTextContent(H[M]),F=a.stringToCells(a.editor.graph.decompress(n)),V=a.editor.graph.getBoundingBoxFromGeometry(F);p(null,null,0,0,0,0,{xml:n,w:V.width,h:V.height})}k=!0}}catch(J){}k||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(J){}return null}
|
||||
n[M].xml?p(null,null,0,0,0,0,n[M]):p(n[M].data,null,0,0,n[M].w,n[M].h,null,"fixed",n[M].title);k=!0}else if("mxfile"==x.documentElement.nodeName){for(var H=x.documentElement.getElementsByTagName("diagram"),M=0;M<H.length;M++){var n=mxUtils.getTextContent(H[M]),F=a.stringToCells(a.editor.graph.decompress(n)),V=a.editor.graph.getBoundingBoxFromGeometry(F);p(null,null,0,0,0,0,{xml:n,w:V.width,h:V.height})}k=!0}}catch(ba){}k||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}
|
||||
function n(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function d(b){b.stopPropagation();b.preventDefault();D=!1;k=l(b);if(null!=y)null!=k&&k<t.children.length?(f.splice(k>y?k-1:k,0,f.splice(y,1)[0]),t.insertBefore(t.children[y],t.children[k])):(f.push(f.splice(y,1)[0]),t.appendChild(t.children[y]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,B(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=
|
||||
decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&a.loadImage(d,function(a){p(d,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var f=[];b=document.createElement("div");b.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";b.appendChild(m);mxUtils.write(m,mxResources.get("filename")+
|
||||
":");null==c&&(c=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",c);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==g||g.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};m.appendChild(q);var t=document.createElement("div");t.style.borderWidth=
|
||||
"1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";
|
||||
mxUtils.write(u,mxResources.get("dragImagesHere"));b.appendChild(u);var w={},y=null,k=null,v=null;c=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=v&&(v(),v=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",c);mxEvent.addListener(t,"pointerdown",c);mxEvent.addListener(t,"touchstart",c);var z=new mxUrlConverter,D=!1;if(null!=e)for(c=0;c<e.length;c++)m=e[c],p(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(t,"dragleave",function(a){u.style.cursor=
|
||||
"";for(var b=mxEvent.getSource(a);null!=b;){if(b==t||b==u){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var B=function(b){return function(d,f,c,k,m,e,q,u,g){null!=g&&(/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name))?a.importVisio(g,mxUtils.bind(this,function(d){a.spinner.stop();p(d,f,c,k,m,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," "))})):null!=g&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(d,g.name)?
|
||||
a.parseFile(g,mxUtils.bind(this,function(d){4==d.readyState&&(a.spinner.stop(),200<=d.status&&299>=d.status&&(p(d.responseText,f,c,k,m,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(p(d,f,c,k,m,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",n);mxEvent.addListener(t,"drop",d);mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,
|
||||
"";for(var b=mxEvent.getSource(a);null!=b;){if(b==t||b==u){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var B=function(b){return function(d,f,c,m,k,e,q,g,u){null!=u&&(/(\.vsdx)($|\?)/i.test(u.name)||/(\.vssx)($|\?)/i.test(u.name))?a.importVisio(u,mxUtils.bind(this,function(d){a.spinner.stop();p(d,f,c,m,k,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," "))})):null!=u&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(d,u.name)?
|
||||
a.parseFile(u,mxUtils.bind(this,function(d){4==d.readyState&&(a.spinner.stop(),200<=d.status&&299>=d.status&&(p(d.responseText,f,c,m,k,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(p(d,f,c,m,k,e,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",n);mxEvent.addListener(t,"drop",d);mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,
|
||||
"drop",d);b.appendChild(t);e=document.createElement("div");e.style.textAlign="right";e.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";a.editor.cancelFirst&&e.appendChild(c);m=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(f),d=q.value;/(\.xml)$/i.test(d)||(d+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,d,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,
|
||||
"filename="+encodeURIComponent(d)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";e.appendChild(m);var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(x,"change",function(b){D=!1;a.importFiles(x.files,0,0,a.maxImageSize,function(a,d,f,c,k,m,e,q,t){B(b)(a,d,f,c,k,m,e,q,t);x.value=""});t.scrollTop=t.scrollHeight}),m=mxUtils.button(mxResources.get("import"),
|
||||
"filename="+encodeURIComponent(d)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";e.appendChild(m);var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(x,"change",function(b){D=!1;a.importFiles(x.files,0,0,a.maxImageSize,function(a,d,f,c,m,k,e,q,t){B(b)(a,d,f,c,m,k,e,q,t);x.value=""});t.scrollTop=t.scrollHeight}),m=mxUtils.button(mxResources.get("import"),
|
||||
function(){null!=v&&(v(),v=null);x.click()}),m.setAttribute("id","btnAddImage"),m.className="geBtn",e.appendChild(m));m=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=v&&(v(),v=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,d){D=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}p(a,null,0,0,b,d);t.scrollTop=t.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";
|
||||
e.appendChild(m);this.saveBtnClickHandler=function(b,d,f,c){a.saveLibrary(b,d,f,c)};m=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=v&&(v(),v=null);this.saveBtnClickHandler(q.value,f,g,h)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";e.appendChild(m);a.editor.cancelFirst||e.appendChild(c);b.appendChild(e);this.container=b},EditShapeDialog=function(a,c,b,e,g){e=null!=e?e:300;g=null!=g?g:120;var h,l,p=document.createElement("table"),n=document.createElement("tbody");
|
||||
p.style.cellPadding="4px";h=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";mxUtils.write(l,b);h.appendChild(l);n.appendChild(h);h=document.createElement("tr");l=document.createElement("td");var d=document.createElement("textarea");d.style.outline="none";d.style.resize="none";d.style.width=e-200+"px";d.style.height=g+"px";this.textarea=d;this.init=function(){d.focus();d.scrollTop=0};l.appendChild(d);h.appendChild(l);l=document.createElement("td");
|
||||
b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.top="6px";b.style.width="200px";b.style.height=g+4+"px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);l.appendChild(b);var f=new Graph(b);f.setEnabled(!1);var m=a.editor.graph.cloneCell(c);f.addCells([m]);b=f.view.getState(m);var q="";null!=b.shape&&null!=b.shape.stencil&&(q=mxUtils.getPrettyXml(b.shape.stencil.desc));mxUtils.write(d,q||"");b=f.getGraphBounds();
|
||||
g=Math.min(160/b.width,(g-40)/b.height);f.view.scaleAndTranslate(g,20/g-b.x,20/g-b.y);h.appendChild(l);n.appendChild(h);h=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&l.appendChild(g);a.isOffline()||(b=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
|
||||
b.className="geBtn",l.appendChild(b));var t=function(b,f,c){var k=d.value,m=mxUtils.parseXml(k),k=mxUtils.getPrettyXml(m.documentElement),m=m.documentElement.getElementsByTagName("parsererror");if(null!=m&&0<m.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),m=!b.model.contains(f),!c||m||k!=q){k=a.editor.graph.compress(k);b.getModel().beginUpdate();try{if(m){var e=a.editor.graph.getInsertPoint();f.geometry.x=e.x;
|
||||
f.geometry.y=e.y;b.addCell(f)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+k+")",[f])}catch(D){throw D;}finally{b.getModel().endUpdate()}m&&b.setSelectionCell(f)}};b=mxUtils.button(mxResources.get("preview"),function(){t(f,m,!1)});b.className="geBtn";l.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";l.appendChild(b);a.editor.cancelFirst||l.appendChild(g);h.appendChild(l);n.appendChild(h);p.appendChild(n);this.container=
|
||||
b.className="geBtn",l.appendChild(b));var t=function(b,f,c){var m=d.value,e=mxUtils.parseXml(m),m=mxUtils.getPrettyXml(e.documentElement),e=e.documentElement.getElementsByTagName("parsererror");if(null!=e&&0<e.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(c&&a.hideDialog(),e=!b.model.contains(f),!c||e||m!=q){m=a.editor.graph.compress(m);b.getModel().beginUpdate();try{if(e){var t=a.editor.graph.getInsertPoint();f.geometry.x=t.x;
|
||||
f.geometry.y=t.y;b.addCell(f)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+m+")",[f])}catch(D){throw D;}finally{b.getModel().endUpdate()}e&&b.setSelectionCell(f)}};b=mxUtils.button(mxResources.get("preview"),function(){t(f,m,!1)});b.className="geBtn";l.appendChild(b);b=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,c,!0)});b.className="geBtn gePrimaryBtn";l.appendChild(b);a.editor.cancelFirst||l.appendChild(g);h.appendChild(l);n.appendChild(h);p.appendChild(n);this.container=
|
||||
p},CustomDialog=function(a,c,b,e,g,h,l,p){var n=document.createElement("div");n.appendChild(c);c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";null!=l&&c.appendChild(l);l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});l.className="geBtn";p&&(l.style.display="none");a.editor.cancelFirst&&c.appendChild(l);a.isOffline()||null==h||(p=mxUtils.button(mxResources.get("help"),function(){a.openLink(h)}),p.className="geBtn",c.appendChild(p));
|
||||
g=mxUtils.button(g||mxResources.get("ok"),function(){a.hideDialog();null!=b&&b()});c.appendChild(g);g.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(l);n.appendChild(c);this.cancelBtn=l;this.okButton=g;this.container=n},TemplatesDialog=function(){var a='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" placeholder="'+mxResources.get("search",null,"Search")+'"></div><div class="geTemplatesList"><div class="geTempDlgNewDiagramlbl">'+
|
||||
mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+mxResources.get("templates",null,"Templates")+'</div></div><div class="geTempDlgContent"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showAll",null,"+ Show all")+
|
||||
|
@ -7711,26 +7712,26 @@ mxResources.get("newDiagram",null,"New Diagram")+'</div><div class="geTempDlgHLi
|
|||
mxResources.get("allDiagrams",null,"All diagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">🛈 '+
|
||||
mxResources.get("linkToDiagramHint",null,"Add a link to this diagram. The diagram can only be edited from the page that owns it.")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram",null,"Link to Diagram")+'</button><div class="geTempDlgCreateBtn">'+mxResources.get("create",null,"Create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel",null,"Cancel")+"</div></div>",c=document.createElement("div");c.innerHTML=a;c.className="geTemplateDlg";
|
||||
var a=window.innerWidth,b=window.innerHeight,e=987,g=712;.9*a<e&&(e=Math.max(.9*a,600),c.style.width=e+"px");.9*b<g&&(g=Math.max(.9*b,300),c.style.height=g+"px");this.width=e;this.height=g;this.container=c};
|
||||
TemplatesDialog.prototype.init=function(a,c,b,e,g,h,l,p,n,d){function f(){null!=C&&(C.style.fontWeight="normal",C.style.textDecoration="none",C=null)}function m(a,b,d,f,c,k,m){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";B.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");B.querySelector("."+b).src="/images/"+d+"-sel.svg";B.querySelector("."+c).src="/images/"+
|
||||
k+".svg";return!0}function q(a){function b(a){Z.removeChild(f);B.removeChild(d);Z.scrollTop=k}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var d=document.createElement("div");d.className="geTempDlgDialogMask";B.appendChild(d);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var c=document.createElement("img");c.src=a;f.appendChild(c);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
|
||||
a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var k=Z.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(d,"click",b);Z.appendChild(f);Z.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function t(a,b,d){if(null!=F){for(var f=F.className.split(" "),c=0;c<f.length;c++)if(-1<f[c].indexOf("Active")){f.splice(c,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,H=d,L.className="geTempDlgCreateBtn"):(H=F=null,L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
|
||||
TemplatesDialog.prototype.init=function(a,c,b,e,g,h,l,p,n,d){function f(){null!=C&&(C.style.fontWeight="normal",C.style.textDecoration="none",C=null)}function m(a,b,d,f,c,m,k){if(-1<a.className.indexOf("geTempDlgRadioBtnActive"))return!1;a.className+=" geTempDlgRadioBtnActive";B.querySelector(".geTempDlgRadioBtn[data-id="+f+"]").className="geTempDlgRadioBtn "+(k?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");B.querySelector("."+b).src="/images/"+d+"-sel.svg";B.querySelector("."+c).src="/images/"+
|
||||
m+".svg";return!0}function q(a){function b(a){Y.removeChild(f);B.removeChild(d);Y.scrollTop=m}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var d=document.createElement("div");d.className="geTempDlgDialogMask";B.appendChild(d);var f=document.createElement("div");f.className="geTempDlgDiagramPreviewBox";var c=document.createElement("img");c.src=a;f.appendChild(c);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
|
||||
a.setAttribute("title",mxResources.get("close"));f.appendChild(a);var m=Y.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(d,"click",b);Y.appendChild(f);Y.scrollTop=0;f.style.lineHeight=f.clientHeight+"px"}function t(a,b,d){if(null!=F){for(var f=F.className.split(" "),c=0;c<f.length;c++)if(-1<f[c].indexOf("Active")){f.splice(c,1);break}F.className=f.join(" ")}null!=a?(F=a,F.className+=" "+b,H=d,L.className="geTempDlgCreateBtn"):(H=F=null,L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
|
||||
function u(b){if(null!=H){var f=H;H=null;L.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";f.isExternal?(1==b?d(f.url,f,"nameInput.value"):n(f.url,f,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+f.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(c(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function w(a){a=a?"":"none";for(var b=B.querySelectorAll(".geTempDlgLinkToDiagram"),d=0;d<b.length;d++)b[d].style.display=
|
||||
a}function y(a,b,d){function f(){L.innerHTML=b?mxResources.get("create"):mxResources.get("copy");w(!b)}P.innerHTML="";t();M=a;var c=null;if(d){c=document.createElement("table");c.className="geTempDlgDiagramsListGrid";var k=document.createElement("tr"),m=document.createElement("th");m.style.width="50%";m.innerHTML=mxResources.get("diagram",null,"Diagram");k.appendChild(m);m=document.createElement("th");m.style.width="25%";m.innerHTML=mxResources.get("changedBy",null,"Changed By");k.appendChild(m);
|
||||
m=document.createElement("th");m.style.width="25%";m.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");k.appendChild(m);c.appendChild(k);P.appendChild(c)}for(k=0;k<a.length;k++){a[k].isExternal=!b;var e=a[k].url,m=mxUtils.htmlEntities(a[k].title),g=a[k].tooltip||a[k].title,z=a[k].imgUrl,v=mxUtils.htmlEntities(a[k].changedBy||""),h=mxUtils.htmlEntities(a[k].lastModifiedOn||"");z||(z=TEMPLATE_PATH+"/"+e.substring(0,e.length-4)+".png");e=d?50:15;null!=m&&m.length>e&&(m=m.substring(0,
|
||||
e)+"…");if(d){var D=document.createElement("tr"),z=document.createElement("td"),B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramListPreviewBtn";B.setAttribute("title",mxResources.get("preview"));z.appendChild(B);g=document.createElement("span");g.className="geTempDlgDiagramTitle";g.innerHTML=m;z.appendChild(g);D.appendChild(z);z=document.createElement("td");z.innerHTML=v;D.appendChild(z);z=document.createElement("td");z.innerHTML=h;D.appendChild(z);
|
||||
c.appendChild(D);null==F&&(f(),t(D,"geTempDlgDiagramsListGridActive",a[k]));(function(a,b){mxEvent.addListener(D,"click",function(){F!=b&&(f(),t(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(D,"dblclick",u);mxEvent.addListener(B,"click",function(){q(a)})})(a[k],D)}else{var l=document.createElement("div");l.className="geTempDlgDiagramTile";l.setAttribute("title",g);null==F&&(f(),t(l,"geTempDlgDiagramTileActive",a[k]));v=document.createElement("div");v.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
|
||||
var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,v);y.src=z;v.appendChild(y);l.appendChild(v);v=document.createElement("div");v.className="geTempDlgDiagramTileLbl";v.innerHTML=null!=m?m:"";l.appendChild(v);B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramPreviewBtn";
|
||||
B.setAttribute("title",mxResources.get("preview"));l.appendChild(B);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(f(),t(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(l,"dblclick",u);mxEvent.addListener(B,"click",function(){q(a)})})(a[k],l);P.appendChild(l)}}}function k(a,b){Q.innerHTML="";t();for(var d=!b&&5<a.length?5:a.length,f=0;f<d;f++){var c=a[f];c.isCategory=!0;var k=document.createElement("div"),m=mxResources.get(c.title);null==m&&(m=c.title.substring(0,1).toUpperCase()+
|
||||
c.title.substring(1));k.className="geTempDlgNewDiagramCatItem";k.setAttribute("title",m);m=mxUtils.htmlEntities(m);15<m.length&&(m=m.substring(0,15)+"…");null==F&&(L.innerHTML=mxResources.get("create"),w(),t(k,"geTempDlgNewDiagramCatItemActive",c));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var q=document.createElement("img");q.src=NEW_DIAGRAM_CATS_PATH+"/"+c.img;e.appendChild(q);k.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";
|
||||
e.innerHTML=m;k.appendChild(e);Q.appendChild(k);(function(a,b){mxEvent.addListener(k,"click",function(){F!=b&&(L.innerHTML=mxResources.get("create"),w(),t(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(k,"dblclick",u)})(c,k)}T.style.display=5>a.length?"none":""}function v(a){var b=B.querySelector(".geTemplatesList"),d;for(d in a){var f=document.createElement("div"),c=mxResources.get(d),k=a[d];null==c&&(c=d.substring(0,1).toUpperCase()+d.substring(1));f.className="geTemplateCatLink";
|
||||
f.setAttribute("title",c+" ("+k.length+")");c=mxUtils.htmlEntities(c);15<c.length&&(c=c.substring(0,15)+"…");f.innerHTML=c+" ("+k.length+")";b.appendChild(f);(function(b,d,c){mxEvent.addListener(f,"click",function(){C!=c&&(null!=C?(C.style.fontWeight="normal",C.style.textDecoration="none"):(Y.style.display="none",N.style.minHeight="100%"),C=c,C.style.fontWeight="bold",C.style.textDecoration="underline",Z.scrollTop=0,x&&(G=!0),S.innerHTML=d,aa.style.display="none",y(a[b],!0))})})(d,c,f)}}function z(a){l&&
|
||||
(Z.scrollTop=0,P.innerHTML="",U.spin(P),G=!1,x=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),K=null,l(W,a?null:h))}function D(a){f();Z.scrollTop=0;P.innerHTML="";U.spin(P);G=!1;x=!0;da=null;S.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';p(a,W,E?null:h);K=a}e=null!=e?e:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var B=this.container,x=!1,G=!1,C=null,F=null,H=null,A=!1,E=!0,I=!1,M=[],K,T=B.querySelector(".geTempDlgShowAllBtn"),
|
||||
P=B.querySelector(".geTempDlgDiagramsTiles"),S=B.querySelector(".geTempDlgDiagramsListTitle"),aa=B.querySelector(".geTempDlgDiagramsListBtns"),Z=B.querySelector(".geTempDlgContent"),N=B.querySelector(".geTempDlgDiagramsList"),Y=B.querySelector(".geTempDlgNewDiagramCat"),Q=B.querySelector(".geTempDlgNewDiagramCatList"),L=B.querySelector(".geTempDlgCreateBtn"),U=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(B.querySelector(".geTempDlgNewDiagramlbl"),
|
||||
"click",function(){f();Y.style.display="";N.style.minHeight="calc(100% - 280px)";z(E)});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){m(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==K?z(E):D(K))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){m(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
|
||||
"all-diagrams",!0)&&(E=!1,null==K?z(E):D(K))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(I=!0,y(M,!1,I))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(I=!1,y(M,!1,I))});mxEvent.addListener(T,"click",function(){A?(Y.style.height="280px",
|
||||
Q.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),k(J)):(Y.style.height="440px",Q.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),k(J,!0));A=!A});var R=!1,O=!1,V={},J=[],X=1;mxUtils.get(e,function(a){if(!R){R=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=b.indexOf("/"),b=b.substring(0,d),d=V[b];null==d&&(X++,d=[],V[b]=d);d.push({url:a.getAttribute("url"),
|
||||
libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}v(V)}});mxUtils.get(g,function(a){if(!O){O=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&J.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;k(J)}});var W=function(a,b){aa.style.display="";U.stop();x=!1;G?G=!1:b?P.innerHTML=b:
|
||||
0==a.length?P.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(a,!1,I)};z(E);var da=null;p&&mxEvent.addListener(B.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=da&&clearTimeout(da);13==a.keyCode?D(b.value):da=setTimeout(function(){D(b.value)},500)});mxEvent.addListener(L,"click",u);mxEvent.addListener(B.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){u(!0)});mxEvent.addListener(B.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
|
||||
a}function y(a,b,d){function f(){L.innerHTML=b?mxResources.get("create"):mxResources.get("copy");w(!b)}Q.innerHTML="";t();M=a;var c=null;if(d){c=document.createElement("table");c.className="geTempDlgDiagramsListGrid";var m=document.createElement("tr"),k=document.createElement("th");k.style.width="50%";k.innerHTML=mxResources.get("diagram",null,"Diagram");m.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxResources.get("changedBy",null,"Changed By");m.appendChild(k);
|
||||
k=document.createElement("th");k.style.width="25%";k.innerHTML=mxResources.get("lastModifiedOn",null,"Last modified on");m.appendChild(k);c.appendChild(m);Q.appendChild(c)}for(m=0;m<a.length;m++){a[m].isExternal=!b;var e=a[m].url,k=mxUtils.htmlEntities(a[m].title),g=a[m].tooltip||a[m].title,z=a[m].imgUrl,v=mxUtils.htmlEntities(a[m].changedBy||""),h=mxUtils.htmlEntities(a[m].lastModifiedOn||"");z||(z=TEMPLATE_PATH+"/"+e.substring(0,e.length-4)+".png");e=d?50:15;null!=k&&k.length>e&&(k=k.substring(0,
|
||||
e)+"…");if(d){var D=document.createElement("tr"),z=document.createElement("td"),B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramListPreviewBtn";B.setAttribute("title",mxResources.get("preview"));z.appendChild(B);g=document.createElement("span");g.className="geTempDlgDiagramTitle";g.innerHTML=k;z.appendChild(g);D.appendChild(z);z=document.createElement("td");z.innerHTML=v;D.appendChild(z);z=document.createElement("td");z.innerHTML=h;D.appendChild(z);
|
||||
c.appendChild(D);null==F&&(f(),t(D,"geTempDlgDiagramsListGridActive",a[m]));(function(a,b){mxEvent.addListener(D,"click",function(){F!=b&&(f(),t(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(D,"dblclick",u);mxEvent.addListener(B,"click",function(){q(a)})})(a[m],D)}else{var l=document.createElement("div");l.className="geTempDlgDiagramTile";l.setAttribute("title",g);null==F&&(f(),t(l,"geTempDlgDiagramTileActive",a[m]));v=document.createElement("div");v.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";
|
||||
var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,v);y.src=z;v.appendChild(y);l.appendChild(v);v=document.createElement("div");v.className="geTempDlgDiagramTileLbl";v.innerHTML=null!=k?k:"";l.appendChild(v);B=document.createElement("img");B.src="/images/icon-search.svg";B.className="geTempDlgDiagramPreviewBtn";
|
||||
B.setAttribute("title",mxResources.get("preview"));l.appendChild(B);(function(a,b){mxEvent.addListener(l,"click",function(){F!=b&&(f(),t(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(l,"dblclick",u);mxEvent.addListener(B,"click",function(){q(a)})})(a[m],l);Q.appendChild(l)}}}function k(a,b){R.innerHTML="";t();for(var d=!b&&5<a.length?5:a.length,f=0;f<d;f++){var c=a[f];c.isCategory=!0;var m=document.createElement("div"),k=mxResources.get(c.title);null==k&&(k=c.title.substring(0,1).toUpperCase()+
|
||||
c.title.substring(1));m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",k);k=mxUtils.htmlEntities(k);15<k.length&&(k=k.substring(0,15)+"…");null==F&&(L.innerHTML=mxResources.get("create"),w(),t(m,"geTempDlgNewDiagramCatItemActive",c));var e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemImg";var q=document.createElement("img");q.src=NEW_DIAGRAM_CATS_PATH+"/"+c.img;e.appendChild(q);m.appendChild(e);e=document.createElement("div");e.className="geTempDlgNewDiagramCatItemLbl";
|
||||
e.innerHTML=k;m.appendChild(e);R.appendChild(m);(function(a,b){mxEvent.addListener(m,"click",function(){F!=b&&(L.innerHTML=mxResources.get("create"),w(),t(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(m,"dblclick",u)})(c,m)}T.style.display=5>a.length?"none":""}function v(a){var b=B.querySelector(".geTemplatesList"),d;for(d in a){var f=document.createElement("div"),c=mxResources.get(d),m=a[d];null==c&&(c=d.substring(0,1).toUpperCase()+d.substring(1));f.className="geTemplateCatLink";
|
||||
f.setAttribute("title",c+" ("+m.length+")");c=mxUtils.htmlEntities(c);15<c.length&&(c=c.substring(0,15)+"…");f.innerHTML=c+" ("+m.length+")";b.appendChild(f);(function(b,d,c){mxEvent.addListener(f,"click",function(){C!=c&&(null!=C?(C.style.fontWeight="normal",C.style.textDecoration="none"):(X.style.display="none",N.style.minHeight="100%"),C=c,C.style.fontWeight="bold",C.style.textDecoration="underline",Y.scrollTop=0,x&&(G=!0),S.innerHTML=d,Z.style.display="none",y(a[b],!0))})})(d,c,f)}}function z(a){l&&
|
||||
(Y.scrollTop=0,Q.innerHTML="",U.spin(Q),G=!1,x=!0,S.innerHTML=mxResources.get("recentDiag",null,"Recent Diagrams"),K=null,l(ca,a?null:h))}function D(a){f();Y.scrollTop=0;Q.innerHTML="";U.spin(Q);G=!1;x=!0;W=null;S.innerHTML=mxResources.get("searchResults",null,"Search Results")+' "'+mxUtils.htmlEntities(a)+'"';p(a,ca,E?null:h);K=a}e=null!=e?e:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var B=this.container,x=!1,G=!1,C=null,F=null,H=null,A=!1,E=!0,I=!1,M=[],K,T=B.querySelector(".geTempDlgShowAllBtn"),
|
||||
Q=B.querySelector(".geTempDlgDiagramsTiles"),S=B.querySelector(".geTempDlgDiagramsListTitle"),Z=B.querySelector(".geTempDlgDiagramsListBtns"),Y=B.querySelector(".geTempDlgContent"),N=B.querySelector(".geTempDlgDiagramsList"),X=B.querySelector(".geTempDlgNewDiagramCat"),R=B.querySelector(".geTempDlgNewDiagramCatList"),L=B.querySelector(".geTempDlgCreateBtn"),U=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(B.querySelector(".geTempDlgNewDiagramlbl"),
|
||||
"click",function(){f();X.style.display="";N.style.minHeight="calc(100% - 280px)";z(E)});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){m(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==K?z(E):D(K))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){m(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg",
|
||||
"all-diagrams",!0)&&(E=!1,null==K?z(E):D(K))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(I=!0,y(M,!1,I))});mxEvent.addListener(B.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(I=!1,y(M,!1,I))});mxEvent.addListener(T,"click",function(){A?(X.style.height="280px",
|
||||
R.style.height="190px",T.innerHTML=mxResources.get("showAll",null,"+ Show all"),k(ba)):(X.style.height="440px",R.style.height="355px",T.innerHTML=mxResources.get("showLess",null,"- Show less"),k(ba,!0));A=!A});var O=!1,P=!1,V={},ba=[],J=1;mxUtils.get(e,function(a){if(!O){O=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var d=b.indexOf("/"),b=b.substring(0,d),d=V[b];null==d&&(J++,d=[],V[b]=d);d.push({url:a.getAttribute("url"),
|
||||
libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=a.nextSibling}v(V)}});mxUtils.get(g,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&ba.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),title:a.getAttribute("title")}),a=a.nextSibling;k(ba)}});var ca=function(a,b){Z.style.display="";U.stop();x=!1;G?G=!1:b?Q.innerHTML=
|
||||
b:0==a.length?Q.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):y(a,!1,I)};z(E);var W=null;p&&mxEvent.addListener(B.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=W&&clearTimeout(W);13==a.keyCode?D(b.value):W=setTimeout(function(){D(b.value)},500)});mxEvent.addListener(L,"click",u);mxEvent.addListener(B.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){u(!0)});mxEvent.addListener(B.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=
|
||||
b&&b();a.hideDialog(!0)})};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
|
||||
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
|
||||
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
|
||||
|
@ -7776,7 +7777,7 @@ this.update)};var p=Format.prototype.refresh;Format.prototype.refresh=function()
|
|||
function(a){a=n.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,d=b.editor.graph,f=this.createOption(mxResources.get("shadow"),function(){return d.shadowVisible},function(a){var f=new ChangePageSetup(b);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;d.model.execute(f)},{install:function(a){this.listener=function(){a(d.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});
|
||||
Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi,f=b.editor.graph;if(f.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},
|
||||
{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}if(this.isMathOptionVisible()&&f.isEnabled()&&"undefined"!==typeof MathJax){c=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return f.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(f.mathEnabled)};b.addListener("mathEnabledChanged",
|
||||
this.listener)},destroy:function(){b.removeListener(this.listener)}});c.style.paddingTop="5px";a.appendChild(c);var k=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");k.style.position="relative";k.style.marginLeft="6px";k.style.top="2px";c.appendChild(k)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
|
||||
this.listener)},destroy:function(){b.removeListener(this.listener)}});c.style.paddingTop="5px";a.appendChild(c);var m=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");m.style.position="relative";m.style.marginLeft="6px";m.style.top="2px";c.appendChild(m)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
|
||||
type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",
|
||||
type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},
|
||||
{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,
|
||||
|
@ -7797,33 +7798,33 @@ type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.pro
|
|||
{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[null,{fill:mxConstants.NONE,stroke:"#36393d"},{fill:"#fad7ac",
|
||||
stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},
|
||||
{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(a,b,d){if(null!=b){var f=function(a){if(null!=a)if(d)for(var f=0;f<a.length;f++)b[a[f].name]=
|
||||
a[f];else for(var c in b){for(var k=!1,f=0;f<a.length;f++)if(a[f].name==c&&a[f].type==b[c].type){k=!0;break}k||delete b[c]}},c=this.editorUi.editor.graph.view.getState(a);null!=c&&null!=c.shape&&(c.shape.commonCustomPropAdded||(c.shape.commonCustomPropAdded=!0,c.shape.customProperties=c.shape.customProperties||[],c.cell.vertex?Array.prototype.push.apply(c.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(c.shape.customProperties,Editor.commonEdgeProperties)),f(c.shape.customProperties));
|
||||
a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(C){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},d=a.vertices,c=a.edges,k=0;k<d.length;k++)this.findCommonProperties(d[k],b,0==k);for(k=0;k<c.length;k++)this.findCommonProperties(c[k],b,0==
|
||||
d.length&&0==k);0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width=
|
||||
a[f];else for(var c in b){for(var m=!1,f=0;f<a.length;f++)if(a[f].name==c&&a[f].type==b[c].type){m=!0;break}m||delete b[c]}},c=this.editorUi.editor.graph.view.getState(a);null!=c&&null!=c.shape&&(c.shape.commonCustomPropAdded||(c.shape.commonCustomPropAdded=!0,c.shape.customProperties=c.shape.customProperties||[],c.cell.vertex?Array.prototype.push.apply(c.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(c.shape.customProperties,Editor.commonEdgeProperties)),f(c.shape.customProperties));
|
||||
a=a.getAttribute("customProperties");if(null!=a)try{f(JSON.parse(a))}catch(C){}}};var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},d=a.vertices,c=a.edges,m=0;m<d.length;m++)this.findCommonProperties(d[m],b,0==m);for(m=0;m<c.length;m++)this.findCommonProperties(c[m],b,0==
|
||||
d.length&&0==m);0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var m=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width=
|
||||
"100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return m.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,b,d){function f(a,
|
||||
b,d,f){u.getModel().beginUpdate();try{var c=[],k=[];if(null!=d.index){for(var m=[],e=d.parentRow.nextSibling;e&&e.getAttribute("data-pName")==a;)m.push(e.getAttribute("data-pValue")),e=e.nextSibling;d.index<m.length?null!=f?m.splice(f,1):m[d.index]=b:m.push(b);null!=d.size&&m.length>d.size&&(m=m.slice(0,d.size));b=m.join(",");null!=d.countProperty&&(u.setCellStyles(d.countProperty,m.length,u.getSelectionCells()),c.push(d.countProperty),k.push(m.length))}u.setCellStyles(a,b,u.getSelectionCells());
|
||||
c.push(a);k.push(b);if(null!=d.dependentProps)for(a=0;a<d.dependentProps.length;a++){var q=d.dependentPropsDefVal[a],t=d.dependentPropsVals[a];if(t.length>b)t=t.slice(0,b);else for(var w=t.length;w<b;w++)t.push(q);t=t.join(",");u.setCellStyles(d.dependentProps[a],t,u.getSelectionCells());c.push(d.dependentProps[a]);k.push(t)}g.editorUi.fireEvent(new mxEventObject("styleChanged","keys",c,"values",k,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function c(b,d,f){var c=mxUtils.getOffset(a,
|
||||
!0),k=mxUtils.getOffset(b,!0);d.style.position="absolute";d.style.left=k.x-c.x+"px";d.style.top=k.y-c.y+"px";d.style.width=b.offsetWidth+"px";d.style.height=b.offsetHeight-(f?4:0)+"px";d.style.zIndex=5}function k(a,b,d){var c=document.createElement("div");c.style.width="32px";c.style.height="4px";c.style.margin="2px";c.style.border="1px solid black";c.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(g,function(k){this.editorUi.pickColor(b,
|
||||
function(b){c.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;f(a,b,d)});mxEvent.consume(k)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(c);return btn}function m(a,b,d,c,k,m,e){null!=b&&(b=b.split(","),w.push({name:a,values:b,type:d,defVal:c,countProperty:k,parentRow:m,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(g,function(b){for(var q=m,g=0;null!=q.nextSibling;)if(q.nextSibling.getAttribute("data-pName")==
|
||||
a)q=q.nextSibling,g++;else break;var u={type:d,parentRow:m,index:g,isDeletable:!0,defVal:c,countProperty:k},g=t(a,"",u,0==g%2,e);f(a,c,u);q.parentNode.insertBefore(g,q.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,d,f,c,k,m){if(0<c){var e=Array(c);b=null!=b?b.split(","):[];for(var q=0;q<c;q++)e[q]=null!=b[q]?b[q]:null!=f?f:"";w.push({name:a,values:e,type:d,defVal:f,parentRow:k,flipBkg:m,size:c})}return document.createElement("div")}
|
||||
function q(a,b,d){var c=document.createElement("input");c.type="checkbox";c.checked="1"==b;mxEvent.addListener(c,"change",function(){f(a,c.checked?"1":"0",d)});return c}function t(b,d,t,u,w){var h=t.dispName,v=t.type,l=document.createElement("tr");l.className="gePropRow"+(w?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";l.setAttribute("data-pName",b);l.setAttribute("data-pValue",d);u=!1;null!=t.index&&(l.setAttribute("data-index",t.index),h=(null!=h?h:"")+"["+t.index+"]",u=!0);var z=document.createElement("td");
|
||||
z.className="gePropRowCell";z.innerHTML=mxUtils.htmlEntities(mxResources.get(h,null,h));u&&(z.style.textAlign="right");l.appendChild(z);z=document.createElement("td");z.className="gePropRowCell";if("color"==v)z.appendChild(k(b,d,t));else if("bool"==v||"boolean"==v)z.appendChild(q(b,d,t));else if("enum"==v){var y=t.enumList;for(w=0;w<y.length;w++)if(h=y[w],h.val==d){z.innerHTML=mxUtils.htmlEntities(mxResources.get(h.dispName,null,h.dispName));break}mxEvent.addListener(z,"click",mxUtils.bind(g,function(){var k=
|
||||
document.createElement("select");c(z,k);for(var m=0;m<y.length;m++){var e=y[m],q=document.createElement("option");q.value=mxUtils.htmlEntities(e.val);q.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));k.appendChild(q)}k.value=d;a.appendChild(k);mxEvent.addListener(k,"change",function(){var a=mxUtils.htmlEntities(k.value);f(b,a,t)});k.focus();mxEvent.addListener(k,"blur",function(){a.removeChild(k)})}))}else"dynamicArr"==v?z.appendChild(m(b,d,t.subType,t.subDefVal,t.countProperty,
|
||||
l,w)):"staticArr"==v?z.appendChild(e(b,d,t.subType,t.subDefVal,t.size,l,w)):(z.innerHTML=d,mxEvent.addListener(z,"click",mxUtils.bind(g,function(){function k(){var a=m.value,a=0==a.length&&"string"!=v?0:a;t.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=t.min&&a<t.min?a=t.min:null!=t.max&&a>t.max&&(a=t.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");f(b,a,t)}var m=document.createElement("input");c(z,m,!0);m.value=d;m.className="gePropEditor";
|
||||
"int"!=v&&"float"!=v||t.allowAuto||(m.type="number",m.step="int"==v?"1":"any",null!=t.min&&(m.min=parseFloat(t.min)),null!=t.max&&(m.max=parseFloat(t.max)));a.appendChild(m);mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&k()});m.focus();mxEvent.addListener(m,"blur",function(){k()})})));t.isDeletable&&(w=mxUtils.button("-",mxUtils.bind(g,function(a){f(b,"",t,t.index);mxEvent.consume(a)})),w.style.height="16px",w.style.width="25px",w.style["float"]="right",w.className="geColorBtn",z.appendChild(w));
|
||||
l.appendChild(z);return l}var g=this,u=this.editorUi.editor.graph,w=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var h=document.createElement("tr");h.className="gePropHeader";var l=document.createElement("th");l.className="gePropHeaderCell";var z=document.createElement("img");z.src=Sidebar.prototype.expandedImage;l.appendChild(z);mxUtils.write(l,mxResources.get("property"));h.style.cursor="pointer";var y=
|
||||
function(){var b=v.querySelectorAll(".gePropNonHeaderRow"),d;if(g.editorUi.propertiesCollapsed){z.src=Sidebar.prototype.collapsedImage;d="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var c=a.childNodes[f],k=c.nodeName.toUpperCase();"INPUT"!=k&&"SELECT"!=k||a.removeChild(c)}catch(ea){}}else z.src=Sidebar.prototype.expandedImage,d="";for(f=0;f<b.length;f++)b[f].style.display=d};mxEvent.addListener(h,"click",function(){g.editorUi.propertiesCollapsed=!g.editorUi.propertiesCollapsed;y()});h.appendChild(l);
|
||||
l=document.createElement("th");l.className="gePropHeaderCell";l.innerHTML=mxResources.get("value");h.appendChild(l);v.appendChild(h);var D=!1,B=!1,p;for(p in b)if(h=b[p],"function"!=typeof h.isVisible||h.isVisible(d)){var n=null!=d.style[p]?mxUtils.htmlEntities(d.style[p]+""):h.defVal;if("separator"==h.type)B=!B;else{if("staticArr"==h.type)h.size=parseInt(d.style[h.sizeProperty]||b[h.sizeProperty].defVal)||0;else if(null!=h.dependentProps){for(var U=h.dependentProps,R=[],O=[],l=0;l<U.length;l++){var V=
|
||||
d.style[U[l]];O.push(b[U[l]].subDefVal);R.push(null!=V?V.split(","):[])}h.dependentPropsDefVal=O;h.dependentPropsVals=R}v.appendChild(t(p,n,h,D,B));D=!D}}for(l=0;l<w.length;l++)for(h=w[l],b=h.parentRow,d=0;d<h.values.length;d++)p=t(h.name,h.values[d],{type:h.type,parentRow:h.parentRow,isDeletable:h.isDeletable,index:d,defVal:h.defVal,countProperty:h.countProperty,size:h.size},0==d%2,h.flipBkg),b.parentNode.insertBefore(p,b.nextSibling),b=p;a.appendChild(v);y();return a};StyleFormatPanel.prototype.addStyles=
|
||||
function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();try{var d=f.getSelectionCells();for(b=0;b<d.length;b++){for(var c=f.getModel().getStyle(d[b]),m=0;m<k.length;m++)c=mxUtils.removeStylename(c,k[m]);var e=f.getModel().isVertex(d[b])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(c=mxUtils.setStyle(c,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,null)),c=mxUtils.setStyle(c,mxConstants.STYLE_STROKECOLOR,a.stroke||
|
||||
b,d,f){u.getModel().beginUpdate();try{var c=[],m=[];if(null!=d.index){for(var k=[],e=d.parentRow.nextSibling;e&&e.getAttribute("data-pName")==a;)k.push(e.getAttribute("data-pValue")),e=e.nextSibling;d.index<k.length?null!=f?k.splice(f,1):k[d.index]=b:k.push(b);null!=d.size&&k.length>d.size&&(k=k.slice(0,d.size));b=k.join(",");null!=d.countProperty&&(u.setCellStyles(d.countProperty,k.length,u.getSelectionCells()),c.push(d.countProperty),m.push(k.length))}u.setCellStyles(a,b,u.getSelectionCells());
|
||||
c.push(a);m.push(b);if(null!=d.dependentProps)for(a=0;a<d.dependentProps.length;a++){var q=d.dependentPropsDefVal[a],t=d.dependentPropsVals[a];if(t.length>b)t=t.slice(0,b);else for(var w=t.length;w<b;w++)t.push(q);t=t.join(",");u.setCellStyles(d.dependentProps[a],t,u.getSelectionCells());c.push(d.dependentProps[a]);m.push(t)}g.editorUi.fireEvent(new mxEventObject("styleChanged","keys",c,"values",m,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function c(b,d,f){var c=mxUtils.getOffset(a,
|
||||
!0),m=mxUtils.getOffset(b,!0);d.style.position="absolute";d.style.left=m.x-c.x+"px";d.style.top=m.y-c.y+"px";d.style.width=b.offsetWidth+"px";d.style.height=b.offsetHeight-(f?4:0)+"px";d.style.zIndex=5}function m(a,b,d){var c=document.createElement("div");c.style.width="32px";c.style.height="4px";c.style.margin="2px";c.style.border="1px solid black";c.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(g,function(m){this.editorUi.pickColor(b,
|
||||
function(b){c.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;f(a,b,d)});mxEvent.consume(m)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(c);return btn}function k(a,b,d,c,m,k,e){null!=b&&(b=b.split(","),w.push({name:a,values:b,type:d,defVal:c,countProperty:m,parentRow:k,isDeletable:!0,flipBkg:e}));btn=mxUtils.button("+",mxUtils.bind(g,function(b){for(var q=k,g=0;null!=q.nextSibling;)if(q.nextSibling.getAttribute("data-pName")==
|
||||
a)q=q.nextSibling,g++;else break;var u={type:d,parentRow:k,index:g,isDeletable:!0,defVal:c,countProperty:m},g=t(a,"",u,0==g%2,e);f(a,c,u);q.parentNode.insertBefore(g,q.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function e(a,b,d,f,c,m,k){if(0<c){var e=Array(c);b=null!=b?b.split(","):[];for(var q=0;q<c;q++)e[q]=null!=b[q]?b[q]:null!=f?f:"";w.push({name:a,values:e,type:d,defVal:f,parentRow:m,flipBkg:k,size:c})}return document.createElement("div")}
|
||||
function q(a,b,d){var c=document.createElement("input");c.type="checkbox";c.checked="1"==b;mxEvent.addListener(c,"change",function(){f(a,c.checked?"1":"0",d)});return c}function t(b,d,t,u,w){var h=t.dispName,v=t.type,z=document.createElement("tr");z.className="gePropRow"+(w?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";z.setAttribute("data-pName",b);z.setAttribute("data-pValue",d);u=!1;null!=t.index&&(z.setAttribute("data-index",t.index),h=(null!=h?h:"")+"["+t.index+"]",u=!0);var l=document.createElement("td");
|
||||
l.className="gePropRowCell";l.innerHTML=mxUtils.htmlEntities(mxResources.get(h,null,h));u&&(l.style.textAlign="right");z.appendChild(l);l=document.createElement("td");l.className="gePropRowCell";if("color"==v)l.appendChild(m(b,d,t));else if("bool"==v||"boolean"==v)l.appendChild(q(b,d,t));else if("enum"==v){var y=t.enumList;for(w=0;w<y.length;w++)if(h=y[w],h.val==d){l.innerHTML=mxUtils.htmlEntities(mxResources.get(h.dispName,null,h.dispName));break}mxEvent.addListener(l,"click",mxUtils.bind(g,function(){var m=
|
||||
document.createElement("select");c(l,m);for(var k=0;k<y.length;k++){var e=y[k],q=document.createElement("option");q.value=mxUtils.htmlEntities(e.val);q.innerHTML=mxUtils.htmlEntities(mxResources.get(e.dispName,null,e.dispName));m.appendChild(q)}m.value=d;a.appendChild(m);mxEvent.addListener(m,"change",function(){var a=mxUtils.htmlEntities(m.value);f(b,a,t)});m.focus();mxEvent.addListener(m,"blur",function(){a.removeChild(m)})}))}else"dynamicArr"==v?l.appendChild(k(b,d,t.subType,t.subDefVal,t.countProperty,
|
||||
z,w)):"staticArr"==v?l.appendChild(e(b,d,t.subType,t.subDefVal,t.size,z,w)):(l.innerHTML=d,mxEvent.addListener(l,"click",mxUtils.bind(g,function(){function m(){var a=k.value,a=0==a.length&&"string"!=v?0:a;t.allowAuto&&("auto"==a.trim().toLowerCase()?(a="auto",v="string"):(a=parseFloat(a),a=isNaN(a)?0:a));null!=t.min&&a<t.min?a=t.min:null!=t.max&&a>t.max&&(a=t.max);a=mxUtils.htmlEntities(("int"==v?parseInt(a):a)+"");f(b,a,t)}var k=document.createElement("input");c(l,k,!0);k.value=d;k.className="gePropEditor";
|
||||
"int"!=v&&"float"!=v||t.allowAuto||(k.type="number",k.step="int"==v?"1":"any",null!=t.min&&(k.min=parseFloat(t.min)),null!=t.max&&(k.max=parseFloat(t.max)));a.appendChild(k);mxEvent.addListener(k,"keypress",function(a){13==a.keyCode&&m()});k.focus();mxEvent.addListener(k,"blur",function(){m()})})));t.isDeletable&&(w=mxUtils.button("-",mxUtils.bind(g,function(a){f(b,"",t,t.index);mxEvent.consume(a)})),w.style.height="16px",w.style.width="25px",w.style["float"]="right",w.className="geColorBtn",l.appendChild(w));
|
||||
z.appendChild(l);return z}var g=this,u=this.editorUi.editor.graph,w=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var h=document.createElement("tr");h.className="gePropHeader";var z=document.createElement("th");z.className="gePropHeaderCell";var l=document.createElement("img");l.src=Sidebar.prototype.expandedImage;z.appendChild(l);mxUtils.write(z,mxResources.get("property"));h.style.cursor="pointer";var y=
|
||||
function(){var b=v.querySelectorAll(".gePropNonHeaderRow"),d;if(g.editorUi.propertiesCollapsed){l.src=Sidebar.prototype.collapsedImage;d="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var c=a.childNodes[f],m=c.nodeName.toUpperCase();"INPUT"!=m&&"SELECT"!=m||a.removeChild(c)}catch(fa){}}else l.src=Sidebar.prototype.expandedImage,d="";for(f=0;f<b.length;f++)b[f].style.display=d};mxEvent.addListener(h,"click",function(){g.editorUi.propertiesCollapsed=!g.editorUi.propertiesCollapsed;y()});h.appendChild(z);
|
||||
z=document.createElement("th");z.className="gePropHeaderCell";z.innerHTML=mxResources.get("value");h.appendChild(z);v.appendChild(h);var D=!1,B=!1,p;for(p in b)if(h=b[p],"function"!=typeof h.isVisible||h.isVisible(d)){var n=null!=d.style[p]?mxUtils.htmlEntities(d.style[p]+""):h.defVal;if("separator"==h.type)B=!B;else{if("staticArr"==h.type)h.size=parseInt(d.style[h.sizeProperty]||b[h.sizeProperty].defVal)||0;else if(null!=h.dependentProps){for(var U=h.dependentProps,O=[],P=[],z=0;z<U.length;z++){var V=
|
||||
d.style[U[z]];P.push(b[U[z]].subDefVal);O.push(null!=V?V.split(","):[])}h.dependentPropsDefVal=P;h.dependentPropsVals=O}v.appendChild(t(p,n,h,D,B));D=!D}}for(z=0;z<w.length;z++)for(h=w[z],b=h.parentRow,d=0;d<h.values.length;d++)p=t(h.name,h.values[d],{type:h.type,parentRow:h.parentRow,isDeletable:h.isDeletable,index:d,defVal:h.defVal,countProperty:h.countProperty,size:h.size},0==d%2,h.flipBkg),b.parentNode.insertBefore(p,b.nextSibling),b=p;a.appendChild(v);y();return a};StyleFormatPanel.prototype.addStyles=
|
||||
function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){f.getModel().beginUpdate();try{var d=f.getSelectionCells();for(b=0;b<d.length;b++){for(var c=f.getModel().getStyle(d[b]),k=0;k<m.length;k++)c=mxUtils.removeStylename(c,m[k]);var e=f.getModel().isVertex(d[b])?f.defaultVertexStyle:f.defaultEdgeStyle;null!=a?(c=mxUtils.setStyle(c,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,null)),c=mxUtils.setStyle(c,mxConstants.STYLE_STROKECOLOR,a.stroke||
|
||||
mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,null)),c=mxUtils.setStyle(c,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(d[b])&&(c=mxUtils.setStyle(c,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null)))):(c=mxUtils.setStyle(c,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,"#ffffff")),c=mxUtils.setStyle(c,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(e,
|
||||
mxConstants.STYLE_STROKECOLOR,"#000000")),c=mxUtils.setStyle(c,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(d[b])&&(c=mxUtils.setStyle(c,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(e,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(d[b],c)}}finally{f.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&
|
||||
(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?b.style.background="url('"+Dialog.prototype.noColorImage+"')":b.style.backgroundColor=a.fill||mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),b.style.border="1px solid "+(a.stroke||mxUtils.getValue(f.defaultVertexStyle,
|
||||
mxConstants.STYLE_STROKECOLOR,"#000000"));else{var d=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),m=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=d;b.style.border="1px solid "+m}c.appendChild(b)}c.innerHTML="";for(var d=0;d<a.length;d++)0<d&&0==mxUtils.mod(d,4)&&mxUtils.br(c),b(a[d])}function d(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity=
|
||||
"0.5"})}var f=this.editorUi.editor.graph,c=document.createElement("div");c.style.whiteSpace="nowrap";c.style.paddingLeft="24px";c.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(c);var k="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=
|
||||
0);var m=document.createElement("div");m.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(m,
|
||||
mxConstants.STYLE_STROKECOLOR,"#000000"));else{var d=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),k=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");b.style.backgroundColor=d;b.style.border="1px solid "+k}c.appendChild(b)}c.innerHTML="";for(var d=0;d<a.length;d++)0<d&&0==mxUtils.mod(d,4)&&mxUtils.br(c),b(a[d])}function d(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity=
|
||||
"0.5"})}var f=this.editorUi.editor.graph,c=document.createElement("div");c.style.whiteSpace="nowrap";c.style.paddingLeft="24px";c.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(c);var m="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=
|
||||
0);var k=document.createElement("div");k.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(k,
|
||||
"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var e=document.createElement("div");e.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
|
||||
1<this.defaultColorSchemes.length&&(a.appendChild(m),a.appendChild(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));d(m);d(e);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),d=null;1==this.editorUi.editor.graph.getSelectionCount()&&
|
||||
1<this.defaultColorSchemes.length&&(a.appendChild(k),a.appendChild(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));d(k);d(e);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),d=null;1==this.editorUi.editor.graph.getSelectionCount()&&
|
||||
(d=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),d.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),d.style.width="202px",d.style.marginBottom="2px",a.appendChild(d));var f=this.editorUi.editor.graph,c=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=c&&null!=c.shape&&null!=c.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
|
||||
function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom="2px",null==d?b.style.width="202px":(d.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==d?b.style.width="202px":
|
||||
(d.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
|
||||
|
@ -7837,13 +7838,13 @@ this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKi
|
|||
function(){y.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++)if(null!=a.actions[b].open)if(this.isCustomLink(a.actions[b].open)){if(!this.customLinkClicked(a.actions[b].open))return}else this.openLink(a.actions[b].open);this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)this.handleLinkAction(a.actions[b])}finally{this.model.endUpdate()}}};
|
||||
Graph.prototype.handleLinkAction=function(a){var b=[];null!=a.select&&this.isEnabled()&&(b=this.getCellsForAction(a.select),this.setSelectionCells(b));null!=a.highlight&&(b=this.getCellsForAction(a.highlight),this.highlightCells(b,a.highlight.color,a.highlight.duration,a.highlight.opacity));null!=a.toggle&&this.toggleCells(this.getCellsForAction(a.toggle));null!=a.show&&this.setCellsVisible(this.getCellsForAction(a.show),!0);null!=a.hide&&this.setCellsVisible(this.getCellsForAction(a.hide),!1);null!=
|
||||
a.scroll&&(b=this.getCellsForAction(a.scroll));0<b.length&&this.scrollCellToVisible(b[0])};Graph.prototype.getCellsForAction=function(a){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags))};Graph.prototype.getCellsById=function(a){var b=[];if(null!=a)for(var d=0;d<a.length;d++)if("*"==a[d])var f=this.getDefaultParent(),b=b.concat(this.model.filterDescendants(function(a){return a!=f},f));else{var c=this.model.getCell(a[d]);null!=c&&b.push(c)}return b};Graph.prototype.getCellsForTags=
|
||||
function(a,b,d){var f=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());d=null!=d?d:"tags";for(var c=0;c<b.length;c++)if(this.model.isVertex(b[c])||this.model.isEdge(b[c])){var k=null!=b[c].value&&"object"==typeof b[c].value?mxUtils.trim(b[c].value.getAttribute(d)||""):"",m=!0;if(0<k.length)for(var k=k.toLowerCase().split(" "),e=0;e<a.length&&m;e++)var q=mxUtils.trim(a[e]).toLowerCase(),m=m&&(0==q.length||0<=mxUtils.indexOf(k,q));else m=0==a.length;m&&f.push(b[c])}}return f};
|
||||
function(a,b,d){var f=[];if(null!=a){b=null!=b?b:this.model.getDescendants(this.model.getRoot());d=null!=d?d:"tags";for(var c=0;c<b.length;c++)if(this.model.isVertex(b[c])||this.model.isEdge(b[c])){var m=null!=b[c].value&&"object"==typeof b[c].value?mxUtils.trim(b[c].value.getAttribute(d)||""):"",k=!0;if(0<m.length)for(var m=m.toLowerCase().split(" "),e=0;e<a.length&&k;e++)var q=mxUtils.trim(a[e]).toLowerCase(),k=k&&(0==q.length||0<=mxUtils.indexOf(m,q));else k=0==a.length;k&&f.push(b[c])}}return f};
|
||||
Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],!this.model.isVisible(a[b]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,b){this.model.beginUpdate();try{for(var d=0;d<a.length;d++)this.model.setVisible(a[d],b)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(a,b,d,f){for(var c=0;c<a.length;c++)this.highlightCell(a[c],b,d,f)};Graph.prototype.highlightCell=function(a,b,
|
||||
d,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;d=null!=d?d:1E3;a=this.view.getState(a);if(null!=a){var c=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),k=new mxCellHighlight(this,b,c,!1);null!=f&&(k.opacity=f);k.highlight(a);window.setTimeout(function(){null!=k.shape&&(mxUtils.setPrefixedStyle(k.shape.node.style,"transition","all 1200ms ease-in-out"),k.shape.node.style.opacity=0);window.setTimeout(function(){k.destroy()},1200)},d)}};Graph.prototype.addSvgShadow=function(a,
|
||||
b,d){d=null!=d?d:!1;var f=a.ownerDocument,c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");c.setAttribute("id",this.shadowId);var k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");k.setAttribute("in","SourceAlpha");k.setAttribute("stdDeviation",this.svgShadowBlur);k.setAttribute("result","blur");c.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):
|
||||
f.createElement("feOffset");k.setAttribute("in","blur");k.setAttribute("dx",this.svgShadowSize);k.setAttribute("dy",this.svgShadowSize);k.setAttribute("result","offsetBlur");c.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");k.setAttribute("flood-color",this.svgShadowColor);k.setAttribute("flood-opacity",this.svgShadowOpacity);k.setAttribute("result","offsetColor");c.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
|
||||
"feComposite"):f.createElement("feComposite");k.setAttribute("in","offsetColor");k.setAttribute("in2","offsetBlur");k.setAttribute("operator","in");k.setAttribute("result","offsetBlur");c.appendChild(k);k=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");k.setAttribute("in","SourceGraphic");k.setAttribute("in2","offsetBlur");c.appendChild(k);k=a.getElementsByTagName("defs");0==k.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
|
||||
"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=k[0];f.appendChild(c);d||((b||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return c};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
|
||||
d,f){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;d=null!=d?d:1E3;a=this.view.getState(a);if(null!=a){var c=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),m=new mxCellHighlight(this,b,c,!1);null!=f&&(m.opacity=f);m.highlight(a);window.setTimeout(function(){null!=m.shape&&(mxUtils.setPrefixedStyle(m.shape.node.style,"transition","all 1200ms ease-in-out"),m.shape.node.style.opacity=0);window.setTimeout(function(){m.destroy()},1200)},d)}};Graph.prototype.addSvgShadow=function(a,
|
||||
b,d){d=null!=d?d:!1;var f=a.ownerDocument,c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");c.setAttribute("id",this.shadowId);var m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");m.setAttribute("in","SourceAlpha");m.setAttribute("stdDeviation",this.svgShadowBlur);m.setAttribute("result","blur");c.appendChild(m);m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):
|
||||
f.createElement("feOffset");m.setAttribute("in","blur");m.setAttribute("dx",this.svgShadowSize);m.setAttribute("dy",this.svgShadowSize);m.setAttribute("result","offsetBlur");c.appendChild(m);m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");m.setAttribute("flood-color",this.svgShadowColor);m.setAttribute("flood-opacity",this.svgShadowOpacity);m.setAttribute("result","offsetColor");c.appendChild(m);m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
|
||||
"feComposite"):f.createElement("feComposite");m.setAttribute("in","offsetColor");m.setAttribute("in2","offsetBlur");m.setAttribute("operator","in");m.setAttribute("result","offsetBlur");c.appendChild(m);m=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");m.setAttribute("in","SourceGraphic");m.setAttribute("in2","offsetBlur");c.appendChild(m);m=a.getElementsByTagName("defs");0==m.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,
|
||||
"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=m[0];f.appendChild(c);d||((b||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return c};Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
|
||||
"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),b,d=0;do b=this.model.getChildAt(this.model.root,d);while(d++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=b&&this.setDefaultParent(b)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];
|
||||
mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=
|
||||
[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=
|
||||
|
@ -7853,29 +7854,29 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
|
|||
STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];
|
||||
mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
|
||||
[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var k=mxMarker.createMarker;mxMarker.createMarker=function(a,b,d,f,c,m,e,q,t,g){if(null!=d&&null==mxMarker.markers[d]){var u=this.getPackageForType(d);null!=u&&mxStencilRegistry.getStencil(u)}return k.apply(this,arguments)};
|
||||
PrintDialog.prototype.create=function(a,b){function d(){h.value=Math.max(1,Math.min(e,Math.max(parseInt(h.value),parseInt(w.value))));w.value=Math.max(1,Math.min(e,Math.min(parseInt(h.value),parseInt(w.value))))}function f(b){function d(b,d,c){var k=b.getGraphBounds(),m=0,e=0,q=da.get(),t=1/b.pageScale,g=p.checked;if(g)var t=parseInt(X.value),u=parseInt(W.value),t=Math.min(q.height*u/(k.height/b.view.scale),q.width*t/(k.width/b.view.scale));else t=parseInt(y.value)/(100*b.pageScale),isNaN(t)&&(f=
|
||||
1/b.pageScale,y.value="100 %");q=mxRectangle.fromRectangle(q);q.width=Math.ceil(q.width*f);q.height=Math.ceil(q.height*f);t*=f;!g&&b.pageVisible?(k=b.getPageLayout(),m-=k.x*q.width,e-=k.y*q.height):g=!0;if(null==d){d=PrintDialog.createPrintPreview(b,t,q,0,m,e,g);d.pageSelector=!1;d.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(d.title=b.getTitle());var w=d.writeHead;d.writeHead=function(b){w.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),
|
||||
b.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=d.renderPage;d.renderPage=function(a,b,d,f,c,k){var m=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=v.apply(this,arguments);mxClient.NO_FO=m;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}d.open(null,null,c,!0)}else{q=b.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";d.backgroundColor=q;d.autoOrigin=
|
||||
g;d.appendGraph(b,t,m,e,c,!0)}return d}var f=parseInt(ba.value)/100;isNaN(f)&&(f=1,ba.value="100 %");var f=.75*f,k=w.value,m=h.value,e=!g.checked,t=null;e&&(e=k==q&&m==q);if(!e&&null!=a.pages&&a.pages.length){var u=0,e=a.pages.length-1;g.checked||(u=parseInt(k)-1,e=parseInt(m)-1);for(var v=u;v<=e;v++){var l=a.pages[v],k=l==a.currentPage?c:null;if(null==k){var k=a.createTemporaryGraph(c.getStylesheet()),m=!0,u=!1,z=null,n=null;null==l.viewState&&null==l.root&&a.updatePageRoot(l);null!=l.viewState&&
|
||||
(m=l.viewState.pageVisible,u=l.viewState.mathEnabled,z=l.viewState.background,n=l.viewState.backgroundImage);k.background=z;k.backgroundImage=null!=n?new mxImage(n.src,n.width,n.height):null;k.pageVisible=m;k.mathEnabled=u;var D=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?v+1:D.apply(this,arguments)};document.body.appendChild(k.container);a.updatePageRoot(l);k.model.setRoot(l.root)}t=d(k,t,v!=e);k!=c&&k.container.parentNode.removeChild(k.container)}}else t=
|
||||
PrintDialog.prototype.create=function(a,b){function d(){h.value=Math.max(1,Math.min(e,Math.max(parseInt(h.value),parseInt(w.value))));w.value=Math.max(1,Math.min(e,Math.min(parseInt(h.value),parseInt(w.value))))}function f(b){function d(b,d,c){var m=b.getGraphBounds(),k=0,e=0,q=W.get(),t=1/b.pageScale,g=p.checked;if(g)var t=parseInt(J.value),u=parseInt(ca.value),t=Math.min(q.height*u/(m.height/b.view.scale),q.width*t/(m.width/b.view.scale));else t=parseInt(y.value)/(100*b.pageScale),isNaN(t)&&(f=
|
||||
1/b.pageScale,y.value="100 %");q=mxRectangle.fromRectangle(q);q.width=Math.ceil(q.width*f);q.height=Math.ceil(q.height*f);t*=f;!g&&b.pageVisible?(m=b.getPageLayout(),k-=m.x*q.width,e-=m.y*q.height):g=!0;if(null==d){d=PrintDialog.createPrintPreview(b,t,q,0,k,e,g);d.pageSelector=!1;d.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(d.title=b.getTitle());var w=d.writeHead;d.writeHead=function(b){w.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),
|
||||
b.writeln("</style>"))};if("undefined"!==typeof MathJax){var v=d.renderPage;d.renderPage=function(a,b,d,f,c,m){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var e=v.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:e.className="geDisableMathJax";return e}}d.open(null,null,c,!0)}else{q=b.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";d.backgroundColor=q;d.autoOrigin=
|
||||
g;d.appendGraph(b,t,k,e,c,!0)}return d}var f=parseInt(da.value)/100;isNaN(f)&&(f=1,da.value="100 %");var f=.75*f,m=w.value,k=h.value,e=!g.checked,t=null;e&&(e=m==q&&k==q);if(!e&&null!=a.pages&&a.pages.length){var u=0,e=a.pages.length-1;g.checked||(u=parseInt(m)-1,e=parseInt(k)-1);for(var v=u;v<=e;v++){var l=a.pages[v],m=l==a.currentPage?c:null;if(null==m){var m=a.createTemporaryGraph(c.getStylesheet()),k=!0,u=!1,z=null,n=null;null==l.viewState&&null==l.root&&a.updatePageRoot(l);null!=l.viewState&&
|
||||
(k=l.viewState.pageVisible,u=l.viewState.mathEnabled,z=l.viewState.background,n=l.viewState.backgroundImage);m.background=z;m.backgroundImage=null!=n?new mxImage(n.src,n.width,n.height):null;m.pageVisible=k;m.mathEnabled=u;var D=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?v+1:D.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(l);m.model.setRoot(l.root)}t=d(m,t,v!=e);m!=c&&m.container.parentNode.removeChild(m.container)}}else t=
|
||||
d(c);t.mathEnabled&&(e=t.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln("showMathMenu: false,"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln('"HTML-CSS": {'),e.writeln("imageFont: null"),e.writeln("},"),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
|
||||
e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="https://math.draw.io/current/MathJax.js">\x3c/script>'));t.closeDocument();!t.mathEnabled&&b&&PrintDialog.printPreview(t)}
|
||||
var c=a.editor.graph,k=document.createElement("div"),m=document.createElement("h3");m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,b||mxResources.get("print"));k.appendChild(m);var e=1,q=1,t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","all");g.setAttribute("type","radio");
|
||||
g.setAttribute("name","pages-printdialog");t.appendChild(g);m=document.createElement("span");mxUtils.write(m,mxResources.get("printAllPages"));t.appendChild(m);mxUtils.br(t);var u=g.cloneNode(!0);g.setAttribute("checked","checked");u.setAttribute("value","range");t.appendChild(u);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");t.appendChild(m);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";w.setAttribute("value","1");w.setAttribute("type",
|
||||
"number");w.setAttribute("min","1");w.style.width="50px";t.appendChild(w);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));t.appendChild(m);var h=w.cloneNode(!0);t.appendChild(h);mxEvent.addListener(w,"focus",function(){u.checked=!0});mxEvent.addListener(h,"focus",function(){u.checked=!0});mxEvent.addListener(w,"change",d);mxEvent.addListener(h,"change",d);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(m=0;m<a.pages.length;m++)if(a.currentPage==a.pages[m]){q=m+
|
||||
1;w.value=q;h.value=q;break}w.setAttribute("max",e);h.setAttribute("max",e);1<e&&k.appendChild(t);var v=document.createElement("div");v.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");v.appendChild(l);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));v.appendChild(m);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";
|
||||
y.setAttribute("value","100 %");y.style.width="50px";v.appendChild(y);mxEvent.addListener(y,"focus",function(){l.checked=!0});k.appendChild(v);var t=t.cloneNode(!1),p=l.cloneNode(!0);p.setAttribute("value","fit");l.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(p);t.appendChild(m);v=document.createElement("table");v.style.display="inline-block";var n=document.createElement("tbody"),
|
||||
z=document.createElement("tr"),D=z.cloneNode(!0),L=document.createElement("td"),U=L.cloneNode(!0),R=L.cloneNode(!0),O=L.cloneNode(!0),V=L.cloneNode(!0),J=L.cloneNode(!0);L.style.textAlign="right";O.style.textAlign="right";mxUtils.write(L,mxResources.get("fitTo"));var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value","1");X.setAttribute("min","1");X.setAttribute("type","number");X.style.width="40px";U.appendChild(X);m=document.createElement("span");mxUtils.write(m,
|
||||
mxResources.get("fitToSheetsAcross"));R.appendChild(m);mxUtils.write(O,mxResources.get("fitToBy"));var W=X.cloneNode(!0);V.appendChild(W);mxEvent.addListener(X,"focus",function(){p.checked=!0});mxEvent.addListener(W,"focus",function(){p.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));J.appendChild(m);z.appendChild(L);z.appendChild(U);z.appendChild(R);D.appendChild(O);D.appendChild(V);D.appendChild(J);n.appendChild(z);n.appendChild(D);v.appendChild(n);
|
||||
t.appendChild(v);k.appendChild(t);t=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));t.appendChild(m);m=document.createElement("div");m.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(m,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));t.appendChild(m);
|
||||
var ba=document.createElement("input");ba.style.cssText="margin:0 8px 0 8px;";ba.setAttribute("value","100 %");ba.style.width="60px";t.appendChild(ba);k.appendChild(t);m=document.createElement("div");m.style.cssText="text-align:right;margin:48px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&m.appendChild(t);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){c.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
|
||||
v.className="geBtn",m.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),v.className="geBtn",m.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});v.className="geBtn gePrimaryBtn";m.appendChild(v);a.editor.cancelFirst||m.appendChild(t);k.appendChild(m);this.container=k};var v=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
|
||||
var c=a.editor.graph,m=document.createElement("div"),k=document.createElement("h3");k.style.width="100%";k.style.textAlign="center";k.style.marginTop="0px";mxUtils.write(k,b||mxResources.get("print"));m.appendChild(k);var e=1,q=1,t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","all");g.setAttribute("type","radio");
|
||||
g.setAttribute("name","pages-printdialog");t.appendChild(g);k=document.createElement("span");mxUtils.write(k,mxResources.get("printAllPages"));t.appendChild(k);mxUtils.br(t);var u=g.cloneNode(!0);g.setAttribute("checked","checked");u.setAttribute("value","range");t.appendChild(u);k=document.createElement("span");mxUtils.write(k,mxResources.get("pages")+":");t.appendChild(k);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";w.setAttribute("value","1");w.setAttribute("type",
|
||||
"number");w.setAttribute("min","1");w.style.width="50px";t.appendChild(w);k=document.createElement("span");mxUtils.write(k,mxResources.get("to"));t.appendChild(k);var h=w.cloneNode(!0);t.appendChild(h);mxEvent.addListener(w,"focus",function(){u.checked=!0});mxEvent.addListener(h,"focus",function(){u.checked=!0});mxEvent.addListener(w,"change",d);mxEvent.addListener(h,"change",d);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(k=0;k<a.pages.length;k++)if(a.currentPage==a.pages[k]){q=k+
|
||||
1;w.value=q;h.value=q;break}w.setAttribute("max",e);h.setAttribute("max",e);1<e&&m.appendChild(t);var v=document.createElement("div");v.style.marginBottom="10px";var l=document.createElement("input");l.style.marginRight="8px";l.setAttribute("value","adjust");l.setAttribute("type","radio");l.setAttribute("name","printZoom");v.appendChild(l);k=document.createElement("span");mxUtils.write(k,mxResources.get("adjustTo"));v.appendChild(k);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";
|
||||
y.setAttribute("value","100 %");y.style.width="50px";v.appendChild(y);mxEvent.addListener(y,"focus",function(){l.checked=!0});m.appendChild(v);var t=t.cloneNode(!1),p=l.cloneNode(!0);p.setAttribute("value","fit");l.setAttribute("checked","checked");k=document.createElement("div");k.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";k.appendChild(p);t.appendChild(k);v=document.createElement("table");v.style.display="inline-block";var z=document.createElement("tbody"),
|
||||
n=document.createElement("tr"),D=n.cloneNode(!0),L=document.createElement("td"),U=L.cloneNode(!0),O=L.cloneNode(!0),P=L.cloneNode(!0),V=L.cloneNode(!0),ba=L.cloneNode(!0);L.style.textAlign="right";P.style.textAlign="right";mxUtils.write(L,mxResources.get("fitTo"));var J=document.createElement("input");J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","1");J.setAttribute("min","1");J.setAttribute("type","number");J.style.width="40px";U.appendChild(J);k=document.createElement("span");mxUtils.write(k,
|
||||
mxResources.get("fitToSheetsAcross"));O.appendChild(k);mxUtils.write(P,mxResources.get("fitToBy"));var ca=J.cloneNode(!0);V.appendChild(ca);mxEvent.addListener(J,"focus",function(){p.checked=!0});mxEvent.addListener(ca,"focus",function(){p.checked=!0});k=document.createElement("span");mxUtils.write(k,mxResources.get("fitToSheetsDown"));ba.appendChild(k);n.appendChild(L);n.appendChild(U);n.appendChild(O);D.appendChild(P);D.appendChild(V);D.appendChild(ba);z.appendChild(n);z.appendChild(D);v.appendChild(z);
|
||||
t.appendChild(v);m.appendChild(t);t=document.createElement("div");k=document.createElement("div");k.style.fontWeight="bold";k.style.marginBottom="12px";mxUtils.write(k,mxResources.get("paperSize"));t.appendChild(k);k=document.createElement("div");k.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(k,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(k);k=document.createElement("span");mxUtils.write(k,mxResources.get("pageScale"));t.appendChild(k);
|
||||
var da=document.createElement("input");da.style.cssText="margin:0 8px 0 8px;";da.setAttribute("value","100 %");da.style.width="60px";t.appendChild(da);m.appendChild(t);k=document.createElement("div");k.style.cssText="text-align:right;margin:48px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&k.appendChild(t);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){c.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
|
||||
v.className="geBtn",k.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),v.className="geBtn",k.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});v.className="geBtn gePrimaryBtn";k.appendChild(v);a.editor.cancelFirst||k.appendChild(t);m.appendChild(k);this.container=m};var v=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
|
||||
this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(v.apply(this,arguments),null!=this.mathEnabled&&
|
||||
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
|
||||
var ErrorDialog=function(a,c,b,e,g,h,l,p,n,d,f){n=null!=n?n:!0;var m=document.createElement("div");m.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="16px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";mxUtils.write(q,c);m.appendChild(q)}c=document.createElement("div");c.style.padding="6px";c.innerHTML=b;m.appendChild(c);b=document.createElement("div");
|
||||
b.style.marginTop="16px";b.style.textAlign="center";null!=h&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();h()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=d&&(d=mxUtils.button(d,function(){null!=f&&f()}),d.className="geBtn",b.appendChild(d));var t=mxUtils.button(e,function(){n&&a.hideDialog();null!=g&&g()});t.className="geBtn";b.appendChild(t);null!=l&&(e=mxUtils.button(l,function(){n&&a.hideDialog();null!=p&&p()}),e.className="geBtn gePrimaryBtn",
|
||||
b.appendChild(e));this.init=function(){t.focus()};m.appendChild(b);this.container=m};
|
||||
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,e){e.ui=a.ui;return b};a.afterDecode=function(a,b,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);null!=e.mathEnabled&&(e.mathEnabled=!e.mathEnabled);null!=e.shadowVisible&&(e.shadowVisible=!e.shadowVisible);return e};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.0.28";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,e,t){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,e,t);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==
|
||||
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,e){e.ui=a.ui;return b};a.afterDecode=function(a,b,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);null!=e.mathEnabled&&(e.mathEnabled=!e.mathEnabled);null!=e.shadowVisible&&(e.shadowVisible=!e.shadowVisible);return e};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.0.29";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,e,t){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,e,t);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 d=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/log?severity="+d+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+
|
||||
":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}}catch(y){}};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(m){}};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(m){}};EditorUi.debug=function(){if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)a.push(arguments[b]);console.log.apply(console,
|
||||
|
@ -7953,10 +7954,10 @@ w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);C(c);null!=f&&null!=f.paren
|
|||
d.y-=n.view.translate.y;F(b,d)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",n.panningManager.stop(),n.autoScroll=!1,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!1),
|
||||
null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(g.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),n.isMouseDown=!1,n.autoScroll=!0,H(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&
|
||||
null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",n.autoScroll=!0,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!0),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";
|
||||
a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,k,m,q,t,h,v,u){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
|
||||
a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,k,m,q,t,h,u,v){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
|
||||
this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,q,t),d)],d[0].vertex=!0,F(d,new mxRectangle(0,0,q,t),a,mxEvent.isAltDown(a)?null:h.substring(0,h.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var w=!1,l=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var k=mxUtils.parseXml(d);if("mxlibrary"==k.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(k.documentElement));e(m,g);b=b.concat(m);C(a);
|
||||
this.spinner.stop();w=!0}catch(X){}else if("mxfile"==k.documentElement.nodeName)try{for(var q=k.documentElement.getElementsByTagName("diagram"),k=0;k<q.length;k++){var m=mxUtils.getTextContent(q[k]),t=this.stringToCells(this.editor.graph.decompress(m)),h=this.editor.graph.getBoundingBoxFromGeometry(t);F(t,new mxRectangle(0,0,h.width,h.height),a)}w=!0}catch(X){null!=window.console&&console.log("error in drop handler:",X)}}w||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
|
||||
null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=u&&null!=h&&(/(\.v(dx|sdx?))($|\?)/i.test(h)||/(\.vs(x|sx?))($|\?)/i.test(h))?this.importVisio(u,function(a){l(a,"text/xml")},null,h):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,h)&&null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?l(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
|
||||
this.spinner.stop();w=!0}catch(J){}else if("mxfile"==k.documentElement.nodeName)try{for(var q=k.documentElement.getElementsByTagName("diagram"),k=0;k<q.length;k++){var m=mxUtils.getTextContent(q[k]),t=this.stringToCells(this.editor.graph.decompress(m)),h=this.editor.graph.getBoundingBoxFromGeometry(t);F(t,new mxRectangle(0,0,h.width,h.height),a)}w=!0}catch(J){null!=window.console&&console.log("error in drop handler:",J)}}w||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
|
||||
null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=h&&(/(\.v(dx|sdx?))($|\?)/i.test(h)||/(\.vs(x|sx?))($|\?)/i.test(h))?this.importVisio(v,function(a){l(a,"text/xml")},null,h):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,h)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?l(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
|
||||
"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):l(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",Editor.editImage);l.setAttribute("title",mxResources.get("edit"));h.insertBefore(l,h.firstChild);mxEvent.addListener(l,"click",G);mxEvent.addListener(g,
|
||||
"dblclick",function(a){mxEvent.getSource(a)==g&&G(a)});c=l.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));h.insertBefore(c,h.firstChild);mxEvent.addListener(c,"click",H);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,
|
||||
mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),h.insertBefore(c,h.firstChild))}k.appendChild(h);k.style.paddingRight=18*h.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],f=c.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+
|
||||
|
@ -8032,19 +8033,19 @@ EditorUi.prototype.createEmbedSvg=function(a,b,c,e,g,h,l){var d=this.editor.grap
|
|||
" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,e){a.mathEnabled&&"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?(Editor.MathJaxRender(b),window.setTimeout(mxUtils.bind(this,function(){MathJax.Hub.Queue(mxUtils.bind(this,
|
||||
function(){e()}))}),0)):e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var d=null;if("diagram"==a.nodeName)d=a;else if("mxfile"==a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var d=c[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=d&&(c=b.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement))}c=
|
||||
this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,f=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),f=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),
|
||||
e=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==f&&(f=this.getFileData(!0));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(v){null!=
|
||||
e=d.getGlobalVariable,m=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==f&&(f=this.getFileData(!0));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(v){null!=
|
||||
b&&b(v)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,e,g,h,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=g)this.convertImages(b,mxUtils.bind(this,function(a){g((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
|
||||
mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,e,g,h,l,n,k){k=null!=k?k:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
|
||||
try{this.saveCanvas(a,g?this.getFileData(!0,null,null,null,c,n):null,k)}catch(D){"Invalid image"==D.message?this.downloadFile(k):this.handleError(D)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,h,l)}catch(z){this.spinner.stop(),this.handleError(z)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),
|
||||
"").replace(RegExp("[\\s\"']+$","g"),"")},d=this.editor.fontCss.split("url("),c=0,e={},g=mxUtils.bind(this,function(){if(0==c){for(var f=[d[0]],k=1;k<d.length;k++){var g=d[k].indexOf(")");f.push('url("');f.push(e[b(d[k].substring(0,g))]);f.push('"'+d[k].substring(g))}this.editor.resolvedFontCss=f.join("");a()}});if(0<d.length)for(var h=1;h<d.length;h++){var l=d[h].indexOf(")"),k=null,v=d[h].indexOf("format(",l);0<v&&(k=b(d[h].substring(v+7,d[h].indexOf(")",v))));mxUtils.bind(this,function(a){if(null==
|
||||
e[a]){e[a]=a;c++;var b="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(a))b="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==k||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var d=
|
||||
a;/^https?:\/\//.test(d)&&!this.isCorsEnabledForUrl(d)&&(d=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(d,mxUtils.bind(this,function(b){e[a]=b;c--;g()}),mxUtils.bind(this,function(a){c--;g()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(d[h].substring(0,l)),k)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,g,h,l,n,k,v,p,D,B,x){h=null!=h?h:!0;D=null!=D?D:this.editor.graph;B=null!=B?B:0;var d=k?null:D.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==k&&
|
||||
(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(D.getSvg(d,null,null,x,null,null!=l?l:!0,null,null,null,v),mxUtils.bind(this,function(c){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=document.createElement("canvas"),k=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=h?Math.min(1,Math.min(3*b/(4*m),b/k)):b/k);k=Math.ceil(n*k)+2*B;m=Math.ceil(n*m)+2*B;e.setAttribute("width",k);e.setAttribute("height",m);var l=e.getContext("2d");
|
||||
null!=d&&(l.beginPath(),l.rect(0,0,k,m),l.fillStyle=d,l.fill());l.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){l.drawImage(f,B/n,B/n);a(e)},0):(l.drawImage(f,B/n,B/n),a(e))}catch(K){null!=g&&g(K)}});f.onerror=function(a){null!=g&&g(a)};try{v&&this.editor.graph.addSvgShadow(c,c);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(D,
|
||||
(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(D.getSvg(d,null,null,x,null,null!=l?l:!0,null,null,null,v),mxUtils.bind(this,function(c){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=document.createElement("canvas"),k=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=h?Math.min(1,Math.min(3*b/(4*m),b/k)):b/k);k=Math.ceil(n*k)+2*B;m=Math.ceil(n*m)+2*B;e.setAttribute("width",k);e.setAttribute("height",m);var q=e.getContext("2d");
|
||||
null!=d&&(q.beginPath(),q.rect(0,0,k,m),q.fillStyle=d,q.fill());q.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){q.drawImage(f,B/n,B/n);a(e)},0):(q.drawImage(f,B/n,B/n),a(e))}catch(K){null!=g&&g(K)}});f.onerror=function(a){null!=g&&g(a)};try{v&&this.editor.graph.addSvgShadow(c,c);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(D,
|
||||
c,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(e)}catch(A){null!=g&&g(A)}}),c,p)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=c.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=
|
||||
d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,e){null==e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var k=a.getElementsByTagName(c),m=0;m<k.length;m++)mxUtils.bind(this,function(c){var k=e.convert(c.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var m=f[k];null==m?(d++,this.convertImageToDataUri(k,function(e){null!=e&&(f[k]=e,c.setAttribute(g,
|
||||
e));d--;0==d&&b(a)})):c.setAttribute(g,m)}else null!=k&&c.setAttribute(g,k)})(k[m])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,g,h){try{var d=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);g=null!=g?g:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&
|
||||
"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}h=null!=h?h:"data:image/png;base64,";f=h+this.base64Encode(f)}b(f)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){g&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(k){null!=c&&c(k)}};EditorUi.prototype.isCorsEnabledForUrl=
|
||||
e));d--;0==d&&b(a)})):c.setAttribute(g,m)}else null!=k&&c.setAttribute(g,k)})(k[m])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,g,h){try{var d=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);g=null!=g?g:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&
|
||||
"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}h=null!=h?h:"data:image/png;base64,";e=h+this.base64Encode(e)}b(e)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){g&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(k){null!=c&&c(k)}};EditorUi.prototype.isCorsEnabledForUrl=
|
||||
function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=
|
||||
function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var d=new Image,c=this;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);try{b(a.toDataURL())}catch(w){b(c.svgBrokenImage.src)}};d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=
|
||||
function(a,b,c,e,g){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var m=mxUtils.parseXml(a),k=this.editor.extractGraphModel(m.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var h=k.getElementsByTagName("diagram");if(1==h.length)k=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(h[0]))).documentElement;else if(1<h.length){f.model.beginUpdate();try{for(a=0;a<h.length;a++){h[a].removeAttribute("id");var l=this.updatePageRoot(new DiagramPage(h[a])),
|
||||
|
@ -8072,7 +8073,7 @@ g=null!=g?g:mxUtils.bind(this,function(a,b,c,e,f,k,g,m,h){return null!=a&&"<mxli
|
|||
try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{k.getModel().endUpdate()}}h(d)}}),x=0;x<q;x++)mxUtils.bind(this,function(d){var h=a[d],q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==l||l(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var q=a.target.result,t=q.indexOf(","),n=decodeURIComponent(escape(atob(q.substring(t+1)))),u=mxUtils.parseXml(n),n=u.getElementsByTagName("svg");if(0<n.length){var n=n[0],x=D?null:n.getAttribute("content");
|
||||
null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(x,!0)));null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x));null==x||"<mxfile "!==x.substring(0,8)&&"<mxGraphModel "!==x.substring(0,14)?w(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var f=a[0],l=parseFloat(f.getAttribute("width")),n=parseFloat(f.getAttribute("height")),v=f.getAttribute("viewBox");if(null==v||0==v.length)f.setAttribute("viewBox",
|
||||
"0 0 "+l+" "+n);else if(isNaN(l)||isNaN(n)){var p=v.split(" ");3<p.length&&(l=parseFloat(p[2]),n=parseFloat(p[3]))}q=this.createSvgDataUri(mxUtils.getXml(f));var w=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,n)),x=g(q,h.type,b+d*m,c+d*m,Math.max(1,Math.round(l*w)),Math.max(1,Math.round(n*w)),h.name);if(isNaN(l)||isNaN(n)){var D=new Image;D.onload=mxUtils.bind(this,function(){l=Math.max(1,D.width);n=Math.max(1,D.height);x[0].geometry.width=l;x[0].geometry.height=n;f.setAttribute("viewBox","0 0 "+
|
||||
l+" "+n);q=this.createSvgDataUri(mxUtils.getXml(f));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));k.setCellStyles("image",q,[x[0]])});D.src=this.createSvgDataUri(mxUtils.getXml(f))}return x}}}catch(fa){}return null})):w(d,mxUtils.bind(this,function(){return g(x,"text/xml",b+d*m,c+d*m,0,0,h.name)}))}else w(d,mxUtils.bind(this,function(){return null}))}else{n=!1;if("image/png"==h.type){var A=D?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=
|
||||
l+" "+n);q=this.createSvgDataUri(mxUtils.getXml(f));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));k.setCellStyles("image",q,[x[0]])});D.src=this.createSvgDataUri(mxUtils.getXml(f))}return x}}}catch(ma){}return null})):w(d,mxUtils.bind(this,function(){return g(x,"text/xml",b+d*m,c+d*m,0,0,h.name)}))}else w(d,mxUtils.bind(this,function(){return null}))}else{n=!1;if("image/png"==h.type){var A=D?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=
|
||||
new Image;y.src=a.target.result;w(d,mxUtils.bind(this,function(){return g(A,"text/xml",b+d*m,c+d*m,y.width,y.height,h.name)}));n=!0}}n||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,
|
||||
mxUtils.bind(this,function(k,l,q){w(d,mxUtils.bind(this,function(){if(null!=k&&k.length<v){var t=f&&this.isResampleImage(a.target.result,p)?Math.min(1,Math.min(e/l,e/q)):1;return g(k,h.type,b+d*m,c+d*m,Math.round(l*t),Math.round(q*t),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,p)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else g(a.target.result,h.type,b+d*m,c+d*m,240,160,h.name,function(a){w(d,
|
||||
function(){return a})})});/(\.v(dx|sdx?))($|\?)/i.test(h.name)||/(\.vs(x|sx?))($|\?)/i.test(h.name)?g(null,h.type,b+d*m,c+d*m,240,160,h.name,function(a){w(d,function(){return a})},h):"image"==h.type.substring(0,5)?q.readAsDataURL(h):q.readAsText(h)})(x)});m?this.confirmImageResize(function(a){f=a;u()},k):u()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?
|
||||
|
@ -8090,7 +8091,7 @@ var g=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c
|
|||
arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var k=function(){window.setTimeout(function(){v.innerHTML=" ";
|
||||
v.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize");mxClient.IS_IE||
|
||||
b.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var k=f[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,k){b.insertImage(a,f,k)},function(){},function(a){return"image/"==a.type.substring(0,
|
||||
6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(P){}}),!1);var v=document.createElement("div");v.style.position="absolute";v.style.whiteSpace="nowrap";v.style.overflow="hidden";v.style.display="block";v.contentEditable=!0;mxUtils.setOpacity(v,0);v.style.width="1px";v.style.height="1px";v.innerHTML=" ";var z=!1;this.keyHandler.bindControlKey(88,null);
|
||||
6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(Q){}}),!1);var v=document.createElement("div");v.style.position="absolute";v.style.whiteSpace="nowrap";v.style.overflow="hidden";v.style.display="block";v.contentEditable=!0;mxUtils.setOpacity(v,0);v.style.width="1px";v.style.height="1px";v.innerHTML=" ";var z=!1;this.keyHandler.bindControlKey(88,null);
|
||||
this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||z||(v.style.left=b.container.scrollLeft+10+"px",v.style.top=b.container.scrollTop+10+"px",b.container.appendChild(v),
|
||||
z=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){v.focus();document.execCommand("selectAll",!1,null)},0):(v.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!z||224!=c&&17!=c&&91!=c||(z=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),v.parentNode.removeChild(v),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(v,
|
||||
"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(v),k())}));mxEvent.addListener(v,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(v,!0),k())}));mxEvent.addListener(v,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(v.innerHTML=" ",v.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,v);v.innerHTML=" "}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=
|
||||
|
@ -8157,38 +8158,38 @@ mxUtils.bind(this,function(a){y(a)}),mxUtils.bind(this,function(a){this.handleEr
|
|||
"2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
|
||||
mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,
|
||||
"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,
|
||||
640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var e={},f=null,g=null,h=null,k=null,l="",n="auto",p="auto",B=null,x=null,G=40,C=40,F=100,H=0,A=this.editor.graph;A.getGraphBounds();for(var E=function(){null!=b?b(ea):(A.setSelectionCells(ea),A.scrollCellToVisible(A.getSelectionCell()))},I=A.getFreeInsertPoint(),M=I.x,K=I.y,I=K,T=null,P="auto",k=null,S=[],aa=null,Z=null,N=0;N<c.length&&"#"==c[N].charAt(0);){a=c[N];for(N++;N<
|
||||
c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[N].substring(1)),N++;if("#"!=a.charAt(1)){var Y=a.indexOf(":");if(0<Y){var Q=mxUtils.trim(a.substring(1,Y)),L=mxUtils.trim(a.substring(Y+1));"label"==Q?T=A.sanitizeHtml(L):"style"==Q?f=L:"parentstyle"==Q?g=L:"identity"==Q&&0<L.length&&"-"!=L?h=L:"parent"==Q&&0<L.length&&"-"!=L?k=L:"namespace"==Q&&0<L.length&&"-"!=L?l=L:"width"==Q?n=L:"height"==Q?p=L:"left"==Q&&0<L.length?B=L:"top"==Q&&0<L.length?
|
||||
x=L:"ignore"==Q?Z=L.split(","):"connect"==Q?S.push(JSON.parse(L)):"link"==Q?aa=L:"padding"==Q?H=parseFloat(L):"edgespacing"==Q?G=parseFloat(L):"nodespacing"==Q?C=parseFloat(L):"levelspacing"==Q?F=parseFloat(L):"layout"==Q&&(P=L)}}}var U=this.editor.csvToArray(c[N]),Q=Y=null;if(null!=h||null!=k)for(var R=0;R<U.length;R++)h==U[R]&&(Y=R),k==U[R]&&(Q=R);null==T&&(T="%"+U[0]+"%");if(null!=S)for(var O=0;O<S.length;O++)null==e[S[O].to]&&(e[S[O].to]={});A.model.beginUpdate();try{for(R=N+1;R<c.length;R++){var V=
|
||||
this.editor.csvToArray(c[R]);if(V.length==U.length){var J=null,X=null!=Y?l+V[Y]:null;null!=X&&(J=A.model.getCell(X));null==J&&(J=new mxCell(T,new mxGeometry(M,I,0,0),f||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=X);for(var W=0;W<V.length;W++)A.setAttributeForCell(J,U[W],V[W]);A.setAttributeForCell(J,"placeholders","1");J.style=A.replacePlaceholders(J,J.style);for(O=0;O<S.length;O++)e[S[O].to][J.getAttribute(S[O].to)]=J;null!=aa&&"link"!=aa&&(A.setLinkForCell(J,J.getAttribute(aa)),A.setAttributeForCell(J,
|
||||
aa,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var da=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=B&&null!=J.getAttribute(B)&&(J.geometry.x=M+parseFloat(J.getAttribute(B))),null!=x&&null!=J.getAttribute(x)&&(J.geometry.y=K+parseFloat(J.getAttribute(x))),"@"==n.charAt(0)&&null!=J.getAttribute(n.substring(1))?J.geometry.width=parseFloat(J.getAttribute(n.substring(1))):J.geometry.width="auto"==n?da.width+H:parseFloat(n),"@"==p.charAt(0)&&null!=J.getAttribute(p.substring(1))?
|
||||
J.geometry.height=parseFloat(J.getAttribute(p.substring(1))):J.geometry.height="auto"==p?da.height+H:parseFloat(p),I+=J.geometry.height+C);k=null!=Q?A.model.getCell(l+V[Q]):null;null!=k?(k.style=A.replacePlaceholders(k,g),A.addCell(J,k)):d.push(A.addCell(J))}}for(var ba=d.slice(),ea=d.slice(),O=0;O<S.length;O++)for(var ca=S[O],R=0;R<d.length;R++){var J=d[R],la=J.getAttribute(ca.from);if(null!=la){A.setAttributeForCell(J,ca.from,null);for(var ma=la.split(","),W=0;W<ma.length;W++){var fa=e[ca.to][ma[W]];
|
||||
null!=fa&&(T=ca.label,null!=ca.fromlabel&&(T=(J.getAttribute(ca.fromlabel)||"")+(T||"")),null!=ca.tolabel&&(T=(T||"")+(fa.getAttribute(ca.tolabel)||"")),ea.push(A.insertEdge(null,null,T||"",ca.invert?fa:J,ca.invert?J:fa,ca.style||A.createCurrentEdgeStyle())),mxUtils.remove(ca.invert?J:fa,ba))}}}if(null!=Z)for(R=0;R<d.length;R++)for(J=d[R],W=0;W<Z.length;W++)A.setAttributeForCell(J,mxUtils.trim(Z[W]),null);var ia=new mxParallelEdgeLayout(A);ia.spacing=G;var na=function(){ia.execute(A.getDefaultParent());
|
||||
for(var a=0;a<d.length;a++){var b=A.getCellGeometry(d[a]);b.x=Math.round(A.snap(b.x));b.y=Math.round(A.snap(b.y));"auto"==n&&(b.width=Math.round(A.snap(b.width)));"auto"==p&&(b.height=Math.round(A.snap(b.height)))}};if("circle"==P){var ja=new mxCircleLayout(A);ja.resetEdges=!1;var oa=ja.isVertexIgnored;ja.isVertexIgnored=function(a){return oa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ja.execute(A.getDefaultParent());na()},!0,E);E=null}else if("horizontaltree"==P||
|
||||
"verticaltree"==P||"auto"==P&&ea.length==2*d.length-1&&1==ba.length){A.view.validate();var ka=new mxCompactTreeLayout(A,"horizontaltree"==P);ka.levelDistance=C;ka.edgeRouting=!1;ka.resetEdges=!1;this.executeLayout(function(){ka.execute(A.getDefaultParent(),0<ba.length?ba[0]:null)},!0,E);E=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==ba.length){A.view.validate();var ga=new mxHierarchicalLayout(A,"horizontalflow"==P?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=
|
||||
C;ga.parallelEdgeSpacing=G;ga.interRankCellSpacing=F;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(A.getDefaultParent(),ea);A.moveCells(ea,M,K)},!0,E);E=null}else if("organic"==P||"auto"==P&&ea.length>d.length){A.view.validate();var ha=new mxFastOrganicLayout(A);ha.forceConstant=3*C;ha.resetEdges=!1;var pa=ha.isVertexIgnored;ha.isVertexIgnored=function(a){return pa.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ia=new mxParallelEdgeLayout(A);ia.spacing=G;this.executeLayout(function(){ha.execute(A.getDefaultParent());
|
||||
na()},!0,E);E=null}this.hideDialog()}finally{A.model.endUpdate()}null!=E&&E()}}catch(qa){this.handleError(qa)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;
|
||||
if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=
|
||||
l.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
|
||||
null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-
|
||||
2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
|
||||
this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
|
||||
!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=
|
||||
function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=
|
||||
urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&
|
||||
a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");
|
||||
this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,
|
||||
function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,g=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';
|
||||
break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=g&&(this.offlineStatus.innerHTML=b,g=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,
|
||||
"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
|
||||
function(){p.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&
|
||||
!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
|
||||
c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);
|
||||
this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);n.apply(this,
|
||||
arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,g,h){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,g,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),k=d.getGraphBounds(),l=Math.floor(k.width*g/d.view.scale),m=Math.floor(k.height*g/d.view.scale);
|
||||
f.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+m+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&c.constructor==mxChildChange&&null!=
|
||||
c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var e=b.changes.length-1;0<=e;e--){var g=b.changes[e];if(g.constructor==mxChildChange&&null!=g.child&&g.child.id==c){a.contains(g.previous)&&(d=g.child);
|
||||
break}}return d}})();EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
|
||||
640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var e={},f=null,g=null,h=null,k=null,l="",n="auto",p="auto",B=null,x=null,G=40,C=40,F=100,H=0,A=this.editor.graph;A.getGraphBounds();for(var E=function(){null!=b?b(ea):(A.setSelectionCells(ea),A.scrollCellToVisible(A.getSelectionCell()))},I=A.getFreeInsertPoint(),M=I.x,K=I.y,I=K,T=null,Q="auto",k=null,S=[],Z=null,Y=null,N=0;N<c.length&&"#"==c[N].charAt(0);){a=c[N];for(N++;N<
|
||||
c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[N].substring(1)),N++;if("#"!=a.charAt(1)){var X=a.indexOf(":");if(0<X){var R=mxUtils.trim(a.substring(1,X)),L=mxUtils.trim(a.substring(X+1));"label"==R?T=A.sanitizeHtml(L):"style"==R?f=L:"parentstyle"==R?g=L:"identity"==R&&0<L.length&&"-"!=L?h=L:"parent"==R&&0<L.length&&"-"!=L?k=L:"namespace"==R&&0<L.length&&"-"!=L?l=L:"width"==R?n=L:"height"==R?p=L:"left"==R&&0<L.length?B=L:"top"==R&&0<L.length?
|
||||
x=L:"ignore"==R?Y=L.split(","):"connect"==R?S.push(JSON.parse(L)):"link"==R?Z=L:"padding"==R?H=parseFloat(L):"edgespacing"==R?G=parseFloat(L):"nodespacing"==R?C=parseFloat(L):"levelspacing"==R?F=parseFloat(L):"layout"==R&&(Q=L)}}}var U=this.editor.csvToArray(c[N]),R=X=null;if(null!=h||null!=k)for(var O=0;O<U.length;O++)h==U[O]&&(X=O),k==U[O]&&(R=O);null==T&&(T="%"+U[0]+"%");if(null!=S)for(var P=0;P<S.length;P++)null==e[S[P].to]&&(e[S[P].to]={});A.model.beginUpdate();try{for(O=N+1;O<c.length;O++){var V=
|
||||
this.editor.csvToArray(c[O]);if(null==V){var ba=40<c[O].length?c[O].substring(0,40)+"...":c[O];throw Error(O+" ("+ba+") "+mxResources.get("containsValidationErrors"));}if(V.length==U.length){var J=null,ca=null!=X?l+V[X]:null;null!=ca&&(J=A.model.getCell(ca));null==J&&(J=new mxCell(T,new mxGeometry(M,I,0,0),f||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=ca);for(var W=0;W<V.length;W++)A.setAttributeForCell(J,U[W],V[W]);A.setAttributeForCell(J,"placeholders","1");J.style=A.replacePlaceholders(J,J.style);
|
||||
for(P=0;P<S.length;P++)e[S[P].to][J.getAttribute(S[P].to)]=J;null!=Z&&"link"!=Z&&(A.setLinkForCell(J,J.getAttribute(Z)),A.setAttributeForCell(J,Z,null));A.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var da=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=B&&null!=J.getAttribute(B)&&(J.geometry.x=M+parseFloat(J.getAttribute(B))),null!=x&&null!=J.getAttribute(x)&&(J.geometry.y=K+parseFloat(J.getAttribute(x))),"@"==n.charAt(0)&&null!=J.getAttribute(n.substring(1))?J.geometry.width=
|
||||
parseFloat(J.getAttribute(n.substring(1))):J.geometry.width="auto"==n?da.width+H:parseFloat(n),"@"==p.charAt(0)&&null!=J.getAttribute(p.substring(1))?J.geometry.height=parseFloat(J.getAttribute(p.substring(1))):J.geometry.height="auto"==p?da.height+H:parseFloat(p),I+=J.geometry.height+C);k=null!=R?A.model.getCell(l+V[R]):null;null!=k?(k.style=A.replacePlaceholders(k,g),A.addCell(J,k)):d.push(A.addCell(J))}}for(var fa=d.slice(),ea=d.slice(),P=0;P<S.length;P++)for(var aa=S[P],O=0;O<d.length;O++){var J=
|
||||
d[O],na=J.getAttribute(aa.from);if(null!=na){A.setAttributeForCell(J,aa.from,null);for(var ma=na.split(","),W=0;W<ma.length;W++){var ga=e[aa.to][ma[W]];null!=ga&&(T=aa.label,null!=aa.fromlabel&&(T=(J.getAttribute(aa.fromlabel)||"")+(T||"")),null!=aa.tolabel&&(T=(T||"")+(ga.getAttribute(aa.tolabel)||"")),ea.push(A.insertEdge(null,null,T||"",aa.invert?ga:J,aa.invert?J:ga,aa.style||A.createCurrentEdgeStyle())),mxUtils.remove(aa.invert?J:ga,fa))}}}if(null!=Y)for(O=0;O<d.length;O++)for(J=d[O],W=0;W<Y.length;W++)A.setAttributeForCell(J,
|
||||
mxUtils.trim(Y[W]),null);var ja=new mxParallelEdgeLayout(A);ja.spacing=G;var oa=function(){ja.execute(A.getDefaultParent());for(var a=0;a<d.length;a++){var b=A.getCellGeometry(d[a]);b.x=Math.round(A.snap(b.x));b.y=Math.round(A.snap(b.y));"auto"==n&&(b.width=Math.round(A.snap(b.width)));"auto"==p&&(b.height=Math.round(A.snap(b.height)))}};if("circle"==Q){var ka=new mxCircleLayout(A);ka.resetEdges=!1;var pa=ka.isVertexIgnored;ka.isVertexIgnored=function(a){return pa.apply(this,arguments)||0>mxUtils.indexOf(d,
|
||||
a)};this.executeLayout(function(){ka.execute(A.getDefaultParent());oa()},!0,E);E=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ea.length==2*d.length-1&&1==fa.length){A.view.validate();var la=new mxCompactTreeLayout(A,"horizontaltree"==Q);la.levelDistance=C;la.edgeRouting=!1;la.resetEdges=!1;this.executeLayout(function(){la.execute(A.getDefaultParent(),0<fa.length?fa[0]:null)},!0,E);E=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==fa.length){A.view.validate();
|
||||
var ha=new mxHierarchicalLayout(A,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ha.intraCellSpacing=C;ha.parallelEdgeSpacing=G;ha.interRankCellSpacing=F;ha.disableEdgeStyle=!1;this.executeLayout(function(){ha.execute(A.getDefaultParent(),ea);A.moveCells(ea,M,K)},!0,E);E=null}else if("organic"==Q||"auto"==Q&&ea.length>d.length){A.view.validate();var ia=new mxFastOrganicLayout(A);ia.forceConstant=3*C;ia.resetEdges=!1;var qa=ia.isVertexIgnored;ia.isVertexIgnored=function(a){return qa.apply(this,
|
||||
arguments)||0>mxUtils.indexOf(d,a)};ja=new mxParallelEdgeLayout(A);ja.spacing=G;this.executeLayout(function(){ia.execute(A.getDefaultParent());oa()},!0,E);E=null}this.hideDialog()}finally{A.model.endUpdate()}null!=E&&E()}}catch(ra){this.handleError(ra)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=
|
||||
window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,
|
||||
!0);this.showDialog(a.container,480,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=l.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-
|
||||
2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=
|
||||
this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+
|
||||
a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&
|
||||
null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||
|
||||
c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);
|
||||
this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);
|
||||
this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=
|
||||
applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);
|
||||
mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,g=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b="min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+
|
||||
IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+IMAGE_PATH+'/clear.gif"/>'}a!=g&&(this.offlineStatus.innerHTML=b,g=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",
|
||||
b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;
|
||||
EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);
|
||||
this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));
|
||||
this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);
|
||||
this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.editUpdateListener&&(this.editor.undoManager.removeListener(this.editUpdateListener),this.editUpdateListener=null);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
|
||||
this.exportDialog=null);n.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,g,h){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,g,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),k=d.getGraphBounds(),l=Math.floor(k.width*g/d.view.scale),
|
||||
m=Math.floor(k.height*g/d.view.scale);f.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+m+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.updateEditReferences=function(a){for(var b=0;b<a.changes.length;b++){var c=a.changes[b];if(null!=c&&
|
||||
c.constructor==mxChildChange&&null!=c.child){var d=c.child;if(null!=d.source&&null!=d.source.id){var e=this.getFutureCellForEdit(c.model,a,d.source.id);e!=d.source&&(d.source=e)}null!=d.target&&null!=d.target.id&&(c=this.getFutureCellForEdit(c.model,a,d.target.id),c!=d.target&&(d.target=c))}}};EditorUi.prototype.getFutureCellForEdit=function(a,b,c){var d=a.getCell(c);if(null==d)for(var e=b.changes.length-1;0<=e;e--){var g=b.changes[e];if(g.constructor==mxChildChange&&null!=g.child&&g.child.id==c){a.contains(g.previous)&&
|
||||
(d=g.child);break}}return d}})();EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
|
||||
EditorUi.prototype.patchPages=function(a,c,b,e,g){var h={},l=[],p={},n={},d={},f={};if(null!=e&&null!=e[EditorUi.DIFF_UPDATE])for(var m in e[EditorUi.DIFF_UPDATE])h[m]=e[EditorUi.DIFF_UPDATE][m];if(null!=c[EditorUi.DIFF_REMOVE])for(e=0;e<c[EditorUi.DIFF_REMOVE].length;e++)n[c[EditorUi.DIFF_REMOVE][e]]=!0;if(null!=c[EditorUi.DIFF_INSERT])for(e=0;e<c[EditorUi.DIFF_INSERT].length;e++)p[c[EditorUi.DIFF_INSERT][e].previous]=c[EditorUi.DIFF_INSERT][e];if(null!=c[EditorUi.DIFF_UPDATE])for(m in c[EditorUi.DIFF_UPDATE])e=
|
||||
c[EditorUi.DIFF_UPDATE][m],null!=e.previous&&(f[e.previous]=m);if(null!=a){var q="";for(e=0;e<a.length;e++){var t=a[e].getId();d[t]=a[e];null!=f[q]||n[t]||null!=c[EditorUi.DIFF_UPDATE]&&null!=c[EditorUi.DIFF_UPDATE][t]&&null!=c[EditorUi.DIFF_UPDATE][t].previous||(f[q]=t);q=t}}var u={},w=mxUtils.bind(this,function(a){var e=null!=a?a.getId():"";if(null!=a&&!u[e]){u[e]=!0;l.push(a);var k=null!=c[EditorUi.DIFF_UPDATE]?c[EditorUi.DIFF_UPDATE][e]:null;null!=k&&(this.updatePageRoot(a),null!=k.name&&a.setName(k.name),
|
||||
null!=k.view&&this.patchViewState(a,k.view),null!=k.cells&&this.patchPage(a,k.cells,h[a.getId()],g),!b||null==k.cells&&null==k.view||(a.needsUpdate=!0))}a=f[e];null!=a&&(delete f[e],w(d[a]));a=p[e];null!=a&&(delete p[e],y(a))}),y=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var c=d[a.getId()];null==c?w(a):(c.root=a.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):b&&(c.needsUpdate=!0))});w();for(m in f)w(d[f[m]]),
|
||||
|
@ -8253,7 +8254,7 @@ b&&b();else if(null==g||!g()){var d=null,m=[],q=[];if(200<=c.getStatus()&&299>=c
|
|||
DrawioFileSync.prototype.reload=function(a,c,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=c&&c(a)}),b)};
|
||||
DrawioFileSync.prototype.merge=function(a,c,b,e,g,h){try{this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.checkShadow(this.file.shadowPages);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;if(!this.file.ignorePatches(a)){this.file.stats.merged++;for(var l=0;l<a.length;l++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
|
||||
a[l]);var l={},p=null!=c?this.ui.getHashValueForPages(this.file.shadowPages,l):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentEtag(),"to",b,"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"details",h,l,"patches",a,"checksum",c==p,c);if(null!=c&&c!=p){var n=this.ui.hashValue(this.file.getCurrentEtag()),d=this.ui.hashValue(b);this.file.checksumError(g,a,"Checksum: "+c+"\nFrom: "+n+"\nTo: "+d+(null!=h&&0<h.length?"\nDetails: "+h.join(", "):"")+
|
||||
"\nCurrent: "+p+(null!=l?"\nCurrent Details: "+JSON.stringify(l):""));return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrentEtag(b);this.file.backupPatch=null;this.file.checkPages();null!=e&&e()}catch(f){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=g&&g(f);try{this.file.sendErrorReport("Error in merge",null,f)}catch(m){}}};
|
||||
"\nCurrent: "+p+(null!=l?"\nCurrent Details: "+JSON.stringify(l):""),b);return}this.file.patch(a,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.setCurrentEtag(b);this.file.backupPatch=null;this.file.checkPages();null!=e&&e()}catch(f){this.file.inConflictState=!0;this.file.invalidChecksum=!0;null!=g&&g(f);try{this.file.sendErrorReport("Error in merge",null,f)}catch(m){}}};
|
||||
DrawioFileSync.prototype.descriptorChanged=function(a){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var c=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),b=this.file.getCurrentEtag(),e=this.objectToString({});mxUtils.post(this.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(a)+"&to="+encodeURIComponent(b)+"&msg="+encodeURIComponent(c)+"&data="+encodeURIComponent(e));this.file.stats.bytesSent+=e.length;this.file.stats.msgSent++}this.updateStatus()};
|
||||
DrawioFileSync.prototype.objectToString=function(a){a=this.ui.editor.graph.compress(JSON.stringify(a));null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.encrypt(a,this.key).toString());return a};DrawioFileSync.prototype.stringToObject=function(a){null!=this.key&&"undefined"!==typeof CryptoJS&&(a=CryptoJS.AES.decrypt(a,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(this.ui.editor.graph.decompress(a))};
|
||||
DrawioFileSync.prototype.fileSaved=function(a,c,b,e){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline()&&!this.file.inConflictState&&!this.redirectDialogShowing&&(this.start(),null!=this.channelId)){var g=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),h={v:EditorUi.VERSION,t:(new Date).toISOString(),ua:navigator.userAgent};e=this.ui.getHashValueForPages(a,
|
||||
|
@ -8448,8 +8449,8 @@ window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.
|
|||
mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,
|
||||
function(b,c,d,e,f,g,h,l,m,n){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/100,c,d,e,f,g,h,!l,m,n)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(d);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),
|
||||
!1,e.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+
|
||||
"...",function(){a.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,k,f,g,h,l,m){a.createHtml(b,
|
||||
c,d,e,k,f,g,h,l,m,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(g),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,
|
||||
"...",function(){a.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,k,g,h,l,m){a.createHtml(b,
|
||||
c,d,e,f,k,g,h,l,m,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(g),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,
|
||||
mxResources.get("formatPdf"))).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=null==a.pages||1>=a.pages.length,c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatPdf"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(d);var d=function(){g!=this&&this.checked?l.removeAttribute("disabled"):(l.setAttribute("disabled","disabled"),l.checked=!1)},f=146;
|
||||
if(a.pdfPageExport&&!b){var g=a.addRadiobox(c,"pages",mxResources.get("allPages"),!0),f=a.addRadiobox(c,"pages",mxResources.get("currentPage",null,"Current Page"),!1),h=a.addRadiobox(c,"pages",mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),l=a.addCheckbox(c,mxResources.get("crop"),!1,!0);mxEvent.addListener(g,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(h,"change",d);f=205}else h=a.addCheckbox(c,mxResources.get("selectionOnly"),!1,e.isSelectionEmpty()),l=a.addCheckbox(c,
|
||||
mxResources.get("crop"),!e.pageVisible||!a.pdfPageExport,!a.pdfPageExport),a.pdfPageExport||mxEvent.addListener(h,"change",d);c=new CustomDialog(a,c,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!h.checked,b?!0:!g.checked,!l.checked)}),null,mxResources.get("export"));a.showDialog(c.container,300,f,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){function b(){a.fileLoaded(null)}var c=a.getCurrentFile();null!=c&&c.isModified()?a.confirm(mxResources.get("allChangesLost"),
|
||||
|
|
|
@ -387,7 +387,7 @@ DrawioFile.prototype.compressReportData = function(data, limit, max)
|
|||
/**
|
||||
* Adds the listener for automatically saving the diagram for local changes.
|
||||
*/
|
||||
DrawioFile.prototype.checksumError = function(error, patches, details)
|
||||
DrawioFile.prototype.checksumError = function(error, patches, details, etag)
|
||||
{
|
||||
this.stats.checksumErrors++;
|
||||
this.inConflictState = true;
|
||||
|
@ -413,18 +413,46 @@ DrawioFile.prototype.checksumError = function(error, patches, details)
|
|||
this.ui.anonymizePatch(patches[i]);
|
||||
}
|
||||
}
|
||||
|
||||
var data = this.compressReportData(
|
||||
this.getAnonymizedXmlForPages(
|
||||
this.shadowPages), 20000);
|
||||
var json = this.compressReportData(
|
||||
JSON.stringify(patches, null, 2));
|
||||
|
||||
this.sendErrorReport(
|
||||
'Checksum Error',
|
||||
((details != null) ? (details) : '') +
|
||||
'\n\nPatches:\n' + json +
|
||||
'\n\nData:\n' + data);
|
||||
var fn = mxUtils.bind(this, function(file)
|
||||
{
|
||||
var data = this.compressReportData(
|
||||
this.getAnonymizedXmlForPages(
|
||||
this.shadowPages), 25000);
|
||||
var json = this.compressReportData(
|
||||
JSON.stringify(patches, null, 2));
|
||||
var remote = (file != null) ? this.compressReportData(
|
||||
this.getAnonymizedXmlForPages(
|
||||
this.ui.getPagesForNode(
|
||||
mxUtils.parseXml(file.data).documentElement)), 25000) : 'n/a';
|
||||
|
||||
this.sendErrorReport(
|
||||
'Checksum Error',
|
||||
((details != null) ? (details) : '') +
|
||||
'\n\nPatches:\n' + json +
|
||||
'\n\nLocal:\n' + data +
|
||||
((remote != null) ? ('\nRemote:\n' + remote) : ''),
|
||||
null, 70000);
|
||||
});
|
||||
|
||||
if (etag == null)
|
||||
{
|
||||
fn(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.getLatestVersion(mxUtils.bind(this, function(file)
|
||||
{
|
||||
if (file != null && file.getCurrentEtag() == etag)
|
||||
{
|
||||
fn(file);
|
||||
}
|
||||
else
|
||||
{
|
||||
fn(null);
|
||||
}
|
||||
}), function() {});
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
|
@ -435,7 +463,7 @@ DrawioFile.prototype.checksumError = function(error, patches, details)
|
|||
/**
|
||||
* Adds the listener for automatically saving the diagram for local changes.
|
||||
*/
|
||||
DrawioFile.prototype.sendErrorReport = function(title, details, error)
|
||||
DrawioFile.prototype.sendErrorReport = function(title, details, error, max)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -470,7 +498,7 @@ DrawioFile.prototype.sendErrorReport = function(title, details, error)
|
|||
'\nSync=' + DrawioFile.SYNC +
|
||||
'\n\nStats:\n' + JSON.stringify(this.stats, null, 2) +
|
||||
((details != null) ? ('\n\n' + details) : '') +
|
||||
'\n\nStack:\n' + stack);
|
||||
'\n\nStack:\n' + stack, max);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
|
|
|
@ -897,7 +897,7 @@ DrawioFileSync.prototype.merge = function(patches, checksum, etag, success, erro
|
|||
details.join(', ')) : '') +
|
||||
'\nCurrent: ' + current +
|
||||
((currentDetails != null) ? ('\nCurrent Details: ' +
|
||||
JSON.stringify(currentDetails)) : ''));
|
||||
JSON.stringify(currentDetails)) : ''), etag);
|
||||
|
||||
// Abnormal termination
|
||||
return;
|
||||
|
|
|
@ -10810,7 +10810,13 @@
|
|||
{
|
||||
var values = this.editor.csvToArray(lines[i]);
|
||||
|
||||
if (values.length == keys.length)
|
||||
if (values == null)
|
||||
{
|
||||
var short = (lines[i].length > 40) ? lines[i].substring(0, 40) + '...' : lines[i];
|
||||
|
||||
throw new Error(i + ' (' + short + ') ' + mxResources.get('containsValidationErrors'));
|
||||
}
|
||||
else if (values.length == keys.length)
|
||||
{
|
||||
var cell = null;
|
||||
var id = (identityIndex != null) ? namespace + values[identityIndex] : null;
|
||||
|
|
4
src/main/webapp/js/embed-static.min.js
vendored
4
src/main/webapp/js/embed-static.min.js
vendored
|
@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
|
|||
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
|
||||
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
|
||||
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
|
||||
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.28",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
|
||||
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.29",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
|
||||
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
|
||||
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
|
||||
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
|
||||
|
@ -1070,7 +1070,7 @@ mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a)
|
|||
0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
|
||||
mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
|
||||
mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
|
||||
mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
|
||||
mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}if(c.getParent(e)==c.getRoot()||e==this.currentRoot)e=null;return e};
|
||||
mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,h=f.y,k=c,l=h,m=1;m<b.length;m++){var n=b[m];null!=n&&(e=f.x-n.x,f=f.y-n.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=n,c=Math.min(f.x,c),h=Math.min(f.y,h),k=Math.max(f.x,k),l=Math.max(f.y,l))}a.length=d;a.segments=g;a.x=c;a.y=h;a.width=Math.max(1,k-c);a.height=
|
||||
Math.max(1,l-h)}};
|
||||
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(l=b.offset,null!=l&&(c+=l.x,d+=l.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],h=0,k=1;f>=Math.round(h+g)&&k<e-1;)h+=g,g=a.segments[k++];e=0==g?0:(f-h)/g;f=a.absolutePoints[k-1];k=a.absolutePoints[k];if(null!=f&&null!=k){h=c=d=0;if(null!=b){var d=b.y,l=b.offset;null!=l&&(c=l.x,h=l.y)}l=k.x-f.x;k=k.y-f.y;c=
|
||||
|
|
4
src/main/webapp/js/reader.min.js
vendored
4
src/main/webapp/js/reader.min.js
vendored
|
@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
|
|||
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
|
||||
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
|
||||
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
|
||||
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.28",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
|
||||
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"10.0.29",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
|
||||
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
|
||||
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
|
||||
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
|
||||
|
@ -1070,7 +1070,7 @@ mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a)
|
|||
0)||g),b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y));e=f(d,a,e,c);null!=e&&(b&&(e.x=2*d.getCenterX()-e.x),g&&(e.y=2*d.getCenterY()-e.y))}null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
|
||||
mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
|
||||
mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;null!=a&&2<=a.length&&(d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)]);null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
|
||||
mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
|
||||
mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.isCellCollapsed(d))e=d;d=c.getParent(d)}if(c.getParent(e)==c.getRoot()||e==this.currentRoot)e=null;return e};
|
||||
mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,h=f.y,k=c,l=h,m=1;m<b.length;m++){var n=b[m];null!=n&&(e=f.x-n.x,f=f.y-n.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=n,c=Math.min(f.x,c),h=Math.min(f.y,h),k=Math.max(f.x,k),l=Math.max(f.y,l))}a.length=d;a.segments=g;a.x=c;a.y=h;a.width=Math.max(1,k-c);a.height=
|
||||
Math.max(1,l-h)}};
|
||||
mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null==a.segments||null!=b&&!b.relative)null!=b&&(l=b.offset,null!=l&&(c+=l.x,d+=l.y));else{for(var e=a.absolutePoints.length,f=Math.round(((null!=b?b.x/2:0)+.5)*a.length),g=a.segments[0],h=0,k=1;f>=Math.round(h+g)&&k<e-1;)h+=g,g=a.segments[k++];e=0==g?0:(f-h)/g;f=a.absolutePoints[k-1];k=a.absolutePoints[k];if(null!=f&&null!=k){h=c=d=0;if(null!=b){var d=b.y,l=b.offset;null!=l&&(c=l.x,h=l.y)}l=k.x-f.x;k=k.y-f.y;c=
|
||||
|
|
665
src/main/webapp/js/viewer.min.js
vendored
665
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