6.6.4 release
This commit is contained in:
parent
595e663265
commit
d7765ba405
19 changed files with 955 additions and 389 deletions
|
@ -1,3 +1,12 @@
|
|||
24-MAY-2017: 6.6.4
|
||||
|
||||
- Fixes possible data loss for back button
|
||||
- Enables OneDrive support on iOS
|
||||
|
||||
22-MAY-2017: 6.6.3
|
||||
|
||||
- vsdx export improvements
|
||||
|
||||
19-MAY-2017: 6.6.2
|
||||
|
||||
- Adds trees plugin
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
6.6.2
|
||||
6.6.4
|
|
@ -24,6 +24,7 @@ import org.apache.commons.fileupload.FileItemIterator;
|
|||
import org.apache.commons.fileupload.FileItemStream;
|
||||
import org.apache.commons.fileupload.servlet.ServletFileUpload;
|
||||
import org.apache.commons.fileupload.util.Streams;
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
|
||||
import com.mxgraph.io.mxCodec;
|
||||
import com.mxgraph.io.mxGraphMlCodec;
|
||||
|
@ -128,10 +129,10 @@ public class OpenServlet extends HttpServlet
|
|||
filename = item.getName();
|
||||
vsdx = filename.toLowerCase().endsWith(".vsdx");
|
||||
vssx = filename.toLowerCase().endsWith(".vssx");
|
||||
|
||||
|
||||
if (vsdx || vssx)
|
||||
{
|
||||
upfile = Streams.asString(stream, "ISO-8859-1");
|
||||
upfile = Streams.asString(stream, "ISO-8859-1");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -152,11 +153,11 @@ public class OpenServlet extends HttpServlet
|
|||
}
|
||||
|
||||
String xml = null;
|
||||
|
||||
|
||||
if (filename.toLowerCase().endsWith(".png"))
|
||||
{
|
||||
xml = extractXmlFromPng(upfile
|
||||
.getBytes(Utils.CHARSET_FOR_URL_ENCODING));
|
||||
xml = extractXmlFromPng(
|
||||
upfile.getBytes(Utils.CHARSET_FOR_URL_ENCODING));
|
||||
}
|
||||
else if (ENABLE_GRAPHML_SUPPORT && upfile.matches(graphMlRegex))
|
||||
{
|
||||
|
@ -165,12 +166,14 @@ public class OpenServlet extends HttpServlet
|
|||
mxGraph graph = new mxGraphHeadless();
|
||||
|
||||
mxGraphMlCodec.decode(mxXmlUtils.parseXml(upfile), graph);
|
||||
xml = mxXmlUtils.getXml(new mxCodec().encode(graph.getModel()));
|
||||
xml = mxXmlUtils
|
||||
.getXml(new mxCodec().encode(graph.getModel()));
|
||||
}
|
||||
else if (ENABLE_VSDX_SUPPORT && vsdx)
|
||||
{
|
||||
mxVsdxCodec vdxCodec = new mxVsdxCodec();
|
||||
xml = vdxCodec.decodeVsdx(upfile.getBytes("ISO-8859-1"), Utils.CHARSET_FOR_URL_ENCODING);
|
||||
xml = vdxCodec.decodeVsdx(upfile.getBytes("ISO-8859-1"),
|
||||
Utils.CHARSET_FOR_URL_ENCODING);
|
||||
|
||||
// Replaces VSDX extension
|
||||
int dot = filename.lastIndexOf('.');
|
||||
|
@ -179,7 +182,8 @@ public class OpenServlet extends HttpServlet
|
|||
else if (ENABLE_VSSX_SUPPORT && vssx)
|
||||
{
|
||||
mxVssxCodec vssxCodec = new mxVssxCodec();
|
||||
xml = vssxCodec.decodeVssx(upfile.getBytes("ISO-8859-1"), Utils.CHARSET_FOR_URL_ENCODING);
|
||||
xml = vssxCodec.decodeVssx(upfile.getBytes("ISO-8859-1"),
|
||||
Utils.CHARSET_FOR_URL_ENCODING);
|
||||
|
||||
// Replaces VSDX extension
|
||||
int dot = filename.lastIndexOf('.');
|
||||
|
@ -210,10 +214,12 @@ public class OpenServlet extends HttpServlet
|
|||
{
|
||||
// Workaround for replacement char and null byte in IE9 request
|
||||
xml = xml.replaceAll("[\\uFFFD\\u0000]*", "");
|
||||
writeScript(writer, "try{window.parent.setCurrentXml(decodeURIComponent('"
|
||||
+ Utils.encodeURIComponent(xml, Utils.CHARSET_FOR_URL_ENCODING)
|
||||
+ "'), decodeURIComponent('" + Utils.encodeURIComponent(filename, Utils.CHARSET_FOR_URL_ENCODING)
|
||||
+ "'));}catch(e){window.parent.showOpenAlert({message:window.parent.mxResources.get('notAUtf8File')});}");
|
||||
writeScript(writer,
|
||||
"try{window.parent.setCurrentXml(decodeURIComponent('"
|
||||
+ encodeString(xml)
|
||||
+ "'), decodeURIComponent('"
|
||||
+ encodeString(filename)
|
||||
+ "'));}catch(e){window.parent.showOpenAlert({message:window.parent.mxResources.get('notAUtf8File')});}");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -223,9 +229,9 @@ public class OpenServlet extends HttpServlet
|
|||
}
|
||||
else
|
||||
{
|
||||
response.setStatus(HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE);
|
||||
writeScript(
|
||||
writer,
|
||||
response.setStatus(
|
||||
HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE);
|
||||
writeScript(writer,
|
||||
"window.parent.showOpenAlert(window.parent.mxResources.get('drawingTooLarge'));");
|
||||
}
|
||||
}
|
||||
|
@ -233,8 +239,7 @@ public class OpenServlet extends HttpServlet
|
|||
{
|
||||
e.printStackTrace();
|
||||
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
|
||||
writeScript(
|
||||
writer,
|
||||
writeScript(writer,
|
||||
"window.parent.showOpenAlert(window.parent.mxResources.get('invalidOrMissingFile'));");
|
||||
}
|
||||
|
||||
|
@ -242,6 +247,15 @@ public class OpenServlet extends HttpServlet
|
|||
writer.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* URI encodes the given string for JavaScript.
|
||||
*/
|
||||
protected String encodeString(String s)
|
||||
{
|
||||
return StringEscapeUtils.escapeEcmaScript(
|
||||
Utils.encodeURIComponent(s, Utils.CHARSET_FOR_URL_ENCODING));
|
||||
};
|
||||
|
||||
/**
|
||||
* Writes the given string as a script in a HTML page to the given print writer.
|
||||
*/
|
||||
|
@ -259,8 +273,8 @@ public class OpenServlet extends HttpServlet
|
|||
// NOTE: Key length must not be longer than 79 bytes (not checked)
|
||||
protected String extractXmlFromPng(byte[] data)
|
||||
{
|
||||
Map<String, String> textChunks = decodeCompressedText(new ByteArrayInputStream(
|
||||
data));
|
||||
Map<String, String> textChunks = decodeCompressedText(
|
||||
new ByteArrayInputStream(data));
|
||||
|
||||
return (textChunks != null) ? textChunks.get("mxGraphModel") : null;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
CACHE MANIFEST
|
||||
|
||||
# THIS FILE WAS GENERATED. DO NOT MODIFY!
|
||||
# 05/19/2017 03:49 PM
|
||||
# 05/24/2017 04:23 PM
|
||||
|
||||
app.html
|
||||
index.html?offline=1
|
||||
|
|
40
war/js/app.min.js
vendored
40
war/js/app.min.js
vendored
|
@ -3037,7 +3037,7 @@ Toolbar.prototype.addClickHandler=function(a,c){null!=c&&(mxEvent.addListener(a,
|
|||
Toolbar.prototype.createLabel=function(a,c){var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");f.className="geLabel";mxUtils.write(f,a);return f};
|
||||
Toolbar.prototype.addMenuHandler=function(a,c,f,d){if(null!=f){var b=this.editorUi.editor.graph,e=null,g=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(k){if(g&&(null==a.enabled||a.enabled)){b.popupMenuHandler.hideMenu();e=new mxPopupMenu(f);e.div.className+=" geToolbarMenu";e.showDisabled=d;e.labels=c;e.autoExpand=!0;var l=mxUtils.getOffset(a);e.popup(l.x,l.y+a.offsetHeight,null,k);this.editorUi.setCurrentMenu(e,a);!c&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");
|
||||
e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}g=!0;mxEvent.consume(k)}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(b){g=this.currentElt!=a;null!=document.documentMode&&9<=document.documentMode&&b.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};
|
||||
function Dialog(a,c,f,d,b,e,g){var k=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(k=80);f+=k;d+=k;var l=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),m=Math.max(0,Math.round((document.body.scrollWidth-f)/2)),n=Math.max(0,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=Math.min(f,document.body.scrollWidth-64);d=Math.min(d,l-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);l=a.createDiv("geDialog");
|
||||
function Dialog(a,c,f,d,b,e,g){var k=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(k=80);f+=k;d+=k;var l=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),m=Math.max(1,Math.round((document.body.scrollWidth-f-64)/2)),n=Math.max(1,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=Math.min(f,document.body.scrollWidth-64);d=Math.min(d,l-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);l=a.createDiv("geDialog");
|
||||
l.style.width=f+"px";l.style.height=d+"px";l.style.left=m+"px";l.style.top=n+"px";l.style.zIndex=this.zIndex;null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background="white",this.bg.style.left="0px",this.bg.style.top="0px",this.bg.style.bottom="0px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));b&&document.body.appendChild(this.bg);l.appendChild(c);
|
||||
document.body.appendChild(l);e&&(c=document.createElement("img"),c.setAttribute("src",Dialog.prototype.closeImage),c.setAttribute("title",mxResources.get("close")),c.className="geDialogClose",c.style.top=n+14+"px",c.style.left=m+f+38-k+"px",c.style.zIndex=this.zIndex,mxEvent.addListener(c,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(c),this.dialogImg=c,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.onDialogClose=
|
||||
g;this.container=l;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
|
||||
|
@ -7505,7 +7505,7 @@ IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R
|
|||
IMAGE_PATH+"/spin.gif";Editor.tweetImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARlJREFUeNpi/P//PwM1ABMDlQDVDGKAeo0biMXwKOMD4ilA/AiInwDxfCBWBeIgINYDmwE1yB2Ir0Alsbl6JchONPwNiC8CsTPIDJjXuIBYG4gPAnE8EDMjGaQCxGFYLOAEYlYg/o3sNSkgfo1k2ykgLgRiIyAOwOIaGE6CmwE1SA6IZ0BNR1f8GY9BXugG2UMN+YtHEzr+Aw0OFINYgHgdCYaA8HUgZkM3CASEoYb9ItKgapQkhGQQKC0dJdKQx1CLsRoEArpAvAuI3+Ix5B8Q+2AkaiyZVgGId+MwBBQhKVhzB9QgKyDuAOJ90BSLzZBzQOyCK5uxQNnXoGlJHogfIOU7UCI9C8SbgHgjEP/ElRkZB115BBBgAPbkvQ/azcC0AAAAAElFTkSuQmCC":
|
||||
IMAGE_PATH+"/tweet.png";Editor.facebookImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAARVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADc6ur3AAAAFnRSTlMAYmRg2KVCC/oPq0uAcVQtHtvZuoYh/a7JUAAAAGJJREFUGNOlzkkOgCAMQNEvagvigBP3P6pRNoCJG/+myVu0RdsqxcQqQ/NFVkKQgqwDzoJ2WKajoB66atcAa0GjX0D8lJHwNGfknYJzY77LDtDZ+L74j0z26pZI2yYlMN9TL17xEd+fl1D+AAAAAElFTkSuQmCC":IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
|
||||
Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node width. Possible value are px or auto. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value are px or auto. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -26\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
|
||||
Editor.configure=function(a){ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;"1"==urlParams.dev&&
|
||||
Editor.configure=function(a){Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;"1"==urlParams.dev&&
|
||||
(Editor.prototype.editBlankUrl+="&dev=1",Editor.prototype.editBlankFallbackUrl+="&dev=1");var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var c=b.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],d=c.getElementsByTagName("div");null!=d&&0<d.length&&(c=d[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==b.nodeName){c=b.getAttribute("style")||"default-style2";
|
||||
if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled=
|
||||
"1"==urlParams.math||"1"==b.getAttribute("math");c=b.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var c=Editor.prototype.getGraphXml;
|
||||
|
@ -7546,7 +7546,7 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
|
|||
[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=
|
||||
[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=
|
||||
[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
|
||||
[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return t.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.6.2";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;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=
|
||||
[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return t.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.6.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;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;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;
|
||||
EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=
|
||||
null!=c&&6<c.length}catch(p){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})();
|
||||
|
@ -8078,18 +8078,18 @@ App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugin
|
|||
App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var c=document.cookie.split(";"),f=0;f<c.length;f++){var d=mxUtils.trim(c[f]);if("MODE="==d.substring(0,5)){a=d.substring(5);break}}null!=a&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie="MODE=; expires="+c.toUTCString(),localStorage.setItem(".mode",a))}return a};
|
||||
(function(){if(!mxClient.IS_CHROMEAPP&&("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
|
||||
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
|
||||
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&!/(iPad|iPhone|iPod)/.test(navigator.userAgent)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
|
||||
null):window.OneDriveClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")),"0"!=urlParams.plugins&&"1"!=urlParams.offline)){var a=mxSettings.getPlugins(),c=urlParams.p;if(null!=c||null!=a&&0<a.length)App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)};if(null!=c)for(var f=c.split(";"),c=0;c<f.length;c++){var d=App.pluginRegistry[f[c]];null!=d?mxscript(d):null!=window.console&&console.log("Unknown plugin:",f[c])}if(null!=a&&0<a.length&&
|
||||
"0"!=urlParams.plugins){f=window.location.protocol+"//"+window.location.host;d=!0;for(c=0;c<a.length&&d;c++)"/"!=a[c].charAt(0)&&a[c].substring(0,f.length)!=f&&(d=!1);if(d||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[a.join("\n")]).replace(/\\n/g,"\n")))for(c=0;c<a.length;c++)try{mxscript(a[c])}catch(b){}}}})();
|
||||
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
|
||||
null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")),"0"!=urlParams.plugins&&"1"!=urlParams.offline)){var a=mxSettings.getPlugins(),c=urlParams.p;if(null!=c||null!=a&&0<a.length)App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)};if(null!=c)for(var f=c.split(";"),c=0;c<f.length;c++){var d=App.pluginRegistry[f[c]];null!=d?mxscript(d):null!=window.console&&console.log("Unknown plugin:",f[c])}if(null!=a&&0<a.length&&"0"!=urlParams.plugins){f=window.location.protocol+
|
||||
"//"+window.location.host;d=!0;for(c=0;c<a.length&&d;c++)"/"!=a[c].charAt(0)&&a[c].substring(0,f.length)!=f&&(d=!1);if(d||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[a.join("\n")]).replace(/\\n/g,"\n")))for(c=0;c<a.length;c++)try{mxscript(a[c])}catch(b){}}}})();
|
||||
App.main=function(a){var c=null;window.onerror=function(a,b,e,f,k){try{if(a!=c&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){c=a;var d=new Image,g=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";d.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+
|
||||
encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(e)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(n){}};"atlas"==uiTheme&&mxClient.link("stylesheet","styles/atlas.css");if(null!=window.mxscript){"0"!=urlParams.chrome&&mxscript("js/jscolor/jscolor.js");if("1"==urlParams.offline){mxscript("js/shapes.min.js");var f=document.createElement("iframe");f.setAttribute("width","0");f.setAttribute("height",
|
||||
"0");f.setAttribute("src","offline.html");document.body.appendChild(f);mxStencilRegistry.stencilSet={};mxStencilRegistry.getStencil=function(a){return mxStencilRegistry.stencils[a]};mxStencilRegistry.loadStencilSet=function(a,b,c){a=a.substring(a.indexOf("/")+1);a="mxgraph."+a.substring(0,a.length-4).replace(/\//g,".");a=mxStencilRegistry.stencilSet[a];null!=a&&mxStencilRegistry.parseStencilSet(a,b,!1)};for(f=mxUtils.load("stencils.xml").getXml().documentElement.firstChild;null!=f;)"shapes"==f.nodeName&&
|
||||
null!=f.getAttribute("name")&&(mxStencilRegistry.stencilSet[f.getAttribute("name").toLowerCase()]=f,mxStencilRegistry.parseStencilSet(f)),f=f.nextSibling}"0"==urlParams.picker||mxClient.IS_QUIRKS||8==document.documentMode||mxscript(document.location.protocol+"//www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22picker%22%2C%22version%22%3A%221%22%2C%22language%22%3A%22"+mxClient.language+"%22%7D%5D%7D");"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&
|
||||
"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback"):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();mxResources.loadDefaultBundle=!1;f=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?
|
||||
[f]:[f,STYLE_PATH+"/default.xml"],function(c){mxResources.parse(c[0].getText());1<c.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=c[1].getDocumentElement());c=new App(new Editor("0"==urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,
|
||||
function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!/(iPad|iPhone|iPod)/.test(navigator.userAgent)&&(0>navigator.userAgent.indexOf("MSIE")||
|
||||
10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null)}null!=a&&a(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:","1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))},function(){document.getElementById("geStatus").innerHTML=
|
||||
'Error loading page. <a href="javascript:void(0);" onclick="location.reload();">Please try refreshing.</a>'})};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
|
||||
function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,
|
||||
window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null)}null!=a&&a(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:","1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))},function(){document.getElementById("geStatus").innerHTML='Error loading page. <a href="javascript:void(0);" onclick="location.reload();">Please try refreshing.</a>'})};
|
||||
mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
|
||||
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
|
||||
IMAGE_PATH+"/chevron-up.png";
|
||||
App.prototype.chevronDownImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC":IMAGE_PATH+
|
||||
|
@ -8149,7 +8149,7 @@ this.getServiceCount(!0);var c=4>=a?4:3,b=new CreateDialog(this,b,mxUtils.bind(t
|
|||
this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))try{null!=window.opener&&null!=window.opener[c]?d(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(b){this.handleError(b,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){d(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),f)}))}else(null==window.location.hash||1>=window.location.hash.length)&&
|
||||
null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(b){this.handleError(b)}};
|
||||
App.prototype.showSplash=function(a){var c=this.getServiceCount(!1),f=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>c?180:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=a)}))});if(this.editor.chromeless)this.handleError({message:mxResources.get("noFileSelected")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,
|
||||
function(){this.showSplash()}));else if(null==this.mode||a){a=4>=c?4:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();f()}),a);this.showDialog(d.container,100*a,c>a?420:300,!0,!1);d.init()}else null==urlParams.create&&f()};
|
||||
function(){this.showSplash()}));else if(null==this.mode||a){a=4>=c?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();f()}),a);this.showDialog(d.container,100*a,c>a?420:300,!0,!1);d.init()}else null==urlParams.create&&f()};
|
||||
App.prototype.addLanguageMenu=function(a){var c=null;this.isOfflineApp()&&!mxClient.IS_CHROMEAPP||null==this.menus.get("language")||(c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="geIcon geSprite geSprite-globe",c.style.position="absolute",c.style.cursor="pointer",c.style.bottom="20px",c.style.right="20px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(this.menus.get("language").funct);
|
||||
d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxUtils.getOffset(c);d.popup(b.x,b.y+c.offsetHeight,null,a);this.setCurrentMenu(d)})),a.appendChild(c));return c};
|
||||
App.prototype.defineCustomObjects=function(){null!=gapi.drive.realtime&&null!=gapi.drive.realtime.custom&&(gapi.drive.realtime.custom.registerType(mxRtCell,"Cell"),mxRtCell.prototype.cellId=gapi.drive.realtime.custom.collaborativeField("cellId"),mxRtCell.prototype.type=gapi.drive.realtime.custom.collaborativeField("type"),mxRtCell.prototype.value=gapi.drive.realtime.custom.collaborativeField("value"),mxRtCell.prototype.xmlValue=gapi.drive.realtime.custom.collaborativeField("xmlValue"),mxRtCell.prototype.style=
|
||||
|
@ -8167,9 +8167,9 @@ k,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.l
|
|||
function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),l,b):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,k,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),l,b):d==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,k,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),l)}),
|
||||
null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(b||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(k);var m=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);e||this.libraryLoaded(f,c);null!=g&&g()}),l)});if(a!=f.getTitle()){var n=f.getHash();f.rename(a,mxUtils.bind(this,function(a){f.constructor!=
|
||||
LocalLibrary&&n!=f.getHash()&&(mxSettings.removeCustomLibrary(n),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(n);m()}),l)}else m()}};
|
||||
App.prototype.saveFile=function(a){var c=this.getCurrentFile();if(null!=c){var f=mxUtils.bind(this,function(){this.removeDraft();c.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==c.getTitle()||null==this.mode){var d=null!=c.getTitle()?c.getTitle():this.defaultFilename,b=!mxClient.IS_IOS||!navigator.standalone,e=this.mode;a=this.getServiceCount(!0);var g=4>=a?4:3,d=new CreateDialog(this,d,mxUtils.bind(this,
|
||||
function(a,b){null!=a&&0<a.length&&(null==e&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,f)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),window.open(this.getUrl(window.location.pathname))):e!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),
|
||||
null,b,f,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,f))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,b,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,g);this.showDialog(d.container,460,a>g?390:270,!0,!0);d.init()}else this.save(c.getTitle(),f)}};
|
||||
App.prototype.saveFile=function(a){var c=this.getCurrentFile();if(null!=c){var f=mxUtils.bind(this,function(){this.removeDraft();c.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==c.getTitle()||null==this.mode){var d=null!=c.getTitle()?c.getTitle():this.defaultFilename,b=!mxClient.IS_IOS||!navigator.standalone,e=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var g=4>=a?2:3,d=new CreateDialog(this,
|
||||
d,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==e&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,f)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),window.open(this.getUrl(window.location.pathname))):e!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
|
||||
/(\.html)$/i.test(a)),null,b,f,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,f))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,b,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,g);this.showDialog(d.container,460,a>g?390:270,!0,!0);d.init()}else this.save(c.getTitle(),f)}};
|
||||
EditorUi.prototype.loadTemplate=function(a,c,f){var d=a;this.isCorsEnabledForUrl(d)||(d=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(d,mxUtils.bind(this,function(b){!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&c(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(b=this.extractGraphModelFromPng(b)),
|
||||
c(b))}),f,/(\.png)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:null};
|
||||
App.prototype.createFile=function(a,c,f,d,b,e,g,k){d=k?null:null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var l=mxUtils.bind(this,function(){this.spinner.stop()}),m=mxUtils.bind(this,function(a){l();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});d==App.MODE_GOOGLE&&null!=this.drive?(g=null!=this.stateArg?this.stateArg.folderId:g,this.drive.insertFile(a,c,g,mxUtils.bind(this,
|
||||
|
@ -8180,13 +8180,13 @@ document.body.appendChild(k.container);node=e;if(null!=node){var l=null;if("diag
|
|||
this.editor.graph;try{this.editor.graph=k,this.editor.setGraphXml(node)}catch(t){}finally{this.editor.graph=m}}a.setData(this.createFileData(e,k,a,g));null!=k&&k.container.parentNode.removeChild(k.container);var p=mxUtils.bind(this,function(){this.spinner.stop()}),q=mxUtils.bind(this,function(){p();var e=this.getCurrentFile();null==f&&null!=e&&(f=!e.isModified()&&null==e.getMode());var g=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);f&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));
|
||||
null!=c&&this.sidebar.showEntries(c)}),k=mxUtils.bind(this,function(){f||null==e||!e.isModified()?g():this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==f||f?k():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=d&&d(),window.openWindow(b,null,k))});a.constructor==LocalFile||a.constructor==DriveFile?
|
||||
q():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){q()}),mxUtils.bind(this,function(a){p();this.handleError(a)}))}};
|
||||
App.prototype.loadFile=function(a,c,f){this.hideDialog();var d=mxUtils.bind(this,function(){if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var b=localStorage.getItem(a);if(null!=b)this.fileLoaded(new StorageFile(this,b,a));else throw{message:mxResources.get("fileNotFound")};}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();
|
||||
window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=f)this.spinner.stop(),this.fileLoaded(f);else if("R"==a.charAt(0))this.spinner.stop(),b=decodeURIComponent(a.substring(1)),"<"!=b.charAt(0)&&(b=this.editor.graph.decompress(b)),b=new LocalFile(this,b,null!=urlParams.title?
|
||||
decodeURIComponent(urlParams.title):this.defaultFilename,!0),b.getHash=function(){return a},this.fileLoaded(b);else if("U"==a.charAt(0)){var d=decodeURIComponent(a.substring(1));this.loadTemplate(d,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var e=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var f=d,g=d.lastIndexOf("."),k=f.lastIndexOf("/");g>k&&0<k&&(f=f.substring(k+1,g),g=d.substring(g),".png"==g&&(g=".xml"),".svg"===g||".xml"===g||".html"===
|
||||
g)&&(e=f+g)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);b.getHash=function(){return a};this.fileLoaded(b)||"https://drive.google.com/uc?id="!=d.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+d.substring(31,d.lastIndexOf("&")),c),!0):!1}),!b()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",
|
||||
b))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else b=null,"G"==a.charAt(0)?b=this.drive:"D"==a.charAt(0)?b=this.dropbox:"W"==a.charAt(0)?b=this.oneDrive:"H"==a.charAt(0)&&(b=this.gitHub),null==b?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():
|
||||
""})):(a=decodeURIComponent(a.substring(1)),b.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),b=this.getCurrentFile(),e=mxUtils.bind(this,function(){null!=
|
||||
b&&b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()});null==a||0==a.length?(this.editor.setStatus(""),this.fileLoaded(null)):null!=b&&b.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,e):e()};
|
||||
App.prototype.loadFile=function(a,c,f){this.hideDialog();var d=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var b=localStorage.getItem(a);if(null!=b)this.fileLoaded(new StorageFile(this,b,a));else throw{message:mxResources.get("fileNotFound")};}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"),
|
||||
mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=f)this.spinner.stop(),this.fileLoaded(f);else if("R"==a.charAt(0))this.spinner.stop(),b=decodeURIComponent(a.substring(1)),"<"!=b.charAt(0)&&(b=this.editor.graph.decompress(b)),
|
||||
b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),b.getHash=function(){return a},this.fileLoaded(b);else if("U"==a.charAt(0)){var d=decodeURIComponent(a.substring(1));this.loadTemplate(d,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var e=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var f=d,g=d.lastIndexOf("."),k=f.lastIndexOf("/");g>k&&0<k&&(f=f.substring(k+1,g),g=d.substring(g),".png"==
|
||||
g&&(g=".xml"),".svg"===g||".xml"===g||".html"===g)&&(e=f+g)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);b.getHash=function(){return a};this.fileLoaded(b)||"https://drive.google.com/uc?id="!=d.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+d.substring(31,d.lastIndexOf("&")),c),!0):!1}),!b()&&this.spinner.spin(document.body,
|
||||
mxResources.get("loading"))&&this.addListener("clientLoaded",b))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else b=null,"G"==a.charAt(0)?b=this.drive:"D"==a.charAt(0)?b=this.dropbox:"W"==a.charAt(0)?b=this.oneDrive:"H"==a.charAt(0)&&(b=this.gitHub),null==b?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=
|
||||
this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),b.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),
|
||||
b=this.getCurrentFile(),e=mxUtils.bind(this,function(){null!=b&&b.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=b&&(window.location.hash=b.getHash())}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()});null==a||0==a.length?e():null!=b&&b.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,e):e()};
|
||||
App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor!=LocalLibrary&&(c+="\n"+a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?c+=" ("+mxResources.get("github")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+
|
||||
mxResources.get("device")+")");return c};
|
||||
App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(c){if(null!=c)for(var d=0;d<c.length;d++){var b=encodeURIComponent(decodeURIComponent(c[d]));mxUtils.bind(this,function(b){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){this.pendingLibraries[b]=!0;var c=b.substring(0,
|
||||
|
|
2
war/js/atlas-viewer.min.js
vendored
2
war/js/atlas-viewer.min.js
vendored
|
@ -2572,7 +2572,7 @@ IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R
|
|||
IMAGE_PATH+"/spin.gif";Editor.tweetImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARlJREFUeNpi/P//PwM1ABMDlQDVDGKAeo0biMXwKOMD4ilA/AiInwDxfCBWBeIgINYDmwE1yB2Ir0Alsbl6JchONPwNiC8CsTPIDJjXuIBYG4gPAnE8EDMjGaQCxGFYLOAEYlYg/o3sNSkgfo1k2ykgLgRiIyAOwOIaGE6CmwE1SA6IZ0BNR1f8GY9BXugG2UMN+YtHEzr+Aw0OFINYgHgdCYaA8HUgZkM3CASEoYb9ItKgapQkhGQQKC0dJdKQx1CLsRoEArpAvAuI3+Ix5B8Q+2AkaiyZVgGId+MwBBQhKVhzB9QgKyDuAOJ90BSLzZBzQOyCK5uxQNnXoGlJHogfIOU7UCI9C8SbgHgjEP/ElRkZB115BBBgAPbkvQ/azcC0AAAAAElFTkSuQmCC":
|
||||
IMAGE_PATH+"/tweet.png";Editor.facebookImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAARVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADc6ur3AAAAFnRSTlMAYmRg2KVCC/oPq0uAcVQtHtvZuoYh/a7JUAAAAGJJREFUGNOlzkkOgCAMQNEvagvigBP3P6pRNoCJG/+myVu0RdsqxcQqQ/NFVkKQgqwDzoJ2WKajoB66atcAa0GjX0D8lJHwNGfknYJzY77LDtDZ+L74j0z26pZI2yYlMN9TL17xEd+fl1D+AAAAAElFTkSuQmCC":IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
|
||||
Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node width. Possible value are px or auto. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value are px or auto. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -26\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
|
||||
Editor.configure=function(a){ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;"1"==urlParams.dev&&
|
||||
Editor.configure=function(a){Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;"1"==urlParams.dev&&
|
||||
(Editor.prototype.editBlankUrl+="&dev=1",Editor.prototype.editBlankFallbackUrl+="&dev=1");var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var c=b.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],d=c.getElementsByTagName("div");null!=d&&0<d.length&&(c=d[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==b.nodeName){c=b.getAttribute("style")||"default-style2";
|
||||
if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled=
|
||||
"1"==urlParams.math||"1"==b.getAttribute("math");c=b.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;
|
||||
|
|
50
war/js/atlas.min.js
vendored
50
war/js/atlas.min.js
vendored
|
@ -2373,13 +2373,13 @@ this.getRubberband=function(){return p};var q=(new Date).getTime(),t=0,u=this.co
|
|||
var A=this.getCursorForCell;this.getCursorForCell=function(b){if(this.isEnabled())return A.apply(this,arguments);if(null!=this.getLinkForCell(b))return"pointer"};this.selectRegion=function(b,a){var d=this.getAllCells(b.x,b.y,b.width,b.height);this.selectCellsForEvent(d,a);return d};this.getAllCells=function(b,a,d,e,c,f){f=null!=f?f:[];if(0<d||0<e){var g=this.getModel(),k=b+d,l=a+e;null==c&&(c=this.getCurrentRoot(),null==c&&(c=g.getRoot()));if(null!=c)for(var m=g.getChildCount(c),n=0;n<m;n++){var p=
|
||||
g.getChildAt(c,n),q=this.view.getState(p);if(null!=q&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(q.style,"locked","0")){var v=mxUtils.getValue(q.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(q=mxUtils.getBoundingBox(q,v));(g.isEdge(p)||g.isVertex(p))&&q.x>=b&&q.y+q.height<=l&&q.y>=a&&q.x+q.width<=k&&f.push(p);this.getAllCells(b,a,d,e,p,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?
|
||||
!1:C.apply(this,arguments)};this.isCellLocked=function(b){for(b=this.view.getState(b);null!=b;){if("1"==mxUtils.getValue(b.style,"locked","0"))return!0;b=this.view.getState(this.model.getParent(b.cell))}return!1};var E=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,a){if("mouseDown"==a.getProperty("eventName")){var d=a.getProperty("event").getState();E=null==d||this.isSelectionEmpty()||this.isCellSelected(d.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
|
||||
mxUtils.bind(this,function(b,a){if(!mxEvent.isMultiTouchEvent(a)){var d=a.getProperty("event"),c=a.getProperty("cell");null==c?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=E?this.addSelectionCells(E):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);E=null;a.consume()}}));this.connectionHandler.selectCells=function(b,a){this.graph.setSelectionCell(a||b)};this.connectionHandler.constraintHandler.isStateIgnored=
|
||||
mxUtils.bind(this,function(b,a){if(!mxEvent.isMultiTouchEvent(a)){var d=a.getProperty("event"),e=a.getProperty("cell");null==e?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=E?this.addSelectionCells(E):1<this.getSelectionCount()&&this.isCellSelected(e)&&this.removeSelectionCell(e);E=null;a.consume()}}));this.connectionHandler.selectCells=function(b,a){this.graph.setSelectionCell(a||b)};this.connectionHandler.constraintHandler.isStateIgnored=
|
||||
function(b,a){return a&&b.view.graph.isCellSelected(b.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var F=this.updateMouseEvent;this.updateMouseEvent=function(b){b=F.apply(this,arguments);this.isCellLocked(b.getCell())&&(b.state=null);return b}}};
|
||||
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";
|
||||
Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;
|
||||
Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=window!=window.top?document.referrer:document.location.toString();
|
||||
Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);mxEvent.addListener(f.node,"click",mxUtils.bind(this,function(d){for(var b=mxEvent.getSource(d);null!=b&&b!=f.node;){if("A"==b.nodeName){b=b.getAttribute("href");if(null!=b){var c=a.view.graph.isBlankLink(b)?a.view.graph.linkTarget:"_top",b=a.view.graph.getAbsoluteUrl(b);"_self"==c&&window!=window.top?window.location.href=
|
||||
b:window.open(b,c);mxEvent.consume(d)}break}b=b.parentNode}}))};this.initLayoutManager()};
|
||||
Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);mxEvent.addListener(f.node,"click",mxUtils.bind(this,function(d){for(var b=mxEvent.getSource(d);null!=b&&b!=f.node;){if("A"==b.nodeName){b=b.getAttribute("href");if(null!=b){var e=a.view.graph.isBlankLink(b)?a.view.graph.linkTarget:"_top",b=a.view.graph.getAbsoluteUrl(b);"_self"==e&&window!=window.top?window.location.href=
|
||||
b:window.open(b,e);mxEvent.consume(d)}break}b=b.parentNode}}))};this.initLayoutManager()};
|
||||
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a);a=null!=c?c.style:this.graph.getCellStyle(a);return"stackLayout"==a.childLayout?(c=new mxStackLayout(this.graph,!0),c.resizeParentMax=!0,c.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),c.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),c.resizeLast="1"==mxUtils.getValue(a,"resizeLast","0"),c.marginLeft=a.marginLeft||
|
||||
0,c.marginRight=a.marginRight||0,c.marginTop=a.marginTop||0,c.marginBottom=a.marginBottom||0,c.fill=!0,c):"treeLayout"==a.childLayout?(c=new mxCompactTreeLayout(this.graph),c.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),c.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),c.groupPadding=mxUtils.getValue(a,"parentPadding",20),c.levelDistance=mxUtils.getValue(a,"treeLevelDistance",30),c.maintainParentLocation=!0,c.edgeRouting=!1,c.resetEdges=!1,c):"flowLayout"==a.childLayout?(c=new mxHierarchicalLayout(this.graph,
|
||||
mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),c.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),c.parentBorder=mxUtils.getValue(a,"parentPadding",20),c.maintainParentLocation=!0,c.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),c.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),c.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),
|
||||
|
@ -2481,8 +2481,8 @@ Graph.prototype.isValidRoot=function(b){for(var a=this.model.getChildCount(b),d=
|
|||
arguments);null!=a&&(a.width+=10,a.height+=4,this.gridEnabled&&(a.width=this.snap(a.width),a.height=this.snap(a.height)));return a};Graph.prototype.turnShapes=function(b){var a=this.getModel(),d=[];a.beginUpdate();try{for(var c=0;c<b.length;c++){var e=b[c];if(a.isEdge(e)){var f=a.getTerminal(e,!0),g=a.getTerminal(e,!1);a.setTerminal(e,g,!0);a.setTerminal(e,f,!1);var k=a.getGeometry(e);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var l=k.getTerminalPoint(!0),m=k.getTerminalPoint(!1);
|
||||
k.setTerminalPoint(l,!1);k.setTerminalPoint(m,!0);a.setGeometry(e,k);var n=this.view.getState(e),p=this.view.getState(f),q=this.view.getState(g);if(null!=n){var v=null!=p?this.getConnectionConstraint(n,p,!0):null,t=null!=q?this.getConnectionConstraint(n,q,!1):null;this.setConnectionConstraint(e,f,!0,t);this.setConnectionConstraint(e,g,!1,v)}d.push(e)}}else if(a.isVertex(e)&&(k=this.getCellGeometry(e),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var u=k.width;k.width=k.height;
|
||||
k.height=u;a.setGeometry(e,k);var x=this.view.getState(e);if(null!=x){var z=x.style[mxConstants.STYLE_DIRECTION]||"east";"east"==z?z="south":"south"==z?z="west":"west"==z?z="north":"north"==z&&(z="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,z,[e])}d.push(e)}}}finally{a.endUpdate()}return d};Graph.prototype.processChange=function(b){mxGraph.prototype.processChange.apply(this,arguments);if(b instanceof mxValueChange&&null!=b.cell.value&&"object"==typeof b.cell.value){var a=this.model.getDescendants(b.cell);
|
||||
if(0<a.length)for(var d=0;d<a.length;d++)this.isReplacePlaceholders(a[d])&&this.view.invalidate(a[d],!1,!1)}};Graph.prototype.cellLabelChanged=function(b,a,d){a=this.zapGremlins(a);this.model.beginUpdate();try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),e=b;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(c)){this.setAttributeForCell(e,c,a);break}e=
|
||||
this.model.getParent(e)}var f=b.value.cloneNode(!0);f.setAttribute("label",a);a=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(b){for(var a=[],d=0;d<b.length;d++)if(this.isCellDeletable(b[d])){var c=this.view.getState(b[d]);if(null!=c){var e=mxUtils.getValue(c.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(c.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e==mxConstants.NONE&&
|
||||
if(0<a.length)for(var d=0;d<a.length;d++)this.isReplacePlaceholders(a[d])&&this.view.invalidate(a[d],!1,!1)}};Graph.prototype.cellLabelChanged=function(b,a,d){a=this.zapGremlins(a);this.model.beginUpdate();try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var e=b.getAttribute("placeholder"),c=b;null!=c;){if(c==this.model.getRoot()||null!=c.value&&"object"==typeof c.value&&c.hasAttribute(e)){this.setAttributeForCell(c,e,a);break}c=
|
||||
this.model.getParent(c)}var f=b.value.cloneNode(!0);f.setAttribute("label",a);a=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(b){for(var a=[],d=0;d<b.length;d++)if(this.isCellDeletable(b[d])){var c=this.view.getState(b[d]);if(null!=c){var e=mxUtils.getValue(c.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(c.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e==mxConstants.NONE&&
|
||||
c==mxConstants.NONE&&a.push(b[d])}}b=a;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(b,a){this.setAttributeForCell(b,"link",a)};Graph.prototype.setTooltipForCell=function(b,a){this.setAttributeForCell(b,"tooltip",a)};Graph.prototype.setAttributeForCell=function(b,a,d){var c;null!=b.value&&"object"==typeof b.value?c=b.value.cloneNode(!0):(c=mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",b.value||""));null!=d&&
|
||||
0<d.length?c.setAttribute(a,d):c.removeAttribute(a);this.model.setValue(b,c)};Graph.prototype.getDropTarget=function(b,a,d,c){this.getModel();if(mxEvent.isAltDown(a))return null;for(var e=0;e<b.length;e++)if(this.model.isEdge(this.model.getParent(b[e])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(b){mxGraph.prototype.click.call(this,b);this.firstClickState=b.getState();this.firstClickSource=b.getSource()};Graph.prototype.dblClick=function(b,
|
||||
a){if(this.isEnabled()){var d=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b));if(null!=b&&!this.model.isVertex(a)){var c=this.model.isEdge(a)?this.view.getState(a):null,e=mxEvent.getSource(b);this.firstClickState!=c||this.firstClickSource!=e||null!=c&&null!=c.text&&null!=c.text.node&&(mxUtils.contains(c.text.boundingBox,d.x,d.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(b)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||
|
||||
|
@ -3042,7 +3042,7 @@ Toolbar.prototype.addClickHandler=function(a,c){null!=c&&(mxEvent.addListener(a,
|
|||
Toolbar.prototype.createLabel=function(a,c){var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");f.className="geLabel";mxUtils.write(f,a);return f};
|
||||
Toolbar.prototype.addMenuHandler=function(a,c,f,d){if(null!=f){var b=this.editorUi.editor.graph,e=null,g=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(k){if(g&&(null==a.enabled||a.enabled)){b.popupMenuHandler.hideMenu();e=new mxPopupMenu(f);e.div.className+=" geToolbarMenu";e.showDisabled=d;e.labels=c;e.autoExpand=!0;var l=mxUtils.getOffset(a);e.popup(l.x,l.y+a.offsetHeight,null,k);this.editorUi.setCurrentMenu(e,a);!c&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");
|
||||
e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}g=!0;mxEvent.consume(k)}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(b){g=this.currentElt!=a;null!=document.documentMode&&9<=document.documentMode&&b.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};
|
||||
function Dialog(a,c,f,d,b,e,g){var k=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(k=80);f+=k;d+=k;var l=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),m=Math.max(0,Math.round((document.body.scrollWidth-f)/2)),n=Math.max(0,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=Math.min(f,document.body.scrollWidth-64);d=Math.min(d,l-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);l=a.createDiv("geDialog");
|
||||
function Dialog(a,c,f,d,b,e,g){var k=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(k=80);f+=k;d+=k;var l=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),m=Math.max(1,Math.round((document.body.scrollWidth-f-64)/2)),n=Math.max(1,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(c.style.maxHeight="100%");f=Math.min(f,document.body.scrollWidth-64);d=Math.min(d,l-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);l=a.createDiv("geDialog");
|
||||
l.style.width=f+"px";l.style.height=d+"px";l.style.left=m+"px";l.style.top=n+"px";l.style.zIndex=this.zIndex;null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background="white",this.bg.style.left="0px",this.bg.style.top="0px",this.bg.style.bottom="0px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));b&&document.body.appendChild(this.bg);l.appendChild(c);
|
||||
document.body.appendChild(l);e&&(c=document.createElement("img"),c.setAttribute("src",Dialog.prototype.closeImage),c.setAttribute("title",mxResources.get("close")),c.className="geDialogClose",c.style.top=n+14+"px",c.style.left=m+f+38-k+"px",c.style.zIndex=this.zIndex,mxEvent.addListener(c,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(c),this.dialogImg=c,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(b){a.hideDialog(!0)})));this.onDialogClose=
|
||||
g;this.container=l;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
|
||||
|
@ -7517,7 +7517,7 @@ IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R
|
|||
IMAGE_PATH+"/spin.gif";Editor.tweetImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARlJREFUeNpi/P//PwM1ABMDlQDVDGKAeo0biMXwKOMD4ilA/AiInwDxfCBWBeIgINYDmwE1yB2Ir0Alsbl6JchONPwNiC8CsTPIDJjXuIBYG4gPAnE8EDMjGaQCxGFYLOAEYlYg/o3sNSkgfo1k2ykgLgRiIyAOwOIaGE6CmwE1SA6IZ0BNR1f8GY9BXugG2UMN+YtHEzr+Aw0OFINYgHgdCYaA8HUgZkM3CASEoYb9ItKgapQkhGQQKC0dJdKQx1CLsRoEArpAvAuI3+Ix5B8Q+2AkaiyZVgGId+MwBBQhKVhzB9QgKyDuAOJ90BSLzZBzQOyCK5uxQNnXoGlJHogfIOU7UCI9C8SbgHgjEP/ElRkZB115BBBgAPbkvQ/azcC0AAAAAElFTkSuQmCC":
|
||||
IMAGE_PATH+"/tweet.png";Editor.facebookImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAARVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADc6ur3AAAAFnRSTlMAYmRg2KVCC/oPq0uAcVQtHtvZuoYh/a7JUAAAAGJJREFUGNOlzkkOgCAMQNEvagvigBP3P6pRNoCJG/+myVu0RdsqxcQqQ/NFVkKQgqwDzoJ2WKajoB66atcAa0GjX0D8lJHwNGfknYJzY77LDtDZ+L74j0z26pZI2yYlMN9TL17xEd+fl1D+AAAAAElFTkSuQmCC":IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
|
||||
Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node width. Possible value are px or auto. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value are px or auto. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -26\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
|
||||
Editor.configure=function(a){ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;"1"==urlParams.dev&&
|
||||
Editor.configure=function(a){Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;"1"==urlParams.dev&&
|
||||
(Editor.prototype.editBlankUrl+="&dev=1",Editor.prototype.editBlankFallbackUrl+="&dev=1");var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var c=b.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],d=c.getElementsByTagName("div");null!=d&&0<d.length&&(c=d[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==b.nodeName){c=b.getAttribute("style")||"default-style2";
|
||||
if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled=
|
||||
"1"==urlParams.math||"1"==b.getAttribute("math");c=b.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var c=Editor.prototype.getGraphXml;
|
||||
|
@ -7559,7 +7559,7 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
|
|||
[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=
|
||||
[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
|
||||
[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return t.apply(this,arguments)}})();
|
||||
(function(){EditorUi.VERSION="6.6.2";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;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=
|
||||
(function(){EditorUi.VERSION="6.6.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;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;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;
|
||||
EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=
|
||||
null!=c&&6<c.length}catch(p){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})();
|
||||
|
@ -7806,18 +7806,18 @@ App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugin
|
|||
App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var c=document.cookie.split(";"),f=0;f<c.length;f++){var d=mxUtils.trim(c[f]);if("MODE="==d.substring(0,5)){a=d.substring(5);break}}null!=a&&isLocalStorage&&(c=new Date,c.setYear(c.getFullYear()-1),document.cookie="MODE=; expires="+c.toUTCString(),localStorage.setItem(".mode",a))}return a};
|
||||
(function(){if(!mxClient.IS_CHROMEAPP&&("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
|
||||
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
|
||||
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&!/(iPad|iPhone|iPod)/.test(navigator.userAgent)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
|
||||
null):window.OneDriveClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")),"0"!=urlParams.plugins&&"1"!=urlParams.offline)){var a=mxSettings.getPlugins(),c=urlParams.p;if(null!=c||null!=a&&0<a.length)App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)};if(null!=c)for(var f=c.split(";"),c=0;c<f.length;c++){var d=App.pluginRegistry[f[c]];null!=d?mxscript(d):null!=window.console&&console.log("Unknown plugin:",f[c])}if(null!=a&&0<a.length&&
|
||||
"0"!=urlParams.plugins){f=window.location.protocol+"//"+window.location.host;d=!0;for(c=0;c<a.length&&d;c++)"/"!=a[c].charAt(0)&&a[c].substring(0,f.length)!=f&&(d=!1);if(d||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[a.join("\n")]).replace(/\\n/g,"\n")))for(c=0;c<a.length;c++)try{mxscript(a[c])}catch(b){}}}})();
|
||||
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
|
||||
null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")),"0"!=urlParams.plugins&&"1"!=urlParams.offline)){var a=mxSettings.getPlugins(),c=urlParams.p;if(null!=c||null!=a&&0<a.length)App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)};if(null!=c)for(var f=c.split(";"),c=0;c<f.length;c++){var d=App.pluginRegistry[f[c]];null!=d?mxscript(d):null!=window.console&&console.log("Unknown plugin:",f[c])}if(null!=a&&0<a.length&&"0"!=urlParams.plugins){f=window.location.protocol+
|
||||
"//"+window.location.host;d=!0;for(c=0;c<a.length&&d;c++)"/"!=a[c].charAt(0)&&a[c].substring(0,f.length)!=f&&(d=!1);if(d||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[a.join("\n")]).replace(/\\n/g,"\n")))for(c=0;c<a.length;c++)try{mxscript(a[c])}catch(b){}}}})();
|
||||
App.main=function(a){var c=null;window.onerror=function(a,b,e,f,k){try{if(a!=c&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){c=a;var d=new Image,g=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";d.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+
|
||||
encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(e)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(n){}};"atlas"==uiTheme&&mxClient.link("stylesheet","styles/atlas.css");if(null!=window.mxscript){"0"!=urlParams.chrome&&mxscript("js/jscolor/jscolor.js");if("1"==urlParams.offline){mxscript("js/shapes.min.js");var f=document.createElement("iframe");f.setAttribute("width","0");f.setAttribute("height",
|
||||
"0");f.setAttribute("src","offline.html");document.body.appendChild(f);mxStencilRegistry.stencilSet={};mxStencilRegistry.getStencil=function(a){return mxStencilRegistry.stencils[a]};mxStencilRegistry.loadStencilSet=function(a,b,c){a=a.substring(a.indexOf("/")+1);a="mxgraph."+a.substring(0,a.length-4).replace(/\//g,".");a=mxStencilRegistry.stencilSet[a];null!=a&&mxStencilRegistry.parseStencilSet(a,b,!1)};for(f=mxUtils.load("stencils.xml").getXml().documentElement.firstChild;null!=f;)"shapes"==f.nodeName&&
|
||||
null!=f.getAttribute("name")&&(mxStencilRegistry.stencilSet[f.getAttribute("name").toLowerCase()]=f,mxStencilRegistry.parseStencilSet(f)),f=f.nextSibling}"0"==urlParams.picker||mxClient.IS_QUIRKS||8==document.documentMode||mxscript(document.location.protocol+"//www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22picker%22%2C%22version%22%3A%221%22%2C%22language%22%3A%22"+mxClient.language+"%22%7D%5D%7D");"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&
|
||||
"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback"):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();mxResources.loadDefaultBundle=!1;f=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?
|
||||
[f]:[f,STYLE_PATH+"/default.xml"],function(c){mxResources.parse(c[0].getText());1<c.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=c[1].getDocumentElement());c=new App(new Editor("0"==urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,
|
||||
function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!/(iPad|iPhone|iPod)/.test(navigator.userAgent)&&(0>navigator.userAgent.indexOf("MSIE")||
|
||||
10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null)}null!=a&&a(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:","1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))},function(){document.getElementById("geStatus").innerHTML=
|
||||
'Error loading page. <a href="javascript:void(0);" onclick="location.reload();">Please try refreshing.</a>'})};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
|
||||
function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,
|
||||
window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null)}null!=a&&a(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:","1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))},function(){document.getElementById("geStatus").innerHTML='Error loading page. <a href="javascript:void(0);" onclick="location.reload();">Please try refreshing.</a>'})};
|
||||
mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
|
||||
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
|
||||
IMAGE_PATH+"/chevron-up.png";
|
||||
App.prototype.chevronDownImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC":IMAGE_PATH+
|
||||
|
@ -7877,7 +7877,7 @@ this.getServiceCount(!0);var c=4>=a?4:3,b=new CreateDialog(this,b,mxUtils.bind(t
|
|||
this.showSplash()}));b.init()}}),c=decodeURIComponent(c);if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))try{null!=window.opener&&null!=window.opener[c]?d(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(b){this.handleError(b,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(a){d(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),f)}))}else(null==window.location.hash||1>=window.location.hash.length)&&
|
||||
null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(b){this.handleError(b)}};
|
||||
App.prototype.showSplash=function(a){var c=this.getServiceCount(!1),f=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>c?180:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=a)}))});if(this.editor.chromeless)this.handleError({message:mxResources.get("noFileSelected")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,
|
||||
function(){this.showSplash()}));else if(null==this.mode||a){a=4>=c?4:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();f()}),a);this.showDialog(d.container,100*a,c>a?420:300,!0,!1);d.init()}else null==urlParams.create&&f()};
|
||||
function(){this.showSplash()}));else if(null==this.mode||a){a=4>=c?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();f()}),a);this.showDialog(d.container,100*a,c>a?420:300,!0,!1);d.init()}else null==urlParams.create&&f()};
|
||||
App.prototype.addLanguageMenu=function(a){var c=null;this.isOfflineApp()&&!mxClient.IS_CHROMEAPP||null==this.menus.get("language")||(c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="geIcon geSprite geSprite-globe",c.style.position="absolute",c.style.cursor="pointer",c.style.bottom="20px",c.style.right="20px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(this.menus.get("language").funct);
|
||||
d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxUtils.getOffset(c);d.popup(b.x,b.y+c.offsetHeight,null,a);this.setCurrentMenu(d)})),a.appendChild(c));return c};
|
||||
App.prototype.defineCustomObjects=function(){null!=gapi.drive.realtime&&null!=gapi.drive.realtime.custom&&(gapi.drive.realtime.custom.registerType(mxRtCell,"Cell"),mxRtCell.prototype.cellId=gapi.drive.realtime.custom.collaborativeField("cellId"),mxRtCell.prototype.type=gapi.drive.realtime.custom.collaborativeField("type"),mxRtCell.prototype.value=gapi.drive.realtime.custom.collaborativeField("value"),mxRtCell.prototype.xmlValue=gapi.drive.realtime.custom.collaborativeField("xmlValue"),mxRtCell.prototype.style=
|
||||
|
@ -7895,9 +7895,9 @@ k,b,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.l
|
|||
function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),l,b):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,k,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,c)}),l,b):d==App.MODE_BROWSER?(b=mxUtils.bind(this,function(){var b=new StorageLibrary(this,k,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,c)}),l)}),
|
||||
null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(b||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(k);var m=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);e||this.libraryLoaded(f,c);null!=g&&g()}),l)});if(a!=f.getTitle()){var n=f.getHash();f.rename(a,mxUtils.bind(this,function(a){f.constructor!=
|
||||
LocalLibrary&&n!=f.getHash()&&(mxSettings.removeCustomLibrary(n),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(n);m()}),l)}else m()}};
|
||||
App.prototype.saveFile=function(a){var c=this.getCurrentFile();if(null!=c){var f=mxUtils.bind(this,function(){this.removeDraft();c.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==c.getTitle()||null==this.mode){var d=null!=c.getTitle()?c.getTitle():this.defaultFilename,b=!mxClient.IS_IOS||!navigator.standalone,e=this.mode;a=this.getServiceCount(!0);var g=4>=a?4:3,d=new CreateDialog(this,d,mxUtils.bind(this,
|
||||
function(a,b){null!=a&&0<a.length&&(null==e&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,f)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),window.open(this.getUrl(window.location.pathname))):e!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),
|
||||
null,b,f,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,f))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,b,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,g);this.showDialog(d.container,460,a>g?390:270,!0,!0);d.init()}else this.save(c.getTitle(),f)}};
|
||||
App.prototype.saveFile=function(a){var c=this.getCurrentFile();if(null!=c){var f=mxUtils.bind(this,function(){this.removeDraft();c.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==c.getTitle()||null==this.mode){var d=null!=c.getTitle()?c.getTitle():this.defaultFilename,b=!mxClient.IS_IOS||!navigator.standalone,e=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var g=4>=a?2:3,d=new CreateDialog(this,
|
||||
d,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==e&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,f)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),window.open(this.getUrl(window.location.pathname))):e!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
|
||||
/(\.html)$/i.test(a)),null,b,f,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,f))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,b,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,g);this.showDialog(d.container,460,a>g?390:270,!0,!0);d.init()}else this.save(c.getTitle(),f)}};
|
||||
EditorUi.prototype.loadTemplate=function(a,c,f){var d=a;this.isCorsEnabledForUrl(d)||(d=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(d,mxUtils.bind(this,function(b){!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&c(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(b=this.extractGraphModelFromPng(b)),
|
||||
c(b))}),f,/(\.png)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:null};
|
||||
App.prototype.createFile=function(a,c,f,d,b,e,g,k){d=k?null:null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var l=mxUtils.bind(this,function(){this.spinner.stop()}),m=mxUtils.bind(this,function(a){l();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});d==App.MODE_GOOGLE&&null!=this.drive?(g=null!=this.stateArg?this.stateArg.folderId:g,this.drive.insertFile(a,c,g,mxUtils.bind(this,
|
||||
|
@ -7908,13 +7908,13 @@ document.body.appendChild(k.container);node=e;if(null!=node){var l=null;if("diag
|
|||
this.editor.graph;try{this.editor.graph=k,this.editor.setGraphXml(node)}catch(t){}finally{this.editor.graph=m}}a.setData(this.createFileData(e,k,a,g));null!=k&&k.container.parentNode.removeChild(k.container);var p=mxUtils.bind(this,function(){this.spinner.stop()}),q=mxUtils.bind(this,function(){p();var e=this.getCurrentFile();null==f&&null!=e&&(f=!e.isModified()&&null==e.getMode());var g=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);f&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));
|
||||
null!=c&&this.sidebar.showEntries(c)}),k=mxUtils.bind(this,function(){f||null==e||!e.isModified()?g():this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==f||f?k():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=d&&d(),window.openWindow(b,null,k))});a.constructor==LocalFile||a.constructor==DriveFile?
|
||||
q():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){q()}),mxUtils.bind(this,function(a){p();this.handleError(a)}))}};
|
||||
App.prototype.loadFile=function(a,c,f){this.hideDialog();var d=mxUtils.bind(this,function(){if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var b=localStorage.getItem(a);if(null!=b)this.fileLoaded(new StorageFile(this,b,a));else throw{message:mxResources.get("fileNotFound")};}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();
|
||||
window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=f)this.spinner.stop(),this.fileLoaded(f);else if("R"==a.charAt(0))this.spinner.stop(),b=decodeURIComponent(a.substring(1)),"<"!=b.charAt(0)&&(b=this.editor.graph.decompress(b)),b=new LocalFile(this,b,null!=urlParams.title?
|
||||
decodeURIComponent(urlParams.title):this.defaultFilename,!0),b.getHash=function(){return a},this.fileLoaded(b);else if("U"==a.charAt(0)){var d=decodeURIComponent(a.substring(1));this.loadTemplate(d,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var e=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var f=d,g=d.lastIndexOf("."),k=f.lastIndexOf("/");g>k&&0<k&&(f=f.substring(k+1,g),g=d.substring(g),".png"==g&&(g=".xml"),".svg"===g||".xml"===g||".html"===
|
||||
g)&&(e=f+g)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);b.getHash=function(){return a};this.fileLoaded(b)||"https://drive.google.com/uc?id="!=d.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+d.substring(31,d.lastIndexOf("&")),c),!0):!1}),!b()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",
|
||||
b))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else b=null,"G"==a.charAt(0)?b=this.drive:"D"==a.charAt(0)?b=this.dropbox:"W"==a.charAt(0)?b=this.oneDrive:"H"==a.charAt(0)&&(b=this.gitHub),null==b?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():
|
||||
""})):(a=decodeURIComponent(a.substring(1)),b.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),b=this.getCurrentFile(),e=mxUtils.bind(this,function(){null!=
|
||||
b&&b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()});null==a||0==a.length?(this.editor.setStatus(""),this.fileLoaded(null)):null!=b&&b.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,e):e()};
|
||||
App.prototype.loadFile=function(a,c,f){this.hideDialog();var d=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var b=localStorage.getItem(a);if(null!=b)this.fileLoaded(new StorageFile(this,b,a));else throw{message:mxResources.get("fileNotFound")};}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"),
|
||||
mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=f)this.spinner.stop(),this.fileLoaded(f);else if("R"==a.charAt(0))this.spinner.stop(),b=decodeURIComponent(a.substring(1)),"<"!=b.charAt(0)&&(b=this.editor.graph.decompress(b)),
|
||||
b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),b.getHash=function(){return a},this.fileLoaded(b);else if("U"==a.charAt(0)){var d=decodeURIComponent(a.substring(1));this.loadTemplate(d,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var e=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var f=d,g=d.lastIndexOf("."),k=f.lastIndexOf("/");g>k&&0<k&&(f=f.substring(k+1,g),g=d.substring(g),".png"==
|
||||
g&&(g=".xml"),".svg"===g||".xml"===g||".html"===g)&&(e=f+g)}b=new LocalFile(this,b,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);b.getHash=function(){return a};this.fileLoaded(b)||"https://drive.google.com/uc?id="!=d.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),b=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+d.substring(31,d.lastIndexOf("&")),c),!0):!1}),!b()&&this.spinner.spin(document.body,
|
||||
mxResources.get("loading"))&&this.addListener("clientLoaded",b))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else b=null,"G"==a.charAt(0)?b=this.drive:"D"==a.charAt(0)?b=this.dropbox:"W"==a.charAt(0)?b=this.oneDrive:"H"==a.charAt(0)&&(b=this.gitHub),null==b?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=
|
||||
this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),b.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a)}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),
|
||||
b=this.getCurrentFile(),e=mxUtils.bind(this,function(){null!=b&&b.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=b&&(window.location.hash=b.getHash())}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()});null==a||0==a.length?e():null!=b&&b.isModified()&&!c?window.openWindow(this.getUrl()+"#"+a,null,e):e()};
|
||||
App.prototype.getLibraryStorageHint=function(a){var c=a.getTitle();a.constructor!=LocalLibrary&&(c+="\n"+a.getHash());a.constructor==DriveLibrary?c+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?c+=" ("+mxResources.get("github")+")":a.constructor==DropboxLibrary?c+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?c+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?c+=" ("+mxResources.get("browser")+")":a.constructor==LocalLibrary&&(c+=" ("+
|
||||
mxResources.get("device")+")");return c};
|
||||
App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),c=mxUtils.bind(this,function(c){if(null!=c)for(var d=0;d<c.length;d++){var b=encodeURIComponent(decodeURIComponent(c[d]));mxUtils.bind(this,function(b){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){this.pendingLibraries[b]=!0;var c=b.substring(0,
|
||||
|
|
|
@ -320,8 +320,7 @@ App.getStoredMode = function()
|
|||
// Loads OneDrive for all browsers but IE6/IOS if not disabled or if enabled and in embed mode
|
||||
if (typeof window.OneDriveClient === 'function')
|
||||
{
|
||||
if (urlParams['od'] != '0' && !/(iPad|iPhone|iPod)/.test(navigator.userAgent) &&
|
||||
(navigator.userAgent.indexOf('MSIE') < 0 || document.documentMode >= 10))
|
||||
if (urlParams['od'] != '0' && (navigator.userAgent.indexOf('MSIE') < 0 || document.documentMode >= 10))
|
||||
{
|
||||
// Immediately loads client
|
||||
if (App.mode == App.MODE_ONEDRIVE || (window.location.hash != null &&
|
||||
|
@ -627,8 +626,7 @@ App.main = function(callback)
|
|||
if (typeof window.OneDriveClient === 'function' &&
|
||||
(typeof OneDrive === 'undefined' && window.DrawOneDriveClientCallback != null &&
|
||||
(((urlParams['embed'] != '1' && urlParams['od'] != '0') || (urlParams['embed'] == '1' &&
|
||||
urlParams['od'] == '1')) && !/(iPad|iPhone|iPod)/.test(navigator.userAgent) &&
|
||||
(navigator.userAgent.indexOf('MSIE') < 0 || document.documentMode >= 10))))
|
||||
urlParams['od'] == '1')) && (navigator.userAgent.indexOf('MSIE') < 0 || document.documentMode >= 10))))
|
||||
{
|
||||
mxscript(App.ONEDRIVE_URL, window.DrawOneDriveClientCallback);
|
||||
}
|
||||
|
@ -2413,7 +2411,7 @@ App.prototype.showSplash = function(force)
|
|||
}
|
||||
else if (this.mode == null || force)
|
||||
{
|
||||
var rowLimit = (serviceCount <= 4) ? 4 : 3;
|
||||
var rowLimit = (serviceCount <= 4) ? 2 : 3;
|
||||
|
||||
var dlg = new StorageDialog(this, mxUtils.bind(this, function()
|
||||
{
|
||||
|
@ -2921,9 +2919,14 @@ App.prototype.saveFile = function(forceDialog)
|
|||
var filename = (file.getTitle() != null) ? file.getTitle() : this.defaultFilename;
|
||||
var allowTab = !mxClient.IS_IOS || !navigator.standalone;
|
||||
var prev = this.mode;
|
||||
|
||||
var serviceCount = this.getServiceCount(true);
|
||||
var rowLimit = (serviceCount <= 4) ? 4 : 3;
|
||||
|
||||
if (isLocalStorage)
|
||||
{
|
||||
serviceCount++;
|
||||
}
|
||||
|
||||
var rowLimit = (serviceCount <= 4) ? 2 : 3;
|
||||
|
||||
var dlg = new CreateDialog(this, filename, mxUtils.bind(this, function(name, mode)
|
||||
{
|
||||
|
@ -3376,7 +3379,12 @@ App.prototype.loadFile = function(id, sameWindow, file)
|
|||
|
||||
var fn2 = mxUtils.bind(this, function()
|
||||
{
|
||||
if (this.spinner.spin(document.body, mxResources.get('loading')))
|
||||
if (id == null || id.length == 0)
|
||||
{
|
||||
this.editor.setStatus('');
|
||||
this.fileLoaded(null);
|
||||
}
|
||||
else if (this.spinner.spin(document.body, mxResources.get('loading')))
|
||||
{
|
||||
// Handles files from localStorage
|
||||
if (id.charAt(0) == 'L')
|
||||
|
@ -3597,15 +3605,19 @@ App.prototype.loadFile = function(id, sameWindow, file)
|
|||
}
|
||||
else
|
||||
{
|
||||
this.confirm(mxResources.get('allChangesLost'), null, fn2,
|
||||
mxResources.get('cancel'), mxResources.get('discardChanges'));
|
||||
this.confirm(mxResources.get('allChangesLost'), mxUtils.bind(this, function()
|
||||
{
|
||||
if (currentFile != null)
|
||||
{
|
||||
window.location.hash = currentFile.getHash();
|
||||
}
|
||||
}), fn2, mxResources.get('cancel'), mxResources.get('discardChanges'));
|
||||
}
|
||||
});
|
||||
|
||||
if (id == null || id.length == 0)
|
||||
{
|
||||
this.editor.setStatus('');
|
||||
this.fileLoaded(null);
|
||||
fn();
|
||||
}
|
||||
else if (currentFile != null && currentFile.isModified() && !sameWindow)
|
||||
{
|
||||
|
|
|
@ -114,44 +114,16 @@
|
|||
'Tessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
|
||||
|
||||
/**
|
||||
* Global configuration of the Editor. Possible configuration values are:
|
||||
*
|
||||
* - presetColors: array of color codes for upper palette, default is ColorDialog.prototype.presetColors (no leading #)
|
||||
* - defaultColors: array of color codes for the lower palette, default is ColorDialog.prototype.defaultColors (no leading #)
|
||||
* - defaultFonts: array of available font family names, default is Menus.prototype.defaultFonts
|
||||
* - defaultColorSchemes: array of array of available color schemes, default is StyleFormatPanel.prototype.defaultColorSchemes
|
||||
*
|
||||
* (code)
|
||||
* Editor.configure({defaultFonts: ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond',
|
||||
* 'Comic Sans MS', 'Courier New', 'Georgia', 'Lucida Console', 'Tahoma'],
|
||||
* presetColors: ['E6D0DE', 'CDA2BE', 'B5739D', 'E1D5E7', 'C3ABD0', 'A680B8', 'D4E1F5',
|
||||
* 'A9C4EB', '7EA6E0', 'D5E8D4', '9AC7BF', '67AB9F', 'D5E8D4', 'B9E0A5', '97D077', 'FFF2CC',
|
||||
* 'FFE599', 'FFD966', 'FFF4C3', 'FFCE9F', 'FFB570', 'F8CECC', 'F19C99', 'EA6B66'],
|
||||
* defaultColorSchemes: [[null, {fill: '#f5f5f5', stroke: '#666666'},
|
||||
* {fill: '#dae8fc', stroke: '#6c8ebf'}, {fill: '#d5e8d4', stroke: '#82b366'},
|
||||
* {fill: '#ffe6cc', stroke: '#d79b00'}, {fill: '#fff2cc', stroke: '#d6b656'},
|
||||
* {fill: '#f8cecc', stroke: '#b85450'}, {fill: '#e1d5e7', stroke: '#9673a6'}],
|
||||
* [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'}]]});
|
||||
* (end)
|
||||
* Global configuration of the Editor
|
||||
* see https://desk.draw.io/solution/articles/16000058316
|
||||
*/
|
||||
Editor.configure = function(config)
|
||||
{
|
||||
// LATER: DefaultFont and DefaultFontSize should override Graph's stylesheet,
|
||||
// default edge and vertex styles would have to be set before loading mxSettings
|
||||
Menus.prototype.defaultFonts = config.defaultFonts || Menus.prototype.defaultFonts;
|
||||
ColorDialog.prototype.presetColors = config.presetColors || ColorDialog.prototype.presetColors;
|
||||
ColorDialog.prototype.defaultColors = config.defaultColors || ColorDialog.prototype.defaultColors;
|
||||
Menus.prototype.defaultFonts = config.defaultFonts || Menus.prototype.defaultFonts;
|
||||
StyleFormatPanel.prototype.defaultColorSchemes = config.defaultColorSchemes || StyleFormatPanel.prototype.defaultColorSchemes;
|
||||
};
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ function VsdxExport(editorUi, resDir)
|
|||
|
||||
resDir = resDir || "js/diagramly/vsdx/resources"
|
||||
|
||||
var vsdxCanvas = new mxVsdxCanvas2D();
|
||||
/**
|
||||
* Fill the required files in vsdx format which are constants in our exporter
|
||||
* @param zip JSZip of vsdx file
|
||||
|
@ -39,11 +40,11 @@ function VsdxExport(editorUi, resDir)
|
|||
}
|
||||
}
|
||||
|
||||
var p1Id = that.VISIO_PAGES_RELS + "page1.xml.rels";
|
||||
//var p1Id = that.VISIO_PAGES_RELS + "page1.xml.rels";
|
||||
for (var i = 2; i <= pageCount; i++)
|
||||
{
|
||||
var fId = that.VISIO_PAGES_RELS + "page" + i + ".xml.rels";
|
||||
zip.file(fId, files[p1Id]);
|
||||
//var fId = that.VISIO_PAGES_RELS + "page" + i + ".xml.rels";
|
||||
//zip.file(fId, files[p1Id]);
|
||||
|
||||
var newPage = page1.cloneNode();
|
||||
newPage.setAttribute(that.PART_NAME, "/visio/pages/page" + i + ".xml");
|
||||
|
@ -62,63 +63,6 @@ function VsdxExport(editorUi, resDir)
|
|||
});
|
||||
};
|
||||
|
||||
function getModelExtAttributes(modelNode)
|
||||
{
|
||||
var attr = {};
|
||||
|
||||
try
|
||||
{
|
||||
var grid = modelNode.getAttribute("grid");
|
||||
attr['gridEnabled'] = grid? "1" == grid : true;
|
||||
|
||||
var gridSize = modelNode.getAttribute("gridSize");
|
||||
attr['gridSize'] = gridSize? parseFloat(gridSize) : 10;
|
||||
|
||||
var guides = modelNode.getAttribute("guides");
|
||||
attr['guidesEnabled'] = guides? "1" == guides : true;
|
||||
|
||||
var page = modelNode.getAttribute("page");
|
||||
attr['pageVisible'] = page? "1" == page : true;
|
||||
|
||||
var pageScale = modelNode.getAttribute("pageScale");
|
||||
attr['pageScale'] = pageScale? parseFloat(pageScale): 1;
|
||||
|
||||
var pageWidth = modelNode.getAttribute("pageWidth");
|
||||
attr['pageWidth'] = pageWidth? parseFloat(pageWidth) : 839;
|
||||
|
||||
var pageHeight = modelNode.getAttribute("pageHeight");
|
||||
attr['pageHeight'] = pageHeight? parseFloat(pageHeight) : 1188;
|
||||
|
||||
var background = modelNode.getAttribute("background");
|
||||
attr['backgroundClr'] = background? background : '#FFFFFF';
|
||||
|
||||
var math = modelNode.getAttribute("math");
|
||||
attr['mathEnabled'] = math? "1" == math : true;
|
||||
|
||||
var shadow = modelNode.getAttribute("shadow");
|
||||
attr['shadowVisible'] = shadow? "1" == shadow : false;
|
||||
|
||||
//these most probably not needed in vsdx
|
||||
var tooltips = modelNode.getAttribute("tooltips");
|
||||
attr['tooltips'] = tooltips? "1" == tooltips : true;
|
||||
|
||||
var connect = modelNode.getAttribute("connect");
|
||||
attr['connect'] = connect? "1" == connect : true;
|
||||
|
||||
var arrows = modelNode.getAttribute("arrows");
|
||||
attr['arrows'] = arrows? "1" == arrows : true;
|
||||
|
||||
var fold = modelNode.getAttribute("fold");
|
||||
attr['foldingEnabled'] = fold? "1" == fold : true;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
//nothing
|
||||
}
|
||||
return attr;
|
||||
};
|
||||
|
||||
|
||||
function getGraphAttributes(graph)
|
||||
{
|
||||
var attr = {};
|
||||
|
@ -166,50 +110,242 @@ function VsdxExport(editorUi, resDir)
|
|||
return row;
|
||||
};
|
||||
|
||||
function createGeoElem(cell, xmlDoc)
|
||||
function applyMxCellStyle(state, shape, xmlDoc)
|
||||
{
|
||||
var geoSec = xmlDoc.createElement("Section");
|
||||
var fillClr = state.style[mxConstants.STYLE_FILLCOLOR];
|
||||
|
||||
geoSec.setAttribute("N", "Geometry");
|
||||
geoSec.setAttribute("IX", "0");
|
||||
if (!fillClr || fillClr == "none")
|
||||
{
|
||||
shape.appendChild(createCellElem("FillPattern", 0, xmlDoc));
|
||||
}
|
||||
else
|
||||
{
|
||||
shape.appendChild(createCellElem("FillForegnd", fillClr, xmlDoc));
|
||||
var gradClr = state.style[mxConstants.STYLE_GRADIENTCOLOR];
|
||||
|
||||
if (gradClr && gradClr != "none")
|
||||
{
|
||||
shape.appendChild(createCellElem("FillBkgnd", gradClr, xmlDoc));
|
||||
|
||||
var gradDir = state.style[mxConstants.STYLE_GRADIENT_DIRECTION];
|
||||
var dir = 28;
|
||||
|
||||
if (gradDir)
|
||||
{
|
||||
switch(gradDir)
|
||||
{
|
||||
case mxConstants.DIRECTION_EAST:
|
||||
dir = 25;
|
||||
break
|
||||
case mxConstants.DIRECTION_WEST:
|
||||
dir = 27;
|
||||
break
|
||||
case mxConstants.DIRECTION_NORTH:
|
||||
dir = 30;
|
||||
break
|
||||
}
|
||||
}
|
||||
shape.appendChild(createCellElem("FillPattern", dir, xmlDoc));
|
||||
}
|
||||
}
|
||||
|
||||
var strokeClr = state.style[mxConstants.STYLE_STROKECOLOR];
|
||||
|
||||
//now just create a rectangle
|
||||
geoSec.appendChild(createRow("MoveTo", "1", 0, 0, xmlDoc));
|
||||
geoSec.appendChild(createRow("RelLineTo", "2", 1, 0, xmlDoc));
|
||||
geoSec.appendChild(createRow("RelLineTo", "3", 1, 1, xmlDoc));
|
||||
geoSec.appendChild(createRow("RelLineTo", "4", 0, 1, xmlDoc));
|
||||
geoSec.appendChild(createRow("RelLineTo", "5", 0, 0, xmlDoc));
|
||||
if (!strokeClr || strokeClr == "none")
|
||||
shape.appendChild(createCellElem("LinePattern", 0, xmlDoc));
|
||||
else
|
||||
shape.appendChild(createCellElem("LineColor", strokeClr, xmlDoc));
|
||||
|
||||
var strokeW = state.style[mxConstants.STYLE_STROKEWIDTH];
|
||||
if (strokeW) shape.appendChild(createCellElemScaled("LineWeight", strokeW, xmlDoc));
|
||||
|
||||
return geoSec;
|
||||
|
||||
var opacity = state.style[mxConstants.STYLE_OPACITY];
|
||||
var fillOpaq;
|
||||
var strkOpaq;
|
||||
|
||||
if (opacity)
|
||||
{
|
||||
fillOpaq = opacity;
|
||||
strkOpaq = opacity;
|
||||
}
|
||||
else
|
||||
{
|
||||
fillOpaq = state.style[mxConstants.STYLE_FILL_OPACITY];
|
||||
strkOpaq = state.style[mxConstants.STYLE_STROKE_OPACITY];
|
||||
}
|
||||
|
||||
if (fillOpaq) shape.appendChild(createCellElem("FillForegndTrans", 1 - parseInt(fillOpaq)/100.0, xmlDoc));
|
||||
if (strkOpaq) shape.appendChild(createCellElem("LineColorTrans", 1 - parseInt(strkOpaq)/100.0, xmlDoc));
|
||||
|
||||
var isDashed = state.style[mxConstants.STYLE_DASHED];
|
||||
|
||||
if (isDashed == 1)
|
||||
{
|
||||
var dashPatrn = state.style[mxConstants.STYLE_DASH_PATTERN];
|
||||
var pattern = 9
|
||||
|
||||
if (dashPatrn)
|
||||
{
|
||||
//We only support the patterns of draw.io UI
|
||||
switch(dashPatrn)
|
||||
{
|
||||
case "1 1":
|
||||
pattern = 10;
|
||||
break;
|
||||
case "1 2":
|
||||
pattern = 3;
|
||||
break;
|
||||
case "1 4":
|
||||
pattern = 17;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
shape.appendChild(createCellElem("LinePattern", pattern, xmlDoc));
|
||||
}
|
||||
|
||||
var hasShadow = state.style[mxConstants.STYLE_SHADOW];
|
||||
|
||||
if (hasShadow == 1)
|
||||
{
|
||||
shape.appendChild(createCellElem("ShdwPattern", 1, xmlDoc));
|
||||
shape.appendChild(createCellElem("ShdwForegnd", '#000000', xmlDoc));
|
||||
shape.appendChild(createCellElem("ShdwForegndTrans", 0.6, xmlDoc));
|
||||
shape.appendChild(createCellElem("ShapeShdwType", 1, xmlDoc));
|
||||
shape.appendChild(createCellElem("ShapeShdwOffsetX", '0.02946278254943948', xmlDoc));
|
||||
shape.appendChild(createCellElem("ShapeShdwOffsetY", '-0.02946278254943948', xmlDoc));
|
||||
shape.appendChild(createCellElem("ShapeShdwScaleFactor", '1', xmlDoc));
|
||||
shape.appendChild(createCellElem("ShapeShdwBlur", '0.05555555555555555', xmlDoc));
|
||||
shape.appendChild(createCellElem("ShapeShdwShow", 2, xmlDoc));
|
||||
}
|
||||
|
||||
//Probably we don't need margins as the canvas get the modified position?
|
||||
/*
|
||||
var topMargin = state.style[mxConstants.STYLE_SPACING_TOP];
|
||||
if (topMargin) shape.appendChild(createCellElemScaled("TopMargin", parseFloat(topMargin) * 2 + 2.8 , xmlDoc));
|
||||
|
||||
/* //Defines label bottom spacing
|
||||
double bottomMargin = getBottomSpacing() * 100/100;
|
||||
|
||||
if (bottomMargin != 0)
|
||||
{
|
||||
styleMap.put(mxConstants.STYLE_SPACING_BOTTOM, Double.toString(bottomMargin));
|
||||
}
|
||||
|
||||
//Defines label left spacing
|
||||
double leftMargin = getLeftSpacing() * 100/100;
|
||||
|
||||
if (leftMargin != 0)
|
||||
{
|
||||
styleMap.put(mxConstants.STYLE_SPACING_LEFT, Double.toString(leftMargin));
|
||||
}
|
||||
|
||||
//Defines label right spacing
|
||||
double rightMargin = getRightSpacing() * 100/100;
|
||||
|
||||
if(rightMargin !=0)
|
||||
{
|
||||
styleMap.put(mxConstants.STYLE_SPACING_RIGHT, Double.toString(rightMargin));
|
||||
}*/
|
||||
|
||||
//Direction is not clear that we need it
|
||||
/*
|
||||
var direction = state.style[mxConstants.STYLE_DIRECTION];
|
||||
|
||||
if (direction != mxConstants.DIRECTION_EAST)
|
||||
{
|
||||
styleMap.put(mxConstants.STYLE_DIRECTION, direction);
|
||||
}
|
||||
*/
|
||||
|
||||
var flibX = state.style[mxConstants.STYLE_FLIPH];
|
||||
if (flibX == 1) shape.appendChild(createCellElem("FlipX", 1, xmlDoc));
|
||||
|
||||
var flibY = state.style[mxConstants.STYLE_FLIPV];
|
||||
if (flibY == 1) shape.appendChild(createCellElem("FlipY", 1, xmlDoc));
|
||||
|
||||
var rounded = state.style[mxConstants.STYLE_ROUNDED];
|
||||
if (rounded == 1) shape.appendChild(createCellElemScaled("Rounding", state.cell.geometry.width*0.1, xmlDoc));
|
||||
|
||||
//TODO for some reason, visio doesn't show the label (text) background color!
|
||||
var lbkgnd = state.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];
|
||||
if (lbkgnd) shape.appendChild(createCellElem("TextBkgnd", lbkgnd, xmlDoc));
|
||||
};
|
||||
|
||||
function convertMxCell2Shape(cell, graph, xmlDoc, parentHeight)
|
||||
function createShape(id, geo, xmlDoc, parentHeight)
|
||||
{
|
||||
var shape = xmlDoc.createElement("Shape");
|
||||
|
||||
shape.setAttribute("ID", id);
|
||||
shape.setAttribute("NameU", "Shape" + id);
|
||||
shape.setAttribute("LineStyle", "0");
|
||||
shape.setAttribute("FillStyle", "0");
|
||||
shape.setAttribute("TextStyle", "0");
|
||||
|
||||
var hw = geo.width/2, hh = geo.height/2;
|
||||
|
||||
shape.appendChild(createCellElemScaled("PinX", geo.x + hw, xmlDoc));
|
||||
shape.appendChild(createCellElemScaled("PinY", parentHeight - geo.y - hh, xmlDoc));
|
||||
shape.appendChild(createCellElemScaled("Width", geo.width, xmlDoc));
|
||||
shape.appendChild(createCellElemScaled("Height", geo.height, xmlDoc));
|
||||
shape.appendChild(createCellElemScaled("LocPinX", hw, xmlDoc));
|
||||
shape.appendChild(createCellElemScaled("LocPinY", hh, xmlDoc));
|
||||
|
||||
return shape;
|
||||
};
|
||||
|
||||
function convertMxCell2Shape(cell, graph, xmlDoc, parentHeight, parentGeo)
|
||||
{
|
||||
/*var state = graph.view.getState(cell);
|
||||
var shape = graph.cellRenderer.createShape(state);
|
||||
if (shape.checkBounds())
|
||||
shape.paint(new mxVsdxCanvas2D(xmlDoc));
|
||||
*/
|
||||
var geo = cell.geometry;
|
||||
|
||||
if (geo != null)
|
||||
{
|
||||
var shape = xmlDoc.createElement("Shape");
|
||||
if (geo.relative && parentGeo)
|
||||
{
|
||||
geo = geo.clone();
|
||||
geo.x *= parentGeo.width;
|
||||
geo.y *= parentGeo.height;
|
||||
geo.relative = 0;
|
||||
}
|
||||
|
||||
var shape = createShape(cell.id, geo, xmlDoc, parentHeight);
|
||||
|
||||
shape.setAttribute("ID", cell.id);
|
||||
shape.setAttribute("NameU", "NotYet");
|
||||
shape.setAttribute("Type", "Shape");
|
||||
var state = graph.view.getState(cell);
|
||||
|
||||
applyMxCellStyle(state, shape, xmlDoc);
|
||||
|
||||
var hw = geo.width/2, hh = geo.height/2;
|
||||
|
||||
shape.appendChild(createCellElemScaled("PinX", geo.x + hw, xmlDoc));
|
||||
shape.appendChild(createCellElemScaled("PinY", parentHeight - geo.y - hh, xmlDoc));
|
||||
shape.appendChild(createCellElemScaled("Width", geo.width, xmlDoc));
|
||||
shape.appendChild(createCellElemScaled("Height", geo.height, xmlDoc));
|
||||
shape.appendChild(createCellElemScaled("LocPinX", hw, xmlDoc));
|
||||
shape.appendChild(createCellElemScaled("LocPinY", hh, xmlDoc));
|
||||
|
||||
shape.appendChild(createGeoElem(cell, xmlDoc));
|
||||
vsdxCanvas.newShape(shape, geo, xmlDoc);
|
||||
|
||||
if (state.text != null && state.text.checkBounds())
|
||||
{
|
||||
vsdxCanvas.save();
|
||||
|
||||
if (parentGeo)
|
||||
{
|
||||
vsdxCanvas.translate(-parentGeo.x, -parentGeo.y);
|
||||
}
|
||||
|
||||
state.text.paint(vsdxCanvas);
|
||||
vsdxCanvas.restore();
|
||||
}
|
||||
if (state.shape != null && state.shape.checkBounds())
|
||||
{
|
||||
vsdxCanvas.save();
|
||||
|
||||
if (parentGeo)
|
||||
{
|
||||
vsdxCanvas.translate(-parentGeo.x, -parentGeo.y);
|
||||
}
|
||||
|
||||
state.shape.paint(vsdxCanvas);
|
||||
vsdxCanvas.restore();
|
||||
}
|
||||
|
||||
shape.appendChild(vsdxCanvas.getShapeGeo());
|
||||
|
||||
vsdxCanvas.endShape();
|
||||
shape.setAttribute("Type", vsdxCanvas.getShapeType());
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
@ -218,7 +354,7 @@ function VsdxExport(editorUi, resDir)
|
|||
};
|
||||
|
||||
|
||||
function convertMxModel2Page(graph, name, modelAttrib)
|
||||
function convertMxModel2Page(graph, modelAttrib)
|
||||
{
|
||||
var xmlDoc = mxUtils.createXmlDocument();
|
||||
|
||||
|
@ -231,12 +367,14 @@ function VsdxExport(editorUi, resDir)
|
|||
root.appendChild(shapes);
|
||||
|
||||
var model = graph.model;
|
||||
// var graph = new Graph(null, model);
|
||||
|
||||
// var vsdxCanvas = new mxVsdxCanvas2D();
|
||||
// var imgExport = new mxImageExport();
|
||||
// imgExport.drawState(graph.getView().getState(graph.model.root), vsdxCanvas);
|
||||
|
||||
var t = graph.view.translate;
|
||||
var s = graph.view.scale;
|
||||
|
||||
vsdxCanvas.translate(-t.x, -t.y);
|
||||
vsdxCanvas.scale(1 / s);
|
||||
vsdxCanvas.newPage();
|
||||
|
||||
var defParent = graph.getDefaultParent();
|
||||
|
||||
for (var id in model.cells)
|
||||
|
@ -245,7 +383,35 @@ function VsdxExport(editorUi, resDir)
|
|||
//top-most cells
|
||||
if (c.parent == defParent)
|
||||
{
|
||||
var shape = convertMxCell2Shape(c, graph, xmlDoc, modelAttrib.pageHeight);
|
||||
var shape;
|
||||
if (c.getChildCount() > 0) //Group
|
||||
{
|
||||
var geo = c.geometry;
|
||||
shape = createShape(c.id+"10000", geo, xmlDoc, modelAttrib.pageHeight);
|
||||
shape.setAttribute("Type", "Group");
|
||||
|
||||
var gShapes = xmlDoc.createElement("Shapes");
|
||||
|
||||
var newGeo = geo.clone();
|
||||
newGeo.x = 0;
|
||||
newGeo.y = 0;
|
||||
c.setGeometry(newGeo);
|
||||
var subShape = convertMxCell2Shape(c, graph, xmlDoc, geo.height, geo);
|
||||
c.setGeometry(geo);
|
||||
gShapes.appendChild(subShape);
|
||||
|
||||
for (var i = 0; i < c.children.length; i++)
|
||||
{
|
||||
var subShape = convertMxCell2Shape(c.children[i], graph, xmlDoc, geo.height, geo);
|
||||
gShapes.appendChild(subShape);
|
||||
}
|
||||
|
||||
shape.appendChild(gShapes);
|
||||
}
|
||||
else
|
||||
{
|
||||
shape = convertMxCell2Shape(c, graph, xmlDoc, modelAttrib.pageHeight);
|
||||
}
|
||||
|
||||
if (shape != null)
|
||||
shapes.appendChild(shape);
|
||||
|
@ -253,6 +419,7 @@ function VsdxExport(editorUi, resDir)
|
|||
}
|
||||
|
||||
xmlDoc.appendChild(root);
|
||||
|
||||
return xmlDoc;
|
||||
};
|
||||
|
||||
|
@ -320,6 +487,33 @@ function VsdxExport(editorUi, resDir)
|
|||
writeXmlDoc2Zip(zip, that.VISIO_PAGES + "_rels/pages.xml.rels", pagesRelsXmlDoc);
|
||||
}
|
||||
|
||||
function addImagesRels(zip, pIndex)
|
||||
{
|
||||
//create a new page rels file
|
||||
var fId = that.VISIO_PAGES_RELS + "page" + pIndex + ".xml.rels";
|
||||
var pageRelDoc = mxUtils.createXmlDocument();
|
||||
|
||||
var relationships = pageRelDoc.createElement("Relationships");
|
||||
relationships.setAttribute("xmlns", that.RELS_XMLNS);
|
||||
|
||||
var imgs = vsdxCanvas.images;
|
||||
|
||||
//create rels of image files
|
||||
if (imgs.length > 0)
|
||||
{
|
||||
for (var i = 0; i < imgs.length; i++)
|
||||
{
|
||||
var relationship = pageRelDoc.createElement("Relationship");
|
||||
relationship.setAttribute("Type", that.XMLNS_R + "/image");
|
||||
relationship.setAttribute("Id", "rId" + (i+1));
|
||||
relationship.setAttribute("Target", "../media/" + imgs[i]);
|
||||
|
||||
relationships.appendChild(relationship);
|
||||
}
|
||||
}
|
||||
pageRelDoc.appendChild(relationships);
|
||||
writeXmlDoc2Zip(zip, fId, pageRelDoc);
|
||||
};
|
||||
/**
|
||||
*
|
||||
* Convert current Editor UI pages into a vdsx file
|
||||
|
@ -331,6 +525,8 @@ function VsdxExport(editorUi, resDir)
|
|||
{
|
||||
var zip = new JSZip();
|
||||
|
||||
vsdxCanvas.init(zip);
|
||||
|
||||
pages = {};
|
||||
modelsAttr = {};
|
||||
|
||||
|
@ -347,7 +543,8 @@ function VsdxExport(editorUi, resDir)
|
|||
var diagramName = page.getName();
|
||||
var graph = editorUi.editor.graph;
|
||||
var modelAttrib = getGraphAttributes(graph);
|
||||
pages[diagramName] = convertMxModel2Page(graph, diagramName, modelAttrib);
|
||||
pages[diagramName] = convertMxModel2Page(graph, modelAttrib);
|
||||
addImagesRels(zip, i+1);
|
||||
modelsAttr[diagramName] = modelAttrib;
|
||||
}
|
||||
editorUi.selectPage(currentPage);
|
||||
|
@ -356,87 +553,37 @@ function VsdxExport(editorUi, resDir)
|
|||
{
|
||||
var graph = editorUi.editor.graph;
|
||||
var modelAttrib = getGraphAttributes(graph);
|
||||
pages[diagramName] = convertMxModel2Page(graph, "Page1", modelAttrib);
|
||||
var diagramName = "Page1";
|
||||
pages[diagramName] = convertMxModel2Page(graph, modelAttrib);
|
||||
addImagesRels(zip, 1);
|
||||
modelsAttr[diagramName] = modelAttrib;
|
||||
}
|
||||
|
||||
createVsdxSkeleton(zip, pagesCount, function() {
|
||||
addPagesXML(zip, pages, modelsAttr);
|
||||
|
||||
zip.generateAsync({type:"blob"})
|
||||
.then(function(content) {
|
||||
var file = editorUi.getCurrentFile();
|
||||
|
||||
var filename = (file != null && file.getTitle() != null) ? file.getTitle() : editorUi.defaultFilename;
|
||||
editorUi.saveData(filename+".vsdx", 'vsdx', content, 'application/vnd.visio2013');
|
||||
});
|
||||
});
|
||||
return true;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
console.log(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* Convert mxFile into a vdsx file
|
||||
* @param mxFileXML mxFile xml string
|
||||
* @return true if successful, false otherwise (stream should be discarded and closed)
|
||||
*/
|
||||
function exportMxFile(mxFileXML)
|
||||
{
|
||||
try
|
||||
{
|
||||
var zip = new JSZip();
|
||||
|
||||
pages = {};
|
||||
modelsAttr = {};
|
||||
|
||||
var doc = mxUtils.parseXml(mxFileXML);
|
||||
var diagrams = doc.documentElement.children;
|
||||
var codec = new mxCodec();
|
||||
var pagesCount = 0;
|
||||
|
||||
for (var i=0; i < diagrams.length; i++)
|
||||
{
|
||||
var diagram = diagrams[i];
|
||||
|
||||
if (diagram.nodeName == "diagram")
|
||||
//wait until all media files are loaded
|
||||
var createZipFile = function()
|
||||
{
|
||||
var diagramName = diagram.getAttribute("name");
|
||||
var diagramB64 = diagram.firstChild.textContent;
|
||||
var deflated = (window.atob) ? atob(diagramB64) : Base64.decode(diagramB64, true);
|
||||
var uriEncoded = Graph.prototype.bytesToString(pako.inflateRaw(deflated));
|
||||
var xml = decodeURIComponent(uriEncoded);
|
||||
|
||||
var modelNode = mxUtils.parseXml(xml).documentElement;
|
||||
var modelAttrib = getModelExtAttributes(modelNode);
|
||||
|
||||
var dec = new mxCodec(modelNode.ownerDocument);
|
||||
|
||||
var graph = new Graph();
|
||||
var model = graph.getModel();
|
||||
dec.decode(modelNode, model);
|
||||
|
||||
// var model = codec.decode(modelNode);
|
||||
pages[diagramName] = convertMxModel2Page(graph, diagramName, modelAttrib);
|
||||
modelsAttr[diagramName] = modelAttrib;
|
||||
pagesCount++;
|
||||
}
|
||||
}
|
||||
|
||||
createVsdxSkeleton(zip, pagesCount, function() {
|
||||
addPagesXML(zip, pages, modelsAttr);
|
||||
if (vsdxCanvas.filesLoading > 0)
|
||||
{
|
||||
setTimeout(createZipFile, vsdxCanvas.filesLoading * 200);
|
||||
}
|
||||
else
|
||||
{
|
||||
zip.generateAsync({type:"blob"}).then(
|
||||
function(content)
|
||||
{
|
||||
var file = editorUi.getCurrentFile();
|
||||
|
||||
var filename = (file != null && file.getTitle() != null) ? file.getTitle() : editorUi.defaultFilename;
|
||||
editorUi.saveData(filename+".vsdx", 'vsdx', content, 'application/vnd.visio2013');
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
//just for testing
|
||||
// zip.generateAsync({type:"base64"}).then(function (base64)
|
||||
// {
|
||||
// location.href="data:application/zip;base64," + base64;
|
||||
// });
|
||||
createZipFile();
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
@ -445,13 +592,8 @@ function VsdxExport(editorUi, resDir)
|
|||
console.log(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//test
|
||||
//var mxFileXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><mxfile><diagram name=\"Page-1\">7VnJcqMwEP0a7ixeyNF44swhU5UaH+YsgwyqCEQJEdv5+mlhsQhMDEk8SU3hC+ap1UL9npqWMJx1fHzgKI1+sQBTwzaDo+H8MGzbsswFXCRyOiNz9+4MhJwEyqgGtuQVK9BUaE4CnGmGgjEqSKqDPksS7AsNQ5yzg262Z1QfNUUh7gBbH9Eu+ocEIqrmZdYNPzEJIzW0O1cNO+Q/h5zliRrPsJ198Ts3x6j0peyzCAXs0ICce8NcGfK/aThrzpjQoLIhPq4xlTEvw3n2txlmXE2P40S8o7997v+CaI7LeRazEacygkUMsLS3DMc7RETgbYp82XoAzQAWiZiq5ioKMJpH0Q5Tr4rjmlHGoSlhCZamgrNnXIIQXrP4VS0lXTNA9oTShuXqx2bjuYCHHAUEZt5oUyRBH6bhprncbCAqHqIkTADzoR+GRk+FAHOBj71RtdqUtgP7gFmMBT/Bfb14zn5OrftDQ4ilfKKGBhcKQ0r7YeW6l1jAFbeDaHeu0w4dYI3iifIxlNuuTvndQMbdmzM+G8M4UJpKMGD5juL7oUpAWXpO4XtylAljkkZDGjPnqjTcL1HG/D3K8CnLgyk3jBHAfK4LwP02uWFxXQEV7ydKoBrgE/VjqF9aV6lffAnzyxHM57upGPhQ/Wc732bFux3eV76ASPWRn8f0bOB4Mk4E9lePktwnlhFBmAznjgnB4n7Wm9SUPlaKCsHektF/L5R21WjPukJxLujk9vuEuzH5gdOTx4F3LK7nCX1TOWWNWgzOsiUGuyuGS0mjyiS3U0OZz4bIIUACZZAxpnfGuF3CrMX+hXfGpVLh9qnAsoaTnx2I8KOJ+Y9sD74R891DwjWLU/nqxwBvBZLXthQOJKaooK5BuIzyVhlZl6LbrgxiEgTS2vMjQoNHdGK5nHcmQCflnRcxTl7BM6p0JRAX6izaMTWLreypFMdxBjZPJW819AipS7nyZS+SyIcrDHxGKUozsivmYHZeZYj7zYE7st3vlWxbIpUy9IseKnCbvvbha6ZP07eS8GLRkrDZlbD1RRrunnhu850ggnalC1ERrTylsVhGt0GQgobLOYOcSJLwEe+FSloK+a2iMuvJngxc7mkhgAic4aRQICxBVCtyGL/2CIJPehF6jU/n9nwOOc8MQlwmG8ZFxEKWIHpfo02K20xV2xmcBCv5HUo6SYtwA6KWuPvmCg9QFlV54e21KB9VYypjOfexoeXf965OjikS5EUf4BI1ff5qr0+MwBPU5xqtasVp16CQh0MsVK8e7jUFVI/9GRoZdbKplyVFGSOJLl5unWzdKj4usf8JefrfnVS0eSxrkSsb0E9b5wXe+ERaqqH+Jl3gfwE=</diagram></mxfile>";
|
||||
//var mxFileXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><mxfile><diagram name=\"Page-1\">7ZZbk5owFMc/DTPtixPC/VG87G697Ky43t4CREgFwkAE3E/fIFGhzs5uO+1Lpzij8sv/5JCT849KyiCuHjKUhjPq40iCwK8kZShBKMtA5x81OTVEM60GBBnxhegGHPKGBQSCHomP846QURoxknahR5MEe6zDUJbRsivb06ibNUUBvgOOh6J7uiY+C6/rAreBR0yCUKQ2NTHgIu8QZPSYiHwSVPbnqxmO0XWuBuQh8mnZoPMUykgCfan+DiRlkFHKOugyEFcDHNU1v5SzyT/+nPi6vAwn7DfioXh4droULMiQT/hkAxrR7IwURTFN1ZUUe0+iqMVVzdV1lfMi96unIYcyv4mQiyP7Wr2LPqEJz2DzMqV1ppzhxCPRl2I1tod0Fowey/miohPzZbPmTx/Pl6vTOtqGO2Tt8Xg6cR/SiRcXnvL81lfdRRrow+EgBIN0ZPK+cRf549bRBugtf3aG2/jbqPy+nMtamRqmBystIX1jpmTqCmhbPJKg7a/mxgId1xqkQXZUx0cHLYnMVnHKk2+exjO222/lV6Iux/bhwANesgV/n9q41KitR88HDS4T6lS76fYVeX6xKGweaShF/4XrNpa10wyiFRs9n0RjL4cJ/lqvnmX0gFsl5IZyFViPpMgjSTDF+3obQQ9A0Llk8yayKWM0/lC2EF39jipkcSS2TAQsafq+/LyZuG4b3kh2GRKGHR5W72XJj47r4i4uk3sW0Di9b1DRswXOGK5a6L5hb237gGmMWXbi95cQaDTznC4HjtzTrNYl0pQ312vAbFjYMrxhGj1VnDfirAmuyd41Ut2ijZc+ZTPlQ5sJe/zkMAMgXzXaDoP/HfZrDrPOr3/RYaCnK3/TYYYs92DHYzqwuh67s1jtQv3eZFDXe8YfMtmZt35Oha71/+XMfwA=</diagram><diagram name=\"Page-2\">nZTbkqIwEIafhqrdGwuIEbwUlJldD1Mjjqe7CAGyBkKFCDhPv0HigbWmdmtzofD132nS6W4NuGn9wlGezFmIqWbqYa2BsWaahqEP5F9Dzi2B9rAFMSehEt2BTz6xgrqiJxLioiMUjFFB8i4MWJbhQHQY4pxVXVnEaDdqjmL8BPwA0We6IaFIbufS74ZXTOJEhbahMhxQcIw5O2UqnmaC6LJac4pue7WgSFDIqhZdtgATTR9pzbOuAZczJjroakhrF9Mm59d0tvG9fxPfjsdxJv7D31QfL87XhMUchURu5jLKuEQZy6TFiQilVyRTcQBRKFMBnLII6x9jCQ35QtEBU+eWuD+2kBnKmyCFwFlA6Ldy7TljNo8nr9ViWbOp/b7dyA9PF6v1eUN3yR4NI+zNpoeXfBqkZQDePkf9wzKPB+Oxm+huPrFlyRyWxevOhy76LN788S79Oal+rRYGrHLLDswaZmRkzQHvr3W4wxPNdML1wlqi0waaLOanvnfy0YoYYp3mMvj2hzcX+2hnfJD+ynOOR+nwzpfyd+bgCjJnQN+O0FxlzK/3s90HCsJyWTrS0wLl6F3qtsPhHloElttBMaVeUJgZ/t6cXnB2xA8pBBjacNhYchSQLJ7hqLlBvaebemcZ9l3kMCFY+lfZUhX0F6pEpFRdmXJYsfxr+eUycVMxsoacKiEC+9KtuctKTo3b4a4NZvSgbUGJn4tT1WuJucD1A3ou1nvJvmCWYsHP8v3qYlk9u91JjSUDmj0wfFjKXN17HkDYU8MseWh4s2/0gJo3atbEt4BfNlJTp20vddtc8odOV7qH0XrhvwE=</diagram><diagram name=\"Page-3\">7VhZc6pIFP41Vs08jNWs4qMgCmJwwS2+ITTQgjQiCvjrp1GMEuNNcm9y52EuVZb0x1n6LN9hqTHSJuvGZuQ9YRsGNRrYWY1p12iaEliG/BVIfkaaAn0G3BjZpdAVMNARliAo0T2y4a4imGAcJCiqghYOQ2glFcyMY5xWxRwcVL1GpgvvAMMyg3t0juzEK1EKgOsFBSLXK10LXHlhZVq+G+N9WPqr0YxzOs6XN+aLrTOw80wbp2foZIKRa6BVK85BjZFijJMKdLmwySQYFDm/pPPsv/Mx4ZfwYhgmP6FfFnOX5JeEubFpI2JMwgGOCRTikFwRHRQEr6DDzs7UNllTZBGYKxiILzl7JbpLYuzD12BkWih0+9Apdv4PXQdNtnlzCFcZEScJ3rwnNS7L+EOhCY4einjJJijjOUUBiyyRvImphxJoEANFklLClJeYLk1F1Rs8Ae/LUVboAOMEZjfQfXmuRepCvIFJnJN1qUIas87dbrdxNluyssHXqdtYyrKm147naFAvdbybdqd5UGe4km4l1dwX7w/7iOBlK32oy5if6TJCOAbwvMXcthr9fqt5ZlQ42SUwtFDw1/Q4o/s7Tu3L3kyfqLiPQu0I2OQI0iiftSg7kKmnXfyUAzfJUSruAkNfzOZ6aA9zRPUniMTa6wuU6pITtSf7Mh5pZMrRnXZ3LIlTw3GXrGioNVocj4zplklpNJCsYxtsMm2kzAiuAlqX2rrVOlLbp+d11JXNiewfFQpwviqrvanbUoW95+XeSBLVVbZlW3/fkYakg6ZYpmH9fubc0OIDJPoy5tC/xpySGjxXBwK4HtRHqUExoE4J300N9suowXyaGsms329jNZWHualsQjP2XBIvqUQHDccuBjN/O98e1kwnsRR52PUTet7dQMr3hC4fL8brjdhLRoqQdri9gnbdrjZfxPm2pVtzLV2uWvthDxvEmBkO+NVhTM6W5Ne0h5OQ2crrcGxIiOKDrDcf6a1+vt5nKlZkZ75Ie67U7LmtZicKPQ1trXgiA8VsRLLdWOqgZdmxRvbZcxqdwTO9MfZtNQol1ul1lCRbehvCJsjP06bRnhdVojvhYDO2nhcsyIxlkOtPPmg6WVM9tqC0h+CoUz0rRkvF97I5Bm1nciDWQ01YeAtrIg18q6kc+hPWN1WjGAKr7uk2z7T/kPSXSVqqNKk6Rd+QlLkjKcMIdZb/r25g3JexlP80S8OlMpax6spy0c2eb1miMuMTco6HvaC7lHr5DBzIHBFNzbfC+cZkomXjSE8XAfb4xmDuSl24Fhl77tOcMBEMaGlcEoN2Yyp2MlXr7RXTHTD6lIYi5/e6OmWtbDZlc07bESeaun1m9/zAeOLMLGL6sqt3aHmBls6JgiwEqUYdJW2BRlZf6SM3ygzlyDUODkmA2PQKNUXacf2Yo/S+LR/lddQZgaHZJQ2rdeJ1pBupbw9U7KwF29zr6WxaBOfM9i4eNzrPlvKHZ/8XnvHf+fzMVx6ZKZaq08JNufjvDq7xXcFRdPVtgOGZOsf8ztCEu/n4MvAapJ1hePkyQB7GHg/A6yt2QQszTlrFB4CbF06SJkRe7VsBckMCb5BtF/4K+xfRVYAt/615QTU5brW6mxegDm4JUTwgvjUwHokVu6yE9mqGPNCDtguNMlllcI/mygML1cHyeojQp6xnKFmcLZSr58pqCGNE+gDGpRHSlXF+o1Asn6vLqsqjdt7hfWzBCqNJnlyYVHhQ5ODzLR/DwEzQofp1563GfmTvYpU0jJnf6EYYhcnufc3rroaFxk+MmLcY9yEPr3l+st/8Wpun2cF+yOZpSpzT+J7g1W3phvQUuLlZChTN0tVaYsfZkY758UbKQfXSHx8fZSf85qPcxdL1K+gJ/xc=</diagram></mxfile>";
|
||||
//exportMxFile(mxFileXml);
|
||||
};
|
||||
}
|
||||
|
||||
VsdxExport.prototype.CONVERSION_FACTOR = 40 * 2.54; //screenCoordinatesPerCm (40) x CENTIMETERS_PER_INCHES (2.54)
|
||||
|
|
|
@ -8,16 +8,9 @@
|
|||
*
|
||||
* Constructs a new abstract canvas.
|
||||
*/
|
||||
function mxVsdxCanvas2D(root)
|
||||
function mxVsdxCanvas2D(zip)
|
||||
{
|
||||
mxAbstractCanvas2D.call(this);
|
||||
|
||||
/**
|
||||
* Variable: root
|
||||
*
|
||||
* Reference to the container for the SVG content.
|
||||
*/
|
||||
this.root = root;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -26,15 +19,228 @@ function mxVsdxCanvas2D(root)
|
|||
mxUtils.extend(mxVsdxCanvas2D, mxAbstractCanvas2D);
|
||||
|
||||
|
||||
/**
|
||||
* Variable: textEnabled
|
||||
*
|
||||
* Specifies if text output should be enabled. Default is true.
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.textEnabled = true;
|
||||
|
||||
/**
|
||||
* Function: createElement
|
||||
*
|
||||
* Creates the given element using the owner document of <root>.
|
||||
* Function: init
|
||||
*
|
||||
* Initialize the canvas for a new vsdx file.
|
||||
*/
|
||||
mxXmlCanvas2D.prototype.createElement = function(name)
|
||||
mxVsdxCanvas2D.prototype.init = function (zip)
|
||||
{
|
||||
return this.root.ownerDocument.createElement(name);
|
||||
this.filesLoading = 0;
|
||||
this.zip = zip;
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: createGeoSec
|
||||
*
|
||||
* Create a new geo section.
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.createGeoSec = function ()
|
||||
{
|
||||
if (this.geoSec != null)
|
||||
{
|
||||
this.shape.appendChild(this.geoSec);
|
||||
}
|
||||
|
||||
var geoSec = this.xmlDoc.createElement("Section");
|
||||
|
||||
geoSec.setAttribute("N", "Geometry");
|
||||
geoSec.setAttribute("IX", this.geoIndex++);
|
||||
|
||||
this.geoSec = geoSec;
|
||||
this.geoStepIndex = 1;
|
||||
this.lastX = 0;
|
||||
this.lastY = 0;
|
||||
this.lastMoveToX = 0;
|
||||
this.lastMoveToY = 0;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Function: newShape
|
||||
*
|
||||
* Create a new shape.
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.newShape = function (shape, xmGeo, xmlDoc)
|
||||
{
|
||||
this.geoIndex = 0;
|
||||
this.shape = shape;
|
||||
this.xmGeo = xmGeo;
|
||||
this.xmlDoc = xmlDoc;
|
||||
this.geoSec = null;
|
||||
this.shapeImg = null;
|
||||
this.shapeType = "Shape";
|
||||
|
||||
this.createGeoSec();
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: endShape
|
||||
*
|
||||
* End current shape.
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.endShape = function ()
|
||||
{
|
||||
if (this.shapeImg != null)
|
||||
{
|
||||
this.addForeignData(this.shapeImg.type, this.shapeImg.id);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Function: newPage
|
||||
*
|
||||
* Start a new page.
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.newPage = function ()
|
||||
{
|
||||
this.images = [];
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: newPage
|
||||
*
|
||||
* Start a new page.
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.getShapeType = function ()
|
||||
{
|
||||
return this.shapeType;
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: getShapeGeo
|
||||
*
|
||||
* return the current geo section.
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.getShapeGeo = function ()
|
||||
{
|
||||
return this.geoSec;
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: createCellElemScaled
|
||||
*
|
||||
* Creates a cell element and scale the value.
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.createCellElemScaled = function (name, val, formula)
|
||||
{
|
||||
return this.createCellElem(name, val / VsdxExport.prototype.CONVERSION_FACTOR, formula);
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: createCellElem
|
||||
*
|
||||
* Creates a cell element.
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.createCellElem = function (name, val, formula)
|
||||
{
|
||||
var cell = this.xmlDoc.createElement("Cell");
|
||||
cell.setAttribute("N", name);
|
||||
cell.setAttribute("V", val);
|
||||
|
||||
if (formula) cell.setAttribute("F", formula);
|
||||
|
||||
return cell;
|
||||
};
|
||||
|
||||
mxVsdxCanvas2D.prototype.createRowRel = function(type, index, x, y, a, b, c , d)
|
||||
{
|
||||
var row = this.xmlDoc.createElement("Row");
|
||||
row.setAttribute("T", type);
|
||||
row.setAttribute("IX", index);
|
||||
row.appendChild(this.createCellElem("X", x));
|
||||
row.appendChild(this.createCellElem("Y", y));
|
||||
|
||||
if (a != null) row.appendChild(this.createCellElem("A", a));
|
||||
if (b != null) row.appendChild(this.createCellElem("B", b));
|
||||
if (c != null) row.appendChild(this.createCellElem("C", c));
|
||||
if (d != null) row.appendChild(this.createCellElem("D", d));
|
||||
|
||||
return row;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Function: begin
|
||||
*
|
||||
* Extends superclass to create path.
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.begin = function()
|
||||
{
|
||||
if (this.geoStepIndex > 1) this.createGeoSec();
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: rect
|
||||
*
|
||||
* Private helper function to create SVG elements
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.rect = function(x, y, w, h)
|
||||
{
|
||||
if (this.geoStepIndex > 1) this.createGeoSec();
|
||||
|
||||
var s = this.state;
|
||||
w = w * s.scale;
|
||||
h = h * s.scale;
|
||||
|
||||
var geo = this.xmGeo;
|
||||
x = ((x - geo.x + s.dx) * s.scale) /w;
|
||||
y = ((geo.height - y + geo.y - s.dy) * s.scale) /h;
|
||||
|
||||
this.geoSec.appendChild(this.createRowRel("RelMoveTo", this.geoStepIndex++, x, y));
|
||||
this.geoSec.appendChild(this.createRowRel("RelLineTo", this.geoStepIndex++, x + 1, y));
|
||||
this.geoSec.appendChild(this.createRowRel("RelLineTo", this.geoStepIndex++, x + 1, y - 1));
|
||||
this.geoSec.appendChild(this.createRowRel("RelLineTo", this.geoStepIndex++, x, y - 1));
|
||||
this.geoSec.appendChild(this.createRowRel("RelLineTo", this.geoStepIndex++, x, y));
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: roundrect
|
||||
*
|
||||
* Private helper function to create SVG elements
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.roundrect = function(x, y, w, h, dx, dy)
|
||||
{
|
||||
this.rect(x, y, w, h);
|
||||
//TODO this assume dx and dy are equal and only one rounding is needed
|
||||
this.shape.appendChild(this.createCellElemScaled("Rounding", dx));
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: ellipse
|
||||
*
|
||||
* Private helper function to create SVG elements
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.ellipse = function(x, y, w, h)
|
||||
{
|
||||
if (this.geoStepIndex > 1) this.createGeoSec();
|
||||
|
||||
var s = this.state;
|
||||
w = w * s.scale;
|
||||
h = h * s.scale;
|
||||
|
||||
var geo = this.xmGeo;
|
||||
var gh = geo.height * s.scale;
|
||||
var gw = geo.width * s.scale;
|
||||
x = (x - geo.x + s.dx) * s.scale;
|
||||
y = gh + (-y + geo.y - s.dy) * s.scale;
|
||||
|
||||
var hr = h/gh;
|
||||
var wr = w/gw;
|
||||
|
||||
this.geoSec.appendChild(this.createRowRel("RelMoveTo", this.geoStepIndex++, x/gw, y/gh - hr * 0.5));
|
||||
|
||||
var row = this.createRowRel("RelEllipticalArcTo", this.geoStepIndex++, x/gw, y/gh - hr * 0.5001, wr * 0.5 + x/gw, y/gh - hr, 0);
|
||||
row.appendChild(this.createCellElem("D", w/h, "Width/Height*"+(wr/hr)));
|
||||
this.geoSec.appendChild(row);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -49,12 +255,19 @@ mxXmlCanvas2D.prototype.createElement = function(name)
|
|||
*/
|
||||
mxVsdxCanvas2D.prototype.moveTo = function(x, y)
|
||||
{
|
||||
var elem = this.createElement('move');
|
||||
elem.setAttribute('x', this.format(x));
|
||||
elem.setAttribute('y', this.format(y));
|
||||
this.root.appendChild(elem);
|
||||
this.lastMoveToX = x;
|
||||
this.lastMoveToY = y;
|
||||
this.lastX = x;
|
||||
this.lastY = y;
|
||||
this.lastY = y;
|
||||
|
||||
var geo = this.xmGeo;
|
||||
var s = this.state;
|
||||
x = (x - geo.x + s.dx) * s.scale;
|
||||
y = (geo.height - y + geo.y - s.dy) * s.scale;
|
||||
var h = geo.height * s.scale;
|
||||
var w = geo.width * s.scale;
|
||||
|
||||
this.geoSec.appendChild(this.createRowRel("RelMoveTo", this.geoStepIndex++, x/w, y/h));
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -69,12 +282,17 @@ mxVsdxCanvas2D.prototype.moveTo = function(x, y)
|
|||
*/
|
||||
mxVsdxCanvas2D.prototype.lineTo = function(x, y)
|
||||
{
|
||||
var elem = this.createElement('line');
|
||||
elem.setAttribute('x', this.format(x));
|
||||
elem.setAttribute('y', this.format(y));
|
||||
this.root.appendChild(elem);
|
||||
this.lastX = x;
|
||||
this.lastY = y;
|
||||
this.lastY = y;
|
||||
|
||||
var geo = this.xmGeo;
|
||||
var s = this.state;
|
||||
x = (x - geo.x + s.dx) * s.scale;
|
||||
y = (geo.height - y + geo.y - s.dy) * s.scale;
|
||||
var h = geo.height * s.scale;
|
||||
var w = geo.width * s.scale;
|
||||
|
||||
this.geoSec.appendChild(this.createRowRel("RelLineTo", this.geoStepIndex++, x/w, y/h));
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -91,14 +309,27 @@ mxVsdxCanvas2D.prototype.lineTo = function(x, y)
|
|||
*/
|
||||
mxVsdxCanvas2D.prototype.quadTo = function(x1, y1, x2, y2)
|
||||
{
|
||||
var elem = this.createElement('quad');
|
||||
elem.setAttribute('x1', this.format(x1));
|
||||
elem.setAttribute('y1', this.format(y1));
|
||||
elem.setAttribute('x2', this.format(x2));
|
||||
elem.setAttribute('y2', this.format(y2));
|
||||
this.root.appendChild(elem);
|
||||
this.lastX = x2;
|
||||
this.lastY = y2;
|
||||
this.lastY = y2;
|
||||
|
||||
var s = this.state;
|
||||
var geo = this.xmGeo;
|
||||
|
||||
var h = geo.height * s.scale;
|
||||
var w = geo.width * s.scale;
|
||||
|
||||
x1 = (x1 - geo.x + s.dx) * s.scale;
|
||||
y1 = (geo.height - y1 + geo.y - s.dy) * s.scale;
|
||||
|
||||
x2 = (x2 - geo.x + s.dx) * s.scale;
|
||||
y2 = (geo.height - y2 + geo.y - s.dy) * s.scale;
|
||||
|
||||
x1 = x1 / w;
|
||||
y1 = y1 / h;
|
||||
x2 = x2 / w;
|
||||
y2 = y2 / h;
|
||||
|
||||
this.geoSec.appendChild(this.createRowRel("RelQuadBezTo", this.geoStepIndex++, x2, y2, x1, y1));
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -117,16 +348,32 @@ mxVsdxCanvas2D.prototype.quadTo = function(x1, y1, x2, y2)
|
|||
*/
|
||||
mxVsdxCanvas2D.prototype.curveTo = function(x1, y1, x2, y2, x3, y3)
|
||||
{
|
||||
var elem = this.createElement('curve');
|
||||
elem.setAttribute('x1', this.format(x1));
|
||||
elem.setAttribute('y1', this.format(y1));
|
||||
elem.setAttribute('x2', this.format(x2));
|
||||
elem.setAttribute('y2', this.format(y2));
|
||||
elem.setAttribute('x3', this.format(x3));
|
||||
elem.setAttribute('y3', this.format(y3));
|
||||
this.root.appendChild(elem);
|
||||
this.lastX = x3;
|
||||
this.lastY = y3;
|
||||
this.lastY = y3;
|
||||
|
||||
var s = this.state;
|
||||
var geo = this.xmGeo;
|
||||
|
||||
var h = geo.height * s.scale;
|
||||
var w = geo.width * s.scale;
|
||||
|
||||
x1 = (x1 - geo.x + s.dx) * s.scale;
|
||||
y1 = (geo.height - y1 + geo.y - s.dy) * s.scale;
|
||||
|
||||
x2 = (x2 - geo.x + s.dx) * s.scale;
|
||||
y2 = (geo.height - y2 + geo.y - s.dy) * s.scale;
|
||||
|
||||
x3 = (x3 - geo.x + s.dx) * s.scale;
|
||||
y3 = (geo.height - y3 + geo.y - s.dy) * s.scale;
|
||||
|
||||
x1 = x1 / w;
|
||||
y1 = y1 / h;
|
||||
x2 = x2 / w;
|
||||
y2 = y2 / h;
|
||||
x3 = x3 / w;
|
||||
y3 = y3 / h;
|
||||
|
||||
this.geoSec.appendChild(this.createRowRel("RelCubBezTo", this.geoStepIndex++, x3, y3, x1, y1, x2, y2));
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -136,7 +383,143 @@ mxVsdxCanvas2D.prototype.curveTo = function(x1, y1, x2, y2, x3, y3)
|
|||
*/
|
||||
mxVsdxCanvas2D.prototype.close = function()
|
||||
{
|
||||
this.root.appendChild(this.createElement('close'));
|
||||
//Closing with a line if last point != last MoveTo point
|
||||
if (this.lastMoveToX != this.lastX || this.lastMoveToY != this.lastY)
|
||||
this.lineTo(this.lastMoveToX, this.lastMoveToY);
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: addForeignData
|
||||
*
|
||||
* Add ForeignData to current shape using last image in the images array
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.addForeignData = function(type, index)
|
||||
{
|
||||
var foreignData = this.xmlDoc.createElement("ForeignData");
|
||||
foreignData.setAttribute("ForeignType", "Bitmap");
|
||||
|
||||
type = type.toUpperCase();
|
||||
|
||||
if (type != "BMP")
|
||||
foreignData.setAttribute("CompressionType", type);
|
||||
|
||||
var rel = this.xmlDoc.createElement("Rel");
|
||||
rel.setAttribute("r:id", "rId" + index);
|
||||
|
||||
|
||||
foreignData.appendChild(rel);
|
||||
this.shape.appendChild(foreignData);
|
||||
this.shapeType = "Foreign";
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: image
|
||||
*
|
||||
* Add image to vsdx file as a media (Foreign Object)
|
||||
*/
|
||||
mxVsdxCanvas2D.prototype.image = function(x, y, w, h, src, aspect, flipH, flipV)
|
||||
{
|
||||
//TODO image reusing, if the same image is used more than once, reuse it. Applicable for URLs specifically (but can also be applied to embedded ones)
|
||||
var imgName = "image" + (this.images.length + 1) + ".";
|
||||
var type;
|
||||
if (src.indexOf("data:") == 0)
|
||||
{
|
||||
var p = src.indexOf("base64,");
|
||||
var base64 = src.substring(p + 7); //7 is the length of "base64,"
|
||||
type = src.substring(11, p-1); //5 is the length of "data:image/"
|
||||
imgName += type;
|
||||
this.zip.file("visio/media/" + imgName, base64, {base64: true});
|
||||
}
|
||||
else if (window.XMLHttpRequest) //URL src, fetch it
|
||||
{
|
||||
src = this.converter.convert(src);
|
||||
this.filesLoading++;
|
||||
var that = this;
|
||||
|
||||
var p = src.lastIndexOf(".");
|
||||
type = src.substring(p+1);
|
||||
imgName += type;
|
||||
|
||||
//The old browsers binary workaround doesn't work with jszip and converting to base64 encoding doesn't work also
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', src, true);
|
||||
xhr.responseType = 'arraybuffer';
|
||||
xhr.onreadystatechange = function(e)
|
||||
{
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
that.zip.file("visio/media/" + imgName, this.response);
|
||||
that.filesLoading--;
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
this.images.push(imgName);
|
||||
|
||||
//TODO can a shape has more than one image?
|
||||
this.shapeImg = {type: type, id: this.images.length};
|
||||
|
||||
//TODO support these!
|
||||
aspect = (aspect != null) ? aspect : true;
|
||||
flipH = (flipH != null) ? flipH : false;
|
||||
flipV = (flipV != null) ? flipV : false;
|
||||
|
||||
var s = this.state;
|
||||
w = w * s.scale;
|
||||
h = h * s.scale;
|
||||
|
||||
var geo = this.xmGeo;
|
||||
x = (x - geo.x + s.dx) * s.scale;
|
||||
y = (geo.height - y + geo.y - s.dy) * s.scale;
|
||||
|
||||
this.shape.appendChild(this.createCellElemScaled("ImgOffsetX", x));
|
||||
this.shape.appendChild(this.createCellElemScaled("ImgOffsetY", y - h));
|
||||
this.shape.appendChild(this.createCellElemScaled("ImgWidth", w));
|
||||
this.shape.appendChild(this.createCellElemScaled("ImgHeight", h));
|
||||
|
||||
// var s = this.state;
|
||||
// x += s.dx;
|
||||
// y += s.dy;
|
||||
//
|
||||
// if (s.alpha < 1 || s.fillAlpha < 1)
|
||||
// {
|
||||
// node.setAttribute('opacity', s.alpha * s.fillAlpha);
|
||||
// }
|
||||
//
|
||||
// var tr = this.state.transform || '';
|
||||
//
|
||||
// if (flipH || flipV)
|
||||
// {
|
||||
// var sx = 1;
|
||||
// var sy = 1;
|
||||
// var dx = 0;
|
||||
// var dy = 0;
|
||||
//
|
||||
// if (flipH)
|
||||
// {
|
||||
// sx = -1;
|
||||
// dx = -w - 2 * x;
|
||||
// }
|
||||
//
|
||||
// if (flipV)
|
||||
// {
|
||||
// sy = -1;
|
||||
// dy = -h - 2 * y;
|
||||
// }
|
||||
//
|
||||
// // Adds image tansformation to existing transform
|
||||
// tr += 'scale(' + sx + ',' + sy + ')translate(' + (dx * s.scale) + ',' + (dy * s.scale) + ')';
|
||||
// }
|
||||
//
|
||||
// if (tr.length > 0)
|
||||
// {
|
||||
// node.setAttribute('transform', tr);
|
||||
// }
|
||||
//
|
||||
// if (!this.pointerEvents)
|
||||
// {
|
||||
// node.setAttribute('pointer-events', 'none');
|
||||
// }
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -172,54 +555,88 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f
|
|||
{
|
||||
str = mxUtils.getOuterHtml(str);
|
||||
}
|
||||
|
||||
//TODO support HTML text formatting and remaining attributes
|
||||
var s = this.state;
|
||||
var geo = this.xmGeo;
|
||||
|
||||
var strRect;
|
||||
// if (h == 0 || w == 0)
|
||||
// {
|
||||
// strRect = mxUtils.getSizeForString(str);
|
||||
// }
|
||||
|
||||
var elem = this.createElement('text');
|
||||
elem.setAttribute('x', this.format(x));
|
||||
elem.setAttribute('y', this.format(y));
|
||||
elem.setAttribute('w', this.format(w));
|
||||
elem.setAttribute('h', this.format(h));
|
||||
elem.setAttribute('str', str);
|
||||
// h = h > 0 ? h : strRect.height;
|
||||
// w = w > 0 ? w : strRect.width;
|
||||
h = h > 0 ? h : geo.height;
|
||||
w = w > 0 ? w : geo.width;
|
||||
w = w * s.scale;
|
||||
h = h * s.scale;
|
||||
|
||||
if (align != null)
|
||||
{
|
||||
elem.setAttribute('align', align);
|
||||
}
|
||||
x = (x - geo.x + s.dx) * s.scale;
|
||||
y = (geo.height - y + geo.y - s.dy) * s.scale;
|
||||
|
||||
var hw = w/2, hh = h/2;
|
||||
this.shape.appendChild(this.createCellElemScaled("TxtPinX", x));
|
||||
this.shape.appendChild(this.createCellElemScaled("TxtPinY", y));
|
||||
this.shape.appendChild(this.createCellElemScaled("TxtWidth", w));
|
||||
this.shape.appendChild(this.createCellElemScaled("TxtHeight", h));
|
||||
this.shape.appendChild(this.createCellElemScaled("TxtLocPinX", hw));
|
||||
this.shape.appendChild(this.createCellElemScaled("TxtLocPinY", hh));
|
||||
|
||||
this.shape.appendChild(this.createCellElemScaled("TxtAngle", rotation * Math.PI / 180));
|
||||
|
||||
if (valign != null)
|
||||
{
|
||||
elem.setAttribute('valign', valign);
|
||||
}
|
||||
|
||||
elem.setAttribute('wrap', (wrap) ? '1' : '0');
|
||||
|
||||
if (format == null)
|
||||
{
|
||||
format = '';
|
||||
}
|
||||
|
||||
elem.setAttribute('format', format);
|
||||
|
||||
if (overflow != null)
|
||||
{
|
||||
elem.setAttribute('overflow', overflow);
|
||||
}
|
||||
|
||||
if (clip != null)
|
||||
{
|
||||
elem.setAttribute('clip', (clip) ? '1' : '0');
|
||||
}
|
||||
|
||||
if (rotation != null)
|
||||
{
|
||||
elem.setAttribute('rotation', rotation);
|
||||
}
|
||||
|
||||
if (dir != null)
|
||||
{
|
||||
elem.setAttribute('dir', dir);
|
||||
}
|
||||
|
||||
this.root.appendChild(elem);
|
||||
var text = this.xmlDoc.createElement("Text");
|
||||
text.textContent = str + "\n";
|
||||
this.shape.appendChild(text);
|
||||
//
|
||||
// var elem = this.createElement('text');
|
||||
// elem.setAttribute('x', this.format(x));
|
||||
// elem.setAttribute('y', this.format(y));
|
||||
// elem.setAttribute('w', this.format(w));
|
||||
// elem.setAttribute('h', this.format(h));
|
||||
// elem.setAttribute('str', str);
|
||||
//
|
||||
// if (align != null)
|
||||
// {
|
||||
// elem.setAttribute('align', align);
|
||||
// }
|
||||
//
|
||||
// if (valign != null)
|
||||
// {
|
||||
// elem.setAttribute('valign', valign);
|
||||
// }
|
||||
//
|
||||
// elem.setAttribute('wrap', (wrap) ? '1' : '0');
|
||||
//
|
||||
// if (format == null)
|
||||
// {
|
||||
// format = '';
|
||||
// }
|
||||
//
|
||||
// elem.setAttribute('format', format);
|
||||
//
|
||||
// if (overflow != null)
|
||||
// {
|
||||
// elem.setAttribute('overflow', overflow);
|
||||
// }
|
||||
//
|
||||
// if (clip != null)
|
||||
// {
|
||||
// elem.setAttribute('clip', (clip) ? '1' : '0');
|
||||
// }
|
||||
//
|
||||
// if (rotation != null)
|
||||
// {
|
||||
// elem.setAttribute('rotation', rotation);
|
||||
// }
|
||||
//
|
||||
// if (dir != null)
|
||||
// {
|
||||
// elem.setAttribute('dir', dir);
|
||||
// }
|
||||
//
|
||||
// this.root.appendChild(elem);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -230,7 +647,8 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f
|
|||
*/
|
||||
mxVsdxCanvas2D.prototype.stroke = function()
|
||||
{
|
||||
this.root.appendChild(this.createElement('stroke'));
|
||||
this.geoSec.appendChild(this.createCellElem("NoFill", "1"));
|
||||
this.geoSec.appendChild(this.createCellElem("NoLine", "0"));
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -240,7 +658,8 @@ mxVsdxCanvas2D.prototype.stroke = function()
|
|||
*/
|
||||
mxVsdxCanvas2D.prototype.fill = function()
|
||||
{
|
||||
this.root.appendChild(this.createElement('fill'));
|
||||
this.geoSec.appendChild(this.createCellElem("NoFill", "0"));
|
||||
this.geoSec.appendChild(this.createCellElem("NoLine", "1"));
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -250,5 +669,6 @@ mxVsdxCanvas2D.prototype.fill = function()
|
|||
*/
|
||||
mxVsdxCanvas2D.prototype.fillAndStroke = function()
|
||||
{
|
||||
this.root.appendChild(this.createElement('fillstroke'));
|
||||
this.geoSec.appendChild(this.createCellElem("NoFill", "0"));
|
||||
this.geoSec.appendChild(this.createCellElem("NoLine", "0"));
|
||||
};
|
||||
|
|
|
@ -1 +1 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships' />
|
2
war/js/embed-static.min.js
vendored
2
war/js/embed-static.min.js
vendored
|
@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+x.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
|
|||
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
|
||||
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
|
||||
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=mxLoadResources=!1,mxLanguage="en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
|
||||
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.6.2",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
|
||||
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.6.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
|
||||
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
|
||||
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
|
||||
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
|
||||
|
|
|
@ -20,8 +20,8 @@ function Dialog(editorUi, elt, w, h, modal, closable, onClose)
|
|||
|
||||
var dh = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
|
||||
|
||||
var left = Math.max(0, Math.round((document.body.scrollWidth - w) / 2));
|
||||
var top = Math.max(0, Math.round((dh - h - editorUi.footerHeight) / 3));
|
||||
var left = Math.max(1, Math.round((document.body.scrollWidth - w - 64) / 2));
|
||||
var top = Math.max(1, Math.round((dh - h - editorUi.footerHeight) / 3));
|
||||
|
||||
// Keeps window size inside available space
|
||||
if (!mxClient.IS_QUIRKS)
|
||||
|
|
2
war/js/reader.min.js
vendored
2
war/js/reader.min.js
vendored
|
@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+x.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
|
|||
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
|
||||
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
|
||||
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=mxLoadResources=!1,mxLanguage="en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
|
||||
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.6.2",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
|
||||
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.6.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
|
||||
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
|
||||
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
|
||||
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
|
||||
|
|
2
war/js/viewer.min.js
vendored
2
war/js/viewer.min.js
vendored
|
@ -2583,7 +2583,7 @@ IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R
|
|||
IMAGE_PATH+"/spin.gif";Editor.tweetImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARlJREFUeNpi/P//PwM1ABMDlQDVDGKAeo0biMXwKOMD4ilA/AiInwDxfCBWBeIgINYDmwE1yB2Ir0Alsbl6JchONPwNiC8CsTPIDJjXuIBYG4gPAnE8EDMjGaQCxGFYLOAEYlYg/o3sNSkgfo1k2ykgLgRiIyAOwOIaGE6CmwE1SA6IZ0BNR1f8GY9BXugG2UMN+YtHEzr+Aw0OFINYgHgdCYaA8HUgZkM3CASEoYb9ItKgapQkhGQQKC0dJdKQx1CLsRoEArpAvAuI3+Ix5B8Q+2AkaiyZVgGId+MwBBQhKVhzB9QgKyDuAOJ90BSLzZBzQOyCK5uxQNnXoGlJHogfIOU7UCI9C8SbgHgjEP/ElRkZB115BBBgAPbkvQ/azcC0AAAAAElFTkSuQmCC":
|
||||
IMAGE_PATH+"/tweet.png";Editor.facebookImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAARVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADc6ur3AAAAFnRSTlMAYmRg2KVCC/oPq0uAcVQtHtvZuoYh/a7JUAAAAGJJREFUGNOlzkkOgCAMQNEvagvigBP3P6pRNoCJG/+myVu0RdsqxcQqQ/NFVkKQgqwDzoJ2WKajoB66atcAa0GjX0D8lJHwNGfknYJzY77LDtDZ+L74j0z26pZI2yYlMN9TL17xEd+fl1D+AAAAAElFTkSuQmCC":IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
|
||||
Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node width. Possible value are px or auto. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value are px or auto. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -26\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
|
||||
Editor.configure=function(a){ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;"1"==urlParams.dev&&
|
||||
Editor.configure=function(a){Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;"1"==urlParams.dev&&
|
||||
(Editor.prototype.editBlankUrl+="&dev=1",Editor.prototype.editBlankFallbackUrl+="&dev=1");var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var c=b.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],d=c.getElementsByTagName("div");null!=d&&0<d.length&&(c=d[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==b.nodeName){c=b.getAttribute("style")||"default-style2";
|
||||
if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled=
|
||||
"1"==urlParams.math||"1"==b.getAttribute("math");c=b.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;
|
||||
|
|
Loading…
Reference in a new issue