10.2.0 release
This commit is contained in:
parent
6962b14508
commit
418435d9ed
10 changed files with 485 additions and 438 deletions
|
@ -1,3 +1,7 @@
|
|||
08-FEB-2019: 10.2.0
|
||||
|
||||
- Adds vsd(x) and gliffy support in GDrive Connector
|
||||
|
||||
07-FEB-2019: 10.1.9
|
||||
|
||||
- Renames load event for configuration to configure
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
10.1.9
|
||||
10.2.0
|
|
@ -1,7 +1,7 @@
|
|||
CACHE MANIFEST
|
||||
|
||||
# THIS FILE WAS GENERATED. DO NOT MODIFY!
|
||||
# 02/07/2019 01:06 PM
|
||||
# 02/08/2019 05:51 PM
|
||||
|
||||
app.html
|
||||
index.html?offline=1
|
||||
|
|
|
@ -441,10 +441,25 @@
|
|||
//Parameters to and all pages should not be sent with formats other than PDF with page view enabled
|
||||
if (!data.allPages)
|
||||
{
|
||||
from = Math.max(0, Math.min(parseInt(data.from) || from, diagrams.length - 1));
|
||||
to = parseInt(data.to);
|
||||
//If to is not defined, use from (so one page), otherwise, to is restricted to the range from "from" to diagrams.length - 1
|
||||
to = isNaN(to)? from : Math.max(from, Math.min(to, diagrams.length - 1));
|
||||
if (data.pageId != null)
|
||||
{
|
||||
for (var i = 0; i < diagrams.length; i++)
|
||||
{
|
||||
if (data.pageId == diagrams[i].getAttribute('id'))
|
||||
{
|
||||
from = i;
|
||||
to = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from = Math.max(0, Math.min(parseInt(data.from) || from, diagrams.length - 1));
|
||||
to = parseInt(data.to);
|
||||
//If to is not defined, use from (so one page), otherwise, to is restricted to the range from "from" to diagrams.length - 1
|
||||
to = isNaN(to)? from : Math.max(from, Math.min(to, diagrams.length - 1));
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = from; i <= to; i++)
|
||||
|
|
6
src/main/webapp/js/app.min.js
vendored
6
src/main/webapp/js/app.min.js
vendored
|
@ -7926,9 +7926,9 @@ this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(
|
|||
var ErrorDialog=function(a,c,b,d,g,e,k,m,n,q,f){n=null!=n?n:!0;var l=document.createElement("div");l.style.textAlign="center";if(null!=c){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="16px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,c);p.setAttribute("title",c);l.appendChild(p)}c=
|
||||
document.createElement("div");c.style.padding="6px";c.innerHTML=b;l.appendChild(c);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";null!=e&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=q&&(q=mxUtils.button(q,function(){null!=f&&f()}),q.className="geBtn",b.appendChild(q));var v=mxUtils.button(d,function(){n&&a.hideDialog();null!=g&&g()});v.className="geBtn";b.appendChild(v);
|
||||
null!=k&&(d=mxUtils.button(k,function(){n&&a.hideDialog();null!=m&&m()}),d.className="geBtn gePrimaryBtn",b.appendChild(d));this.init=function(){v.focus()};l.appendChild(b);this.container=l};
|
||||
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.1.9";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=
|
||||
EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",l=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=l+"/log?severity="+f+"&v="+encodeURIComponent("10.1.8")+"&msg=clientError:"+encodeURIComponent(a)+
|
||||
":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+encodeURIComponent(e.stack):"")}}catch(u){}};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)):
|
||||
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.2.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!=
|
||||
EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",l=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=l+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+
|
||||
encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+encodeURIComponent(e.stack):"")}}catch(u){}};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(p){}};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(p){}};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,a)}};EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
|
||||
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
err = (err != null) ? err : new Error(message);
|
||||
|
||||
var img = new Image();
|
||||
img.src = logDomain + '/log?severity=' + severity + '&v=' + encodeURIComponent('10.1.8') +
|
||||
img.src = logDomain + '/log?severity=' + severity + '&v=' + encodeURIComponent(EditorUi.VERSION) +
|
||||
'&msg=clientError:' + encodeURIComponent(message) + ':url:' + encodeURIComponent(window.location.href) +
|
||||
':lnum:' + encodeURIComponent(linenumber) + ((colno != null) ? ':colno:' + encodeURIComponent(colno) : '') +
|
||||
((err != null && err.stack != null) ? '&stack=' + encodeURIComponent(err.stack) : '');
|
||||
|
|
|
@ -96,6 +96,7 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
|
|||
this.initialWidth = (container != null) ? container.style.width : null;
|
||||
this.widthIsEmpty = (this.initialWidth != null) ? this.initialWidth == '' : true;
|
||||
this.currentPage = parseInt(this.graphConfig.page) || 0;
|
||||
this.pageId = this.graphConfig.pageId;
|
||||
this.editor = null;
|
||||
|
||||
if (this.graphConfig['toolbar-position'] == 'inline')
|
||||
|
@ -168,6 +169,19 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
|
|||
|
||||
if (diagrams.length > 0)
|
||||
{
|
||||
//Find the page index if the pageId is provided
|
||||
if (this.pageId != null)
|
||||
{
|
||||
for (var i = 0; i < diagrams.length; i++)
|
||||
{
|
||||
if (this.pageId == diagrams[i].getAttribute('id'))
|
||||
{
|
||||
this.currentPage = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var graphGetGlobalVariable = this.graph.getGlobalVariable;
|
||||
var self = this;
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ var com;
|
|||
//console.log(xmlBuilder.str);
|
||||
if (callback)
|
||||
{
|
||||
callback(xmlBuilder.str);
|
||||
callback(xmlBuilder.str);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1261,7 +1261,7 @@ var com;
|
|||
_this.RESPONSE_HEADER = "";
|
||||
return _this;
|
||||
}
|
||||
mxVssxCodec.prototype.decodeVssx = function (file, callback, charset) {
|
||||
mxVssxCodec.prototype.decodeVssx = function (file, callback, charset, onerror) {
|
||||
var _this = this;
|
||||
var library = { str: "<mxlibrary>[", toString: function () { return this.str; } };
|
||||
this.decodeVsdx(file, function(shapesInPages)
|
||||
|
@ -1366,7 +1366,21 @@ var com;
|
|||
/* append */ (function (sb) { return sb.str = sb.str.concat("]</mxlibrary>"); })(library);
|
||||
if (callback)
|
||||
{
|
||||
callback(library.str);
|
||||
try
|
||||
{
|
||||
callback(library.str);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
if (onerror != null)
|
||||
{
|
||||
onerror(e);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}, charset);
|
||||
};
|
||||
|
@ -11900,7 +11914,7 @@ EditorUi.prototype.doImportVisio = function(file, done, onerror)
|
|||
{
|
||||
if (file.name != null && /(\.vs(x|sx?))($|\?)/i.test(file.name))
|
||||
{
|
||||
new com.mxgraph.io.mxVssxCodec().decodeVssx(file, done);
|
||||
new com.mxgraph.io.mxVssxCodec().decodeVssx(file, done, null, onerror);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
742
src/main/webapp/js/extensions.min.js
vendored
742
src/main/webapp/js/extensions.min.js
vendored
File diff suppressed because one or more lines are too long
106
src/main/webapp/js/viewer.min.js
vendored
106
src/main/webapp/js/viewer.min.js
vendored
|
@ -2068,12 +2068,12 @@ c.panningHandler.isForcePanningEvent=function(a){return r.apply(this,arguments)|
|
|||
mxClient.IS_SF&&mxEvent.isShiftDown(a))};var z=!1,d=null,f=null,l=null,p=mxUtils.bind(this,function(){if(null!=this.toolbar&&z!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==l)this.toolbar.createTextToolbar();else{for(var g=0;g<l.length;g++)this.toolbar.container.appendChild(l[g]);this.toolbar.fontMenu=
|
||||
d;this.toolbar.sizeMenu=f}z=c.cellEditor.isContentEditing();d=a;f=e;l=b}}),g=this,n=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){n.apply(this,arguments);p();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=g.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-
|
||||
1)&&(b=b.substring(0,b.length-1));g.toolbar.setFontName(b);g.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var A=c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){A.apply(this,arguments);p()};c.container.setAttribute("tabindex","0");c.container.style.cursor=
|
||||
"default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(S){}var y=c.fireMouseEvent;c.fireMouseEvent=function(a,d,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();y.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,d,b){this.menus.createPopupMenu(a,d,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=
|
||||
"default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(R){}var y=c.fireMouseEvent;c.fireMouseEvent=function(a,d,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();y.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,d,b){this.menus.createPopupMenu(a,d,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=
|
||||
this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var d=c.view.getState(a);if(null!=d){a=a.clone();a.style="";a=c.getCellStyle(a);var b=[],f=[],e;for(e in d.style)a[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));e=c.getModel().getStyle(d.cell);for(var g=null!=e?e.split(";"):[],l=0;l<
|
||||
g.length;l++){var n=g[l],p=n.indexOf("=");0<=p&&(e=n.substring(0,p),n=n.substring(p+1),null!=a[e]&&"none"==n&&(b.push(n),f.push(e)))}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",b,"cells",[d.cell]))}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",
|
||||
[],"cells",[]))};var u=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),B=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],u,["opacity"],["align"],["html"]];for(a=0;a<B.length;a++)for(b=0;b<B[a].length;b++)t.push(B[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(t,
|
||||
x[a])&&t.push(x[a]);var U=function(a,d){var b=c.getModel();b.beginUpdate();try{if(d)for(var f=b.isEdge(n),e=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],g=0;g<f.length;g++){var l=e[f[g]];null!=l&&c.setCellStyles(f[g],l,a)}else for(l=0;l<a.length;l++){for(var n=a[l],p=b.getStyle(n),u=null!=p?p.split(";"):[],J=t.slice(),g=0;g<u.length;g++){var k=u[g],A=k.indexOf("=");if(0<=A){var D=k.substring(0,A),y=mxUtils.indexOf(J,D);0<=y&&J.splice(y,1);for(var m=0;m<B.length;m++){var r=
|
||||
B[m];if(0<=mxUtils.indexOf(r,D))for(var q=0;q<r.length;q++){var S=mxUtils.indexOf(J,r[q]);0<=S&&J.splice(S,1)}}}}for(var e=(f=b.isEdge(n))?c.currentEdgeStyle:c.currentVertexStyle,U=b.getStyle(n),g=0;g<J.length;g++){var D=J[g],v=e[D];null==v||"shape"==D&&!f||f&&!(0>mxUtils.indexOf(x,D))||(U=mxUtils.setStyle(U,D,v))}b.setStyle(n,U)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){U(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){U(d.getProperty("cells"),!0)});
|
||||
B[m];if(0<=mxUtils.indexOf(r,D))for(var q=0;q<r.length;q++){var R=mxUtils.indexOf(J,r[q]);0<=R&&J.splice(R,1)}}}}for(var e=(f=b.isEdge(n))?c.currentEdgeStyle:c.currentVertexStyle,U=b.getStyle(n),g=0;g<J.length;g++){var D=J[g],v=e[D];null==v||"shape"==D&&!f||f&&!(0>mxUtils.indexOf(x,D))||(U=mxUtils.setStyle(U,D,v))}b.setStyle(n,U)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){U(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){U(d.getProperty("cells"),!0)});
|
||||
c.connectionHandler.addListener(mxEvent.CONNECT,function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));U(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,e=!1;if(0<b.length)for(var g=0;g<b.length&&(f=c.getModel().isVertex(b[g])||f,!(e=c.getModel().isEdge(b[g])||e)||!f);g++);else e=f=!0;for(var b=d.getProperty("keys"),l=d.getProperty("values"),g=0;g<b.length;g++){var n=0<=mxUtils.indexOf(u,
|
||||
b[g]);if("strokeColor"!=b[g]||null!=l[g]&&"none"!=l[g])if(0<=mxUtils.indexOf(x,b[g]))e||0<=mxUtils.indexOf(D,b[g])?null==l[g]?delete c.currentEdgeStyle[b[g]]:c.currentEdgeStyle[b[g]]=l[g]:f&&0<=mxUtils.indexOf(t,b[g])&&(null==l[g]?delete c.currentVertexStyle[b[g]]:c.currentVertexStyle[b[g]]=l[g]);else if(0<=mxUtils.indexOf(t,b[g])){if(f||n)null==l[g]?delete c.currentVertexStyle[b[g]]:c.currentVertexStyle[b[g]]=l[g];if(e||n||0<=mxUtils.indexOf(D,b[g]))null==l[g]?delete c.currentEdgeStyle[b[g]]:c.currentEdgeStyle[b[g]]=
|
||||
l[g]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(c.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==c.currentEdgeStyle.edgeStyle&&"1"==c.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==c.currentEdgeStyle.edgeStyle||"none"==c.currentEdgeStyle.edgeStyle||null==
|
||||
|
@ -2438,7 +2438,7 @@ mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==m
|
|||
null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return u.apply(this,arguments)};var D=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,
|
||||
new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):D.apply(this,arguments)};var B=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&B.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=
|
||||
function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var U=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){U.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=
|
||||
this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var S=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,d){S.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var N=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){N.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
|
||||
this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var R=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,d){R.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var N=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){N.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",
|
||||
mxResources.get("rotateTooltip"));var d=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
|
||||
this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));d()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);this.updateLinkHint(b,
|
||||
c);if(null!=b||null!=c&&0<c.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,b){if(null==d&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=d||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));
|
||||
|
@ -2454,7 +2454,7 @@ null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.chang
|
|||
a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var T=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){T.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var W=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){W.apply(this,arguments);null!=this.linkHint&&
|
||||
(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxActor.call(this)}function q(){mxCylinder.call(this)}function r(){mxActor.call(this)}function v(){mxActor.call(this)}function z(){mxActor.call(this)}function d(){mxActor.call(this)}function f(){mxActor.call(this)}function l(){mxActor.call(this)}function p(){mxActor.call(this)}function g(a,d){this.canvas=
|
||||
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,g.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,g.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,g.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,g.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
|
||||
this.canvas.curveTo=mxUtils.bind(this,g.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,g.prototype.arcTo)}function n(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function t(){mxActor.call(this)}function x(){mxActor.call(this)}function u(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function B(){mxCylinder.call(this)}function U(){mxShape.call(this)}function S(){mxShape.call(this)}
|
||||
this.canvas.curveTo=mxUtils.bind(this,g.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,g.prototype.arcTo)}function n(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function t(){mxActor.call(this)}function x(){mxActor.call(this)}function u(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function B(){mxCylinder.call(this)}function U(){mxShape.call(this)}function R(){mxShape.call(this)}
|
||||
function N(){mxEllipse.call(this)}function K(){mxShape.call(this)}function F(){mxShape.call(this)}function C(){mxRectangleShape.call(this)}function M(){mxShape.call(this)}function O(){mxShape.call(this)}function V(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxShape.call(this)}function J(){mxCylinder.call(this)}function X(){mxDoubleEllipse.call(this)}function la(){mxDoubleEllipse.call(this)}function fa(){mxArrowConnector.call(this);this.spacing=0}function Y(){mxArrowConnector.call(this);
|
||||
this.spacing=0}function ca(){mxActor.call(this)}function H(){mxRectangleShape.call(this)}function I(){mxActor.call(this)}function aa(){mxActor.call(this)}function L(){mxActor.call(this)}function P(){mxActor.call(this)}function da(){mxActor.call(this)}function Z(){mxActor.call(this)}function G(){mxActor.call(this)}function ja(){mxActor.call(this)}function Q(){mxActor.call(this)}function ha(){mxActor.call(this)}function ka(){mxEllipse.call(this)}function ga(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}
|
||||
function wa(){mxRhombus.call(this)}function ua(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function ma(){mxActor.call(this)}function ra(){mxActor.call(this)}function ia(){mxActor.call(this)}function ea(){mxConnector.call(this)}function sa(a,d,b,c,f,e,g,l,n,p){g+=n;var E=c.clone();c.x-=f*(2*g+n);c.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(E.x-f-g,E.y-e-g,2*g,2*g);p?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,
|
||||
|
@ -2494,8 +2494,8 @@ d,a.y+d,a.width-2*d,a.height-2*d)}return a};mxRhombus.prototype.paintVertexShape
|
|||
this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};D.prototype.paintForeground=function(a,d,b,c,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+
|
||||
e]];if(null!=g){var l=this.style["symbol"+e+"Align"],E=this.style["symbol"+e+"VerticalAlign"],n=this.style["symbol"+e+"Width"],p=this.style["symbol"+e+"Height"],u=this.style["symbol"+e+"Spacing"]||0,x=this.style["symbol"+e+"VSpacing"]||u,t=this.style["symbol"+e+"ArcSpacing"];null!=t&&(t*=this.getArcSize(c+this.strokewidth,f+this.strokewidth),u+=t,x+=t);var t=d,k=b,t=l==mxConstants.ALIGN_CENTER?t+(c-n)/2:l==mxConstants.ALIGN_RIGHT?t+(c-n-u):t+u,k=E==mxConstants.ALIGN_MIDDLE?k+(f-p)/2:E==mxConstants.ALIGN_BOTTOM?
|
||||
k+(f-p-x):k+x;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,t,k,n,p);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(B,mxCylinder);B.prototype.redrawPath=function(a,d,b,c,f,e){e?(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f),a.close())};mxCellRenderer.registerShape("message",B);mxUtils.extend(U,mxShape);
|
||||
U.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",U);mxUtils.extend(S,mxShape);S.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};S.prototype.paintBackground=function(a,
|
||||
d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",S);mxUtils.extend(N,mxEllipse);N.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",N);mxUtils.extend(K,
|
||||
U.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",U);mxUtils.extend(R,mxShape);R.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};R.prototype.paintBackground=function(a,
|
||||
d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",R);mxUtils.extend(N,mxEllipse);N.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",N);mxUtils.extend(K,
|
||||
mxShape);K.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",K);mxUtils.extend(F,mxShape);F.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};F.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,f/8,c,7*f/8);a.fillAndStroke()};
|
||||
F.prototype.paintForeground=function(a,d,b,c,f){a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",F);mxUtils.extend(C,mxRectangleShape);C.prototype.size=40;C.prototype.isHtmlAllowed=function(){return!1};C.prototype.getLabelBounds=function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,d)};C.prototype.paintBackground=function(a,d,b,c,
|
||||
f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,d,b,c,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=C&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,d,b,c,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(d+c/2,b+e),a.lineTo(d+c/2,b+f),a.end(),a.stroke())};C.prototype.paintForeground=function(a,
|
||||
|
@ -2544,14 +2544,14 @@ mxCellRenderer.registerShape("display",ia);mxUtils.extend(ea,mxConnector);ea.pro
|
|||
a.moveTo(c.x-u/2-x/2,c.y-x/2+u/2);a.lineTo(c.x+x/2-3*u/2,c.y-3*x/2-u/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,l,n,p){var u=f*(g+n+1),x=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-u/2-x/2,c.y-x/2+u/2);a.lineTo(c.x+x/2-3*u/2,c.y-3*x/2-u/2);a.moveTo(c.x-u/2+x/2,c.y-x/2-u/2);a.lineTo(c.x-x/2-3*u/2,c.y-3*x/2+u/2);a.stroke()}});mxMarker.addMarker("circle",sa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,l,n,p){var u=c.clone(),x=sa.apply(this,arguments),t=f*(g+
|
||||
2*n),k=e*(g+2*n);return function(){x.apply(this,arguments);a.begin();a.moveTo(u.x-f*n,u.y-e*n);a.lineTo(u.x-2*t+f*n,u.y-2*k+e*n);a.moveTo(u.x-t-k+e*n,u.y-k+t-f*n);a.lineTo(u.x+k-t-e*n,u.y-k-t+f*n);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,l,n,u){d=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var p=c.clone();p.x-=d;p.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-f-e/2,p.y-e+f/2):a.lineTo(p.x+e/2-f,p.y-e-f/2);a.lineTo(p.x-f,p.y-e);a.close();u?
|
||||
a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,l,n,p,u){e*=l+p;g*=l+p;var x=f.clone();return function(){d.begin();d.moveTo(x.x,x.y);n?d.lineTo(x.x-e-g/a,x.y-g+e/a):d.lineTo(x.x+g/a-e,x.y-g-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ga=function(a,d,b){return ya(a,["width"],d,function(d,c,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+c*d/4+f*g/2,e.y+f*d/4-c*g/2)},function(d,c,f,e,g,
|
||||
l){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*d)/a.view.scale-b})},ya=function(a,d,b,c,f){return R(a,d,function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,l=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-l.x,n=f.y-l.y,p=Math.sqrt(e*e+n*n),l=c.call(this,p,e/p,n/p,l,f);return new mxPoint(l.x/g-d.x,l.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,l=g.length-1;d=a.view.translate;var n=a.view.scale,p=b?g[0]:g[l],g=b?g[1]:g[l-1],l=g.x-p.x,
|
||||
u=g.y-p.y,x=Math.sqrt(l*l+u*u);c.x=(c.x+d.x)*n;c.y=(c.y+d.y)*n;f.call(this,x,l/x,u/x,p,g,c,e)})},oa=function(a){return function(d){return[R(d,["arrowWidth","arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",P.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",P.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-b)*d.height/2)},function(d,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,
|
||||
Math.abs(d.y+d.height/2-b.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(d.x+d.width-b.x)/d.width))})]}},Ea=function(a,d,b){return function(c){var f=[R(c,["size"],function(b){var c=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*a;return new mxPoint(b.x+c,b.y+c)},function(d,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,b.x-d.x),Math.min(d.height,b.y-d.y)))/a)})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
|
||||
!1)&&f.push(qa(c));return f}},Aa=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[R(e,["size"],function(d){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(d.x+Math.max(0,Math.min(d.width,c*(b?1:d.width))),d.getCenterY())},function(a,d,c){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?d.x-a.x:Math.max(0,Math.min(b,(d.x-a.x)/a.width));g&&!mxEvent.isAltDown(c.getEvent())&&
|
||||
(a=e.view.graph.snap(a));this.state.style.size=a},null,c)];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(qa(e));return g}},Ha=function(a){return function(d){var b=[R(d,["size"],function(d){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(d.x+b*d.width*.75,d.y+d.height/4)},function(d,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-d.x)/(.75*d.width)))},null,!0)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,
|
||||
!1)&&b.push(qa(d));return b}},za=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(qa(a));return d}},qa=function(a,d){return R(a,[mxConstants.STYLE_ARCSIZE],function(b){var c=null!=d?d:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+c)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,
|
||||
l){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*d)/a.view.scale-b})},ya=function(a,d,b,c,f){return S(a,d,function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,l=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-l.x,n=f.y-l.y,p=Math.sqrt(e*e+n*n),l=c.call(this,p,e/p,n/p,l,f);return new mxPoint(l.x/g-d.x,l.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,l=g.length-1;d=a.view.translate;var n=a.view.scale,p=b?g[0]:g[l],g=b?g[1]:g[l-1],l=g.x-p.x,
|
||||
u=g.y-p.y,x=Math.sqrt(l*l+u*u);c.x=(c.x+d.x)*n;c.y=(c.y+d.y)*n;f.call(this,x,l/x,u/x,p,g,c,e)})},oa=function(a){return function(d){return[S(d,["arrowWidth","arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",P.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",P.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-b)*d.height/2)},function(d,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,
|
||||
Math.abs(d.y+d.height/2-b.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(d.x+d.width-b.x)/d.width))})]}},Ea=function(a,d,b){return function(c){var f=[S(c,["size"],function(b){var c=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*a;return new mxPoint(b.x+c,b.y+c)},function(d,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,b.x-d.x),Math.min(d.height,b.y-d.y)))/a)})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
|
||||
!1)&&f.push(qa(c));return f}},Aa=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[S(e,["size"],function(d){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(d.x+Math.max(0,Math.min(d.width,c*(b?1:d.width))),d.getCenterY())},function(a,d,c){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?d.x-a.x:Math.max(0,Math.min(b,(d.x-a.x)/a.width));g&&!mxEvent.isAltDown(c.getEvent())&&
|
||||
(a=e.view.graph.snap(a));this.state.style.size=a},null,c)];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(qa(e));return g}},Ha=function(a){return function(d){var b=[S(d,["size"],function(d){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(d.x+b*d.width*.75,d.y+d.height/4)},function(d,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-d.x)/(.75*d.width)))},null,!0)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,
|
||||
!1)&&b.push(qa(d));return b}},za=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(qa(a));return d}},qa=function(a,d){return S(a,[mxConstants.STYLE_ARCSIZE],function(b){var c=null!=d?d:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+c)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,
|
||||
mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*f),b.y+c)},function(d,b,c){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-b.x+d.x)/Math.min(d.width,d.height))))})},
|
||||
R=function(a,d,b,c,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<d.length;a++)this.copyStyle(d[a])};g.getPosition=b;g.setPosition=c;g.ignoreGrid=null!=f?f:!0;if(e){var l=g.positionChanged;g.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ba={link:function(a){return[Ga(a,!0,10),Ga(a,!1,10)]},flexArrow:function(a){var d=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,
|
||||
S=function(a,d,b,c,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<d.length;a++)this.copyStyle(d[a])};g.getPosition=b;g.setPosition=c;g.ignoreGrid=null!=f?f:!0;if(e){var l=g.positionChanged;g.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ba={link:function(a){return[Ga(a,!0,10),Ga(a,!1,10)]},flexArrow:function(a){var d=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,
|
||||
mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ya(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,
|
||||
e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=
|
||||
a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ya(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,
|
||||
|
@ -2560,24 +2560,24 @@ d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),M
|
|||
5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);
|
||||
mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ya(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+
|
||||
b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],
|
||||
a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<d&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var d=[R(a,[mxConstants.STYLE_STARTSIZE],function(d){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,
|
||||
a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<d&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var d=[S(a,[mxConstants.STYLE_STARTSIZE],function(d){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,
|
||||
mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(),d.y+Math.max(0,Math.min(d.height,b))):new mxPoint(d.x+Math.max(0,Math.min(d.width,b)),d.getCenterY())},function(d,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,b.y-d.y))):Math.round(Math.max(0,Math.min(d.width,b.x-d.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=
|
||||
parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(qa(a,b/2))}return d},label:za(),ext:za(),rectangle:za(),triangle:za(),rhombus:za(),umlLifeline:function(a){return[R(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))},!1)]},umlFrame:function(a){return[R(a,
|
||||
parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(qa(a,b/2))}return d},label:za(),ext:za(),rectangle:za(),triangle:za(),rhombus:za(),umlLifeline:function(a){return[S(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))},!1)]},umlFrame:function(a){return[S(a,
|
||||
["width","height"],function(a){var d=Math.max(M.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",M.prototype.width))),b=Math.max(1.5*M.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",M.prototype.height)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(M.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*M.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},
|
||||
process:function(a){var d=[R(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(qa(a));return d},cross:function(a){return[R(a,["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
|
||||
"size",ra.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-d.y)/b*2,Math.max(0,a.getCenterX()-d.x)/b*2)))})]},note:function(a){return[R(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(a,d){this.state.style.size=
|
||||
Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-d.x),Math.min(a.height,d.y-a.y))))})]},manualInput:function(a){var d=[R(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ca.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(qa(a));return d},dataStorage:function(a){return[R(a,
|
||||
["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.x+(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[R(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));
|
||||
mxUtils.getValue(this.state.style,"base",y.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style,"base",y.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),R(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",y.prototype.position2)));return new mxPoint(a.x+
|
||||
d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),R(a,["base"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",y.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-
|
||||
d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(qa(a));return d},internalStorage:function(a){var d=[R(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",H.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
|
||||
H.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(qa(a));return d},corner:function(a){return[R(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",I.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
|
||||
I.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},tee:function(a){return[R(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",L.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",L.prototype.dy)));return new mxPoint(a.x+(a.width+d)/2,a.y+b)},function(a,d){this.state.style.dx=
|
||||
Math.round(Math.max(0,2*Math.min(a.width/2,d.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},singleArrow:oa(1),doubleArrow:oa(.5),folder:function(a){return[R(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==
|
||||
mxConstants.ALIGN_RIGHT&&(d=a.width-d);return new mxPoint(a.x+d,a.y+b)},function(a,d){var b=Math.max(0,Math.min(a.width,d.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},document:function(a){return[R(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",z.prototype.size))));
|
||||
return new mxPoint(a.x+3*a.width/4,a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},tape:function(a){return[R(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[R(a,["size"],function(a){var d=
|
||||
process:function(a){var d=[S(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(qa(a));return d},cross:function(a){return[S(a,["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
|
||||
"size",ra.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-d.y)/b*2,Math.max(0,a.getCenterX()-d.x)/b*2)))})]},note:function(a){return[S(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(a,d){this.state.style.size=
|
||||
Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-d.x),Math.min(a.height,d.y-a.y))))})]},manualInput:function(a){var d=[S(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ca.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(qa(a));return d},dataStorage:function(a){return[S(a,
|
||||
["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(a.x+(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[S(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));
|
||||
mxUtils.getValue(this.state.style,"base",y.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style,"base",y.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),S(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",y.prototype.position2)));return new mxPoint(a.x+
|
||||
d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),S(a,["base"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",y.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-
|
||||
d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(qa(a));return d},internalStorage:function(a){var d=[S(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",H.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
|
||||
H.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(qa(a));return d},corner:function(a){return[S(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",I.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",
|
||||
I.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},tee:function(a){return[S(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",L.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",L.prototype.dy)));return new mxPoint(a.x+(a.width+d)/2,a.y+b)},function(a,d){this.state.style.dx=
|
||||
Math.round(Math.max(0,2*Math.min(a.width/2,d.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},singleArrow:oa(1),doubleArrow:oa(.5),folder:function(a){return[S(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==
|
||||
mxConstants.ALIGN_RIGHT&&(d=a.width-d);return new mxPoint(a.x+d,a.y+b)},function(a,d){var b=Math.max(0,Math.min(a.width,d.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},document:function(a){return[S(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",z.prototype.size))));
|
||||
return new mxPoint(a.x+3*a.width/4,a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},tape:function(a){return[S(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[S(a,["size"],function(a){var d=
|
||||
Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ha.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:Aa(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:Aa(x.prototype.size,!0,.5,!0),curlyBracket:Aa(l.prototype.size,!1),display:Aa(ia.prototype.size,!1),cube:Ea(1,a.prototype.size,!1),card:Ea(.5,r.prototype.size,!0),loopLimit:Ea(.5,Q.prototype.size,
|
||||
!0),trapezoid:Ha(.5),parallelogram:Ha(1)};Graph.createHandle=R;Graph.handleFactory=Ba;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ba[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Ba[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};
|
||||
!0),trapezoid:Ha(.5),parallelogram:Ha(1)};Graph.createHandle=S;Graph.handleFactory=Ba;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ba[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Ba[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};
|
||||
mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ba[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ca=new mxPoint(1,0),Da=new mxPoint(1,0),oa=mxUtils.toRadians(-30),Ca=mxUtils.getRotatedPoint(Ca,Math.cos(oa),Math.sin(oa)),oa=mxUtils.toRadians(-150),
|
||||
Da=mxUtils.getRotatedPoint(Da,Math.cos(oa),Math.sin(oa));mxEdgeStyle.IsometricConnector=function(a,d,b,c,f){var e=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=c&&(c=e.transformControlPoint(a,c));null==l&&null!=d&&(l=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=Ca.x,p=Ca.y,u=Da.x,x=Da.y,t="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,d,
|
||||
b){a-=k.x;var c=d-k.y;d=(x*a-u*c)/(n*x-p*u);a=(p*a-n*c)/(p*u-n*x);t?(b&&(k=new mxPoint(k.x+n*d,k.y+p*d),f.push(k)),k=new mxPoint(k.x+u*a,k.y+x*a)):(b&&(k=new mxPoint(k.x+u*a,k.y+x*a),f.push(k)),k=new mxPoint(k.x+n*d,k.y+p*d));f.push(k)};var k=l;null==c&&(c=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Na=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==
|
||||
|
@ -2804,7 +2804,7 @@ stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"
|
|||
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,d,b){if(null!=d){var c=function(a){if(null!=a)if(b)for(var c=0;c<a.length;c++)d[a[c].name]=a[c];else for(var f in d){for(var e=!1,c=0;c<a.length;c++)if(a[c].name==f&&a[c].type==d[f].type){e=!0;break}e||delete d[f]}},f=this.editorUi.editor.graph.view.getState(a);null!=f&&null!=f.shape&&(f.shape.commonCustomPropAdded||(f.shape.commonCustomPropAdded=!0,f.shape.customProperties=
|
||||
f.shape.customProperties||[],f.cell.vertex?Array.prototype.push.apply(f.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),c(f.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(S){}}};var d=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
|
||||
f.shape.customProperties||[],f.cell.vertex?Array.prototype.push.apply(f.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),c(f.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(R){}}};var d=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"!=a.style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
|
||||
d.apply(this,arguments);if(Editor.enableCustomProperties){for(var b={},c=a.vertices,f=a.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],b,0==e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],b,0==c.length&&0==e);0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var d=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,
|
||||
function(a){this.editorUi.actions.get("copyStyle").funct()}));d.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));d.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");
|
||||
d.style.marginBottom="2px";d.style.width="100px";a.appendChild(d);mxUtils.br(a);return f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,d,b){function c(a,d,b,c){k.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<g.length?null!=c?g.splice(c,1):g[b.index]=d:g.push(d);null!=b.size&&g.length>
|
||||
|
@ -2883,8 +2883,8 @@ var ErrorDialog=function(a,b,e,c,k,m,q,r,v,z,d){v=null!=v?v:!0;var f=document.cr
|
|||
document.createElement("div");b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=z&&(z=mxUtils.button(z,function(){null!=d&&d()}),z.className="geBtn",e.appendChild(z));var p=mxUtils.button(c,function(){v&&a.hideDialog();null!=k&&k()});p.className="geBtn";e.appendChild(p);
|
||||
null!=q&&(c=mxUtils.button(q,function(){v&&a.hideDialog();null!=r&&r()}),c.className="geBtn gePrimaryBtn",e.appendChild(c));this.init=function(){p.focus()};f.appendChild(e);this.container=f};
|
||||
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,e,g){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,e,g);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:"";g=null!=g?g:Error(a);(new Image).src=f+"/log?severity="+d+"&v="+encodeURIComponent("10.1.8")+"&msg=clientError:"+encodeURIComponent(a)+
|
||||
":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=g&&null!=g.stack?"&stack="+encodeURIComponent(g.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(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:"";g=null!=g?g:Error(a);(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!=g&&null!=g.stack?"&stack="+encodeURIComponent(g.stack):"")}}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):
|
||||
"")}catch(l){}};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(l){}};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,a)}};EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
|
||||
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
|
||||
|
@ -2925,7 +2925,7 @@ this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage
|
|||
0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(a,b,c,e,g,n,k){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!g),f=d+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,g));this.saveData(f,a,l,"text/xml")}else if("html"==a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,
|
||||
a,l,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var f=this.createDownloadRequest(d,a,e,b,k,g);this.editor.graph.pageVisible=c;return f}catch(C){this.handleError(C)}}));else{var p=null,A=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,
|
||||
"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var m=this.editor.graph.background;if(k||m==mxConstants.NONE)m=null;var q=this.editor.graph.getSvg(m,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();A('<?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 f=d+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();A(a)}),e)}}catch(S){this.handleError(S)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,g,n){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==n?!1:"xmlpng"!=b);var f="",l="";if(d.width*d.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";"pdf"==b&&0==n&&(l="&allPages=1");if("xmlpng"==b&&
|
||||
mxUtils.getXml(a))})))}else f=d+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();A(a)}),e)}}catch(R){this.handleError(R)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,g,n){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==n?!1:"xmlpng"!=b);var f="",l="";if(d.width*d.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";"pdf"==b&&0==n&&(l="&allPages=1");if("xmlpng"==b&&
|
||||
(d="1",b="png",null!=this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){f="&from="+n;break}n=this.editor.graph.background;"png"==b&&g&&(n=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+f+l+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+e+"&embedXml="+d+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,
|
||||
b,c){var d=window.location.hash,f=mxUtils.bind(this,function(c){var f=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<f.length&&(f+="\n"),f+=c);c=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));
|
||||
if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){d===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);
|
||||
|
@ -2977,7 +2977,7 @@ this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var
|
|||
"3px";var b=document.createElement("a");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=
|
||||
function(a,b,c,e){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),p=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(l=mxResources.get("cancel"),p=function(){d();f.retry()}),404==f.code||404==f.status||403==f.code){a=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):
|
||||
mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+='<br><a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?a=mxUtils.htmlEntities(f.response.error):"undefined"!==window.App&&(f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):
|
||||
f.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,l,c,p,null,null,null,null,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,e,g,n,k,m,t,q,u,D,B){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),e,g,n,k,D,m,t);this.showDialog(a.container,q||340,u||(null!=b&&120<b.length?180:150),!0,!1,B);a.init()};EditorUi.prototype.alert=function(a,b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container,
|
||||
f.code==App.ERROR_BUSY&&(a=mxUtils.htmlEntities(mxResources.get("busy"))));this.showError(b,a,l,c,p,null,null,null,null,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,e,g,n,k,m,t,q,u,D,r){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),e,g,n,k,D,m,t);this.showDialog(a.container,q||340,u||(null!=b&&120<b.length?180:150),!0,!1,r);a.init()};EditorUi.prototype.alert=function(a,b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container,
|
||||
340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,g,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};a=new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,g);this.showDialog(a.container,340,90,!0,n);a.init()};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||
|
||||
!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,
|
||||
b,c){var d="jpeg"==c?"jpg":c,f=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(f,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(a,
|
||||
|
@ -3105,10 +3105,10 @@ function(a){return mxEvent.getSource(a)==x?!0:D.apply(this,arguments)}}this.spin
|
|||
mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(d));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,d,c,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=
|
||||
0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var d=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,c)),e/Math.max(1,a));b.insertImage(decodeURIComponent(d),c*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=
|
||||
mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){r=document.createElement("div");r.style.position="absolute";r.style.top="95px";r.style.left="250px";r.style.width="2000px";r.style.height="30px";r.style.background=
|
||||
"whiteSmoke";document.body.appendChild(r);var B=document.createElement("div");B.style.position="absolute";B.style.top="125px";B.style.left="220px";B.style.width="30px";B.style.height="1000px";B.style.background="whiteSmoke";document.body.appendChild(B);var v=document.createElement("div");v.style.position="absolute";v.style.top="95px";v.style.left="220px";v.style.width="30px";v.style.height="30px";v.style.background="whiteSmoke";document.body.appendChild(v);this.vRuler=new mxRuler(this.editor.graph,
|
||||
B,!0);this.hRuler=new mxRuler(this.editor.graph,r,!1)}if("1"==urlParams.styledev){r=document.getElementById("geFooter");null!=r&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,
|
||||
function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),r.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var z=this.isSelectionAllowed;
|
||||
this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}r=document.getElementById("geInfo");null!=r&&r.parentNode.removeChild(r);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var N=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=N&&(N.parentNode.removeChild(N),N=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
|
||||
"whiteSmoke";document.body.appendChild(r);var v=document.createElement("div");v.style.position="absolute";v.style.top="125px";v.style.left="220px";v.style.width="30px";v.style.height="1000px";v.style.background="whiteSmoke";document.body.appendChild(v);var z=document.createElement("div");z.style.position="absolute";z.style.top="95px";z.style.left="220px";z.style.width="30px";z.style.height="30px";z.style.background="whiteSmoke";document.body.appendChild(z);this.vRuler=new mxRuler(this.editor.graph,
|
||||
v,!0);this.hRuler=new mxRuler(this.editor.graph,r,!1)}if("1"==urlParams.styledev){r=document.getElementById("geFooter");null!=r&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,
|
||||
function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),r.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var R=this.isSelectionAllowed;
|
||||
this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:R.apply(this,arguments)}}r=document.getElementById("geInfo");null!=r&&r.parentNode.removeChild(r);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var N=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=N&&(N.parentNode.removeChild(N),N=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==
|
||||
N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=N&&(N.parentNode.removeChild(N),N=null);if(b.isEnabled()){var d=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=b.view.translate,e=b.view.scale,f=d.x/e-c.x,g=d.y/e-c.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
|
||||
f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=d)b.setSelectionCells(this.importXml(d,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=k;var n=null,c=d.getElementsByTagName("img");
|
||||
null!=c&&1==c.length?(k=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(d=d.getElementsByTagName("a"),null!=d&&1==d.length&&(k=d[0].getAttribute("href")));var m=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,n,null,m))});n&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,
|
||||
|
@ -3164,17 +3164,17 @@ b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChang
|
|||
document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="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 d=a.split("\n"),c=[];if(0<d.length){var e={},f=null,k=null,m=null,q=null,r="",u="auto",v="auto",B=null,z=null,S=40,N=40,K=100,F=0,C=this.editor.graph;C.getGraphBounds();for(var M=
|
||||
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 d=a.split("\n"),c=[];if(0<d.length){var e={},f=null,k=null,m=null,q=null,r="",u="auto",v="auto",B=null,z=null,R=40,N=40,K=100,F=0,C=this.editor.graph;C.getGraphBounds();for(var M=
|
||||
function(){null!=b?b(ga):(C.setSelectionCells(ga),C.scrollCellToVisible(C.getSelectionCell()))},O=C.getFreeInsertPoint(),V=O.x,T=O.y,O=T,W=null,J="auto",q=null,X=[],la=null,fa=null,Y=0;Y<d.length&&"#"==d[Y].charAt(0);){a=d[Y];for(Y++;Y<d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[Y].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[Y].substring(1)),Y++;if("#"!=a.charAt(1)){var ca=a.indexOf(":");if(0<ca){var H=mxUtils.trim(a.substring(1,ca)),I=mxUtils.trim(a.substring(ca+1));"label"==H?W=C.sanitizeHtml(I):
|
||||
"style"==H?f=I:"parentstyle"==H?k=I:"identity"==H&&0<I.length&&"-"!=I?m=I:"parent"==H&&0<I.length&&"-"!=I?q=I:"namespace"==H&&0<I.length&&"-"!=I?r=I:"width"==H?u=I:"height"==H?v=I:"left"==H&&0<I.length?B=I:"top"==H&&0<I.length?z=I:"ignore"==H?fa=I.split(","):"connect"==H?X.push(JSON.parse(I)):"link"==H?la=I:"padding"==H?F=parseFloat(I):"edgespacing"==H?S=parseFloat(I):"nodespacing"==H?N=parseFloat(I):"levelspacing"==H?K=parseFloat(I):"layout"==H&&(J=I)}}}var aa=this.editor.csvToArray(d[Y]),H=ca=null;
|
||||
"style"==H?f=I:"parentstyle"==H?k=I:"identity"==H&&0<I.length&&"-"!=I?m=I:"parent"==H&&0<I.length&&"-"!=I?q=I:"namespace"==H&&0<I.length&&"-"!=I?r=I:"width"==H?u=I:"height"==H?v=I:"left"==H&&0<I.length?B=I:"top"==H&&0<I.length?z=I:"ignore"==H?fa=I.split(","):"connect"==H?X.push(JSON.parse(I)):"link"==H?la=I:"padding"==H?F=parseFloat(I):"edgespacing"==H?R=parseFloat(I):"nodespacing"==H?N=parseFloat(I):"levelspacing"==H?K=parseFloat(I):"layout"==H&&(J=I)}}}var aa=this.editor.csvToArray(d[Y]),H=ca=null;
|
||||
if(null!=m||null!=q)for(var L=0;L<aa.length;L++)m==aa[L]&&(ca=L),q==aa[L]&&(H=L);null==W&&(W="%"+aa[0]+"%");if(null!=X)for(var P=0;P<X.length;P++)null==e[X[P].to]&&(e[X[P].to]={});C.model.beginUpdate();try{for(L=Y+1;L<d.length;L++){var da=this.editor.csvToArray(d[L]);if(null==da){var Z=40<d[L].length?d[L].substring(0,40)+"...":d[L];throw Error(L+" ("+Z+") "+mxResources.get("containsValidationErrors"));}if(da.length==aa.length){var G=null,ja=null!=ca?r+da[ca]:null;null!=ja&&(G=C.model.getCell(ja));
|
||||
null==G&&(G=new mxCell(W,new mxGeometry(V,O,0,0),f||"whiteSpace=wrap;html=1;"),G.vertex=!0,G.id=ja);for(var Q=0;Q<da.length;Q++)C.setAttributeForCell(G,aa[Q],da[Q]);C.setAttributeForCell(G,"placeholders","1");G.style=C.replacePlaceholders(G,G.style);for(P=0;P<X.length;P++)e[X[P].to][G.getAttribute(X[P].to)]=G;null!=la&&"link"!=la&&(C.setLinkForCell(G,G.getAttribute(la)),C.setAttributeForCell(G,la,null));C.fireEvent(new mxEventObject("cellsInserted","cells",[G]));var ha=this.editor.graph.getPreferredSizeForCell(G);
|
||||
G.vertex&&(null!=B&&null!=G.getAttribute(B)&&(G.geometry.x=V+parseFloat(G.getAttribute(B))),null!=z&&null!=G.getAttribute(z)&&(G.geometry.y=T+parseFloat(G.getAttribute(z))),"@"==u.charAt(0)&&null!=G.getAttribute(u.substring(1))?G.geometry.width=parseFloat(G.getAttribute(u.substring(1))):G.geometry.width="auto"==u?ha.width+F:parseFloat(u),"@"==v.charAt(0)&&null!=G.getAttribute(v.substring(1))?G.geometry.height=parseFloat(G.getAttribute(v.substring(1))):G.geometry.height="auto"==v?ha.height+F:parseFloat(v),
|
||||
O+=G.geometry.height+N);q=null!=H?C.model.getCell(r+da[H]):null;null!=q?(q.style=C.replacePlaceholders(q,k),C.addCell(G,q)):c.push(C.addCell(G))}}for(var ka=c.slice(),ga=c.slice(),P=0;P<X.length;P++)for(var ba=X[P],L=0;L<c.length;L++){var G=c[L],wa=G.getAttribute(ba.from);if(null!=wa){C.setAttributeForCell(G,ba.from,null);for(var ua=wa.split(","),Q=0;Q<ua.length;Q++){var pa=e[ba.to][ua[Q]];null!=pa&&(W=ba.label,null!=ba.fromlabel&&(W=(G.getAttribute(ba.fromlabel)||"")+(W||"")),null!=ba.tolabel&&(W=
|
||||
(W||"")+(pa.getAttribute(ba.tolabel)||"")),ga.push(C.insertEdge(null,null,W||"",ba.invert?pa:G,ba.invert?G:pa,ba.style||C.createCurrentEdgeStyle())),mxUtils.remove(ba.invert?G:pa,ka))}}}if(null!=fa)for(L=0;L<c.length;L++)for(G=c[L],Q=0;Q<fa.length;Q++)C.setAttributeForCell(G,mxUtils.trim(fa[Q]),null);var ta=new mxParallelEdgeLayout(C);ta.spacing=S;var va=function(){ta.execute(C.getDefaultParent());for(var a=0;a<c.length;a++){var b=C.getCellGeometry(c[a]);b.x=Math.round(C.snap(b.x));b.y=Math.round(C.snap(b.y));
|
||||
(W||"")+(pa.getAttribute(ba.tolabel)||"")),ga.push(C.insertEdge(null,null,W||"",ba.invert?pa:G,ba.invert?G:pa,ba.style||C.createCurrentEdgeStyle())),mxUtils.remove(ba.invert?G:pa,ka))}}}if(null!=fa)for(L=0;L<c.length;L++)for(G=c[L],Q=0;Q<fa.length;Q++)C.setAttributeForCell(G,mxUtils.trim(fa[Q]),null);var ta=new mxParallelEdgeLayout(C);ta.spacing=R;var va=function(){ta.execute(C.getDefaultParent());for(var a=0;a<c.length;a++){var b=C.getCellGeometry(c[a]);b.x=Math.round(C.snap(b.x));b.y=Math.round(C.snap(b.y));
|
||||
"auto"==u&&(b.width=Math.round(C.snap(b.width)));"auto"==v&&(b.height=Math.round(C.snap(b.height)))}};if("circle"==J){var ma=new mxCircleLayout(C);ma.resetEdges=!1;var ra=ma.isVertexIgnored;ma.isVertexIgnored=function(a){return ra.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ma.execute(C.getDefaultParent());va()},!0,M);M=null}else if("horizontaltree"==J||"verticaltree"==J||"auto"==J&&ga.length==2*c.length-1&&1==ka.length){C.view.validate();var ia=new mxCompactTreeLayout(C,
|
||||
"horizontaltree"==J);ia.levelDistance=N;ia.edgeRouting=!1;ia.resetEdges=!1;this.executeLayout(function(){ia.execute(C.getDefaultParent(),0<ka.length?ka[0]:null)},!0,M);M=null}else if("horizontalflow"==J||"verticalflow"==J||"auto"==J&&1==ka.length){C.view.validate();var ea=new mxHierarchicalLayout(C,"horizontalflow"==J?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ea.intraCellSpacing=N;ea.parallelEdgeSpacing=S;ea.interRankCellSpacing=K;ea.disableEdgeStyle=!1;this.executeLayout(function(){ea.execute(C.getDefaultParent(),
|
||||
ga);C.moveCells(ga,V,T)},!0,M);M=null}else if("organic"==J||"auto"==J&&ga.length>c.length){C.view.validate();var sa=new mxFastOrganicLayout(C);sa.forceConstant=3*N;sa.resetEdges=!1;var xa=sa.isVertexIgnored;sa.isVertexIgnored=function(a){return xa.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ta=new mxParallelEdgeLayout(C);ta.spacing=S;this.executeLayout(function(){sa.execute(C.getDefaultParent());va()},!0,M);M=null}this.hideDialog()}finally{C.model.endUpdate()}null!=M&&M()}}catch(na){this.handleError(na)}};
|
||||
"horizontaltree"==J);ia.levelDistance=N;ia.edgeRouting=!1;ia.resetEdges=!1;this.executeLayout(function(){ia.execute(C.getDefaultParent(),0<ka.length?ka[0]:null)},!0,M);M=null}else if("horizontalflow"==J||"verticalflow"==J||"auto"==J&&1==ka.length){C.view.validate();var ea=new mxHierarchicalLayout(C,"horizontalflow"==J?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ea.intraCellSpacing=N;ea.parallelEdgeSpacing=R;ea.interRankCellSpacing=K;ea.disableEdgeStyle=!1;this.executeLayout(function(){ea.execute(C.getDefaultParent(),
|
||||
ga);C.moveCells(ga,V,T)},!0,M);M=null}else if("organic"==J||"auto"==J&&ga.length>c.length){C.view.validate();var sa=new mxFastOrganicLayout(C);sa.forceConstant=3*N;sa.resetEdges=!1;var xa=sa.isVertexIgnored;sa.isVertexIgnored=function(a){return xa.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ta=new mxParallelEdgeLayout(C);ta.spacing=R;this.executeLayout(function(){sa.execute(C.getDefaultParent());va()},!0,M);M=null}this.hideDialog()}finally{C.model.endUpdate()}null!=M&&M()}}catch(na){this.handleError(na)}};
|
||||
EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}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 d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
|
||||
c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],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 r=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=r.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.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 c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.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*
|
||||
|
@ -3274,7 +3274,7 @@ p.sidebar.dropAndConnect=function(a,c,d,e){var f=g.model,k=null;f.beginUpdate();
|
|||
p.onKeyDown;p.onKeyDown=function(a){try{if(g.isEnabled()&&!g.isEditing()&&b(g.getSelectionCell())&&1==g.getSelectionCount()){var c=null;0<g.getIncomingEdges(g.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?z(g.getSelectionCell()):d(g.getSelectionCell()):13==a.which&&(c=v(g.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&g.model.isEdge(c[0])?g.setSelectionCell(g.model.getTerminal(c[0],!1)):g.setSelectionCell(c[c.length-1]),null!=p.hoverIcons&&p.hoverIcons.update(g.view.getState(g.getSelectionCell())),
|
||||
g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=D[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(l(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(l(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(l(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(l(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
|
||||
mxEvent.consume(a))}}catch(O){console.log("error",O)}mxEvent.isConsumed(a)||B.apply(this,arguments)};var U=g.connectVertex;g.connectVertex=function(a,c,e,f,k,l){var n=g.getIncomingEdges(a);return b(a)&&0<n.length?(e=r(a),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?d(a):f==k?z(a):v(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):U.call(this,a,c,e,f,k,l)};g.getSubtree=function(a){var c=[a];b(a)&&
|
||||
!e(a)&&g.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var S=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){S.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
|
||||
!e(a)&&g.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var R=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){R.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width=
|
||||
"18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
|
||||
this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.destroy;
|
||||
mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");
|
||||
|
@ -3354,14 +3354,14 @@ l.sidebarWindow.window.fit();null!=l.formatWindow&&l.formatWindow.window.fit();n
|
|||
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1;
|
||||
GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;
|
||||
GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=
|
||||
0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);
|
||||
if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var c=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=
|
||||
!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)};mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var k=this.graph.getGlobalVariable,c=this;this.graph.getGlobalVariable=function(a){var b=
|
||||
e[c.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(c.currentPage+1):"pagenumber"==a?c.currentPage+1:k.apply(this,arguments)}}}this.diagrams=[];var m=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==
|
||||
a){this.selectPage(c);b=!0;break}return b};var d=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=m&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),m=this.xmlNode)});this.addListener("xmlNodeChanged",d);d();urlParams.page=c.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:
|
||||
8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);
|
||||
this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};c=this;this.graph.customLinkClicked=function(a){var b=!0;if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");c.selectPageById(a.substring(d+1))||(b=!1,alert(mxResources.get("pageNotFound")||"Page not found"))}else this.handleCustomLink(a);return b};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&
|
||||
a.setAttribute("title",this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),m=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),c())}));m.observe(k,{attributes:!0})}else c()}};
|
||||
0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&
|
||||
(this.minHeight+=this.toolbarHeight);if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var c=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=
|
||||
!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)};mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){if(null!=this.pageId)for(var k=0;k<e.length;k++)if(this.pageId==
|
||||
e[k].getAttribute("id")){this.currentPage=k;break}var m=this.graph.getGlobalVariable,c=this;this.graph.getGlobalVariable=function(a){var b=e[c.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(c.currentPage+1):"pagenumber"==a?c.currentPage+1:m.apply(this,arguments)}}}this.diagrams=[];var d=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};
|
||||
this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};k=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=d&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),d=this.xmlNode)});this.addListener("xmlNodeChanged",k);k();urlParams.page=c.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?
|
||||
"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=
|
||||
!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};c=this;this.graph.customLinkClicked=function(a){var b=!0;if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");c.selectPageById(a.substring(d+1))||(b=!1,alert(mxResources.get("pageNotFound")||"Page not found"))}else this.handleCustomLink(a);
|
||||
return b};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),m=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),c())}));m.observe(k,{attributes:!0})}else c()}};
|
||||
GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};
|
||||
GraphViewer.prototype.setXmlNode=function(a){this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
|
||||
GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
|
||||
|
@ -3407,7 +3407,7 @@ GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type=
|
|||
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var c=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;c.open("GET",a);c.onload=function(){b(null!=c.getText?c.getText():c.responseText)};c.onerror=e;c.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
|
||||
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,c){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function q(b,c){if(!b.resizedAttached)b.resizedAttached=
|
||||
new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
|
||||
b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],l=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};l();var q=!1,r=function(){b.resizedAttached&&(q&&(b.resizedAttached.call(),q=!1),a(r))};a(r);var v,u,z,B,U=function(){if((z=b.offsetWidth)!=v||(B=b.offsetHeight)!=u)q=!0,v=z,u=B;l()},S=function(a,b,c){a.attachEvent?
|
||||
a.attachEvent("on"+b,c):a.addEventListener(b,c)};S(d,"scroll",U);S(f,"scroll",U)}var r=function(){GraphViewer.resizeSensorEnabled&&c()},v=Object.prototype.toString.call(e),z="[object Array]"===v||"[object NodeList]"===v||"[object HTMLCollection]"===v||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(z)for(var v=0,d=e.length;v<d;v++)q(e[v],r);else q(e,r);this.detach=function(){if(z)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
|
||||
b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],l=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};l();var q=!1,r=function(){b.resizedAttached&&(q&&(b.resizedAttached.call(),q=!1),a(r))};a(r);var v,u,z,B,U=function(){if((z=b.offsetWidth)!=v||(B=b.offsetHeight)!=u)q=!0,v=z,u=B;l()},R=function(a,b,c){a.attachEvent?
|
||||
a.attachEvent("on"+b,c):a.addEventListener(b,c)};R(d,"scroll",U);R(f,"scroll",U)}var r=function(){GraphViewer.resizeSensorEnabled&&c()},v=Object.prototype.toString.call(e),z="[object Array]"===v||"[object NodeList]"===v||"[object HTMLCollection]"===v||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(z)for(var v=0,d=e.length;v<d;v++)q(e[v],r);else q(e,r);this.detach=function(){if(z)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
|
||||
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
|
||||
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
|
||||
|
|
Loading…
Reference in a new issue