6.0.2.1 release
This commit is contained in:
parent
11f69642bb
commit
d002c3abb7
88 changed files with 2734 additions and 3449 deletions
20
ChangeLog
20
ChangeLog
|
@ -1,3 +1,23 @@
|
|||
08-DEC-2016: 6.0.2.1
|
||||
|
||||
- Adds edit option in HTML and SVG embed dialog
|
||||
- Moves tags, find plugins to editor
|
||||
- Uses mxGraph 3.7.0.0 beta 11
|
||||
- Fixes ignored width in viewer after page change
|
||||
- Adds number plugin for numbering shapes
|
||||
|
||||
06-DEC-2016: 6.0.2.0
|
||||
|
||||
- Stops allowing diagrams on new Conf Cloud pages
|
||||
- Fixes URL encoding for Conf Connect diagram names
|
||||
- Fixes page breaks, blank pages in PDF export
|
||||
- Fixes viewer in hidden containers for IE9-
|
||||
- Uses mxGraph 3.7.0.0 beta 10
|
||||
|
||||
02-DEC-2016: 6.0.1.9
|
||||
|
||||
- Adds context path to URL for Connect Rendermode
|
||||
|
||||
01-DEC-2016: 6.0.1.8
|
||||
|
||||
- Removes blocking DIV while inserting files
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
6.0.1.8
|
||||
6.0.2.1
|
|
@ -3,8 +3,8 @@ var mxClient={VERSION:"3.7.0.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_
|
|||
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/")||
|
||||
0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_WIN:0<navigator.appVersion.indexOf("Win"),
|
||||
IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('\x3clink rel\x3d"'+a+'" href\x3d"'+b+'" charset\x3d"ISO-8859-1" type\x3d"text/css"/\x3e');else{var d=c.createElement("link");d.setAttribute("rel",
|
||||
a);d.setAttribute("href",b);d.setAttribute("charset","ISO-8859-1");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
|
||||
IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('\x3clink rel\x3d"'+a+'" href\x3d"'+b+'" charset\x3d"UTF-8" type\x3d"text/css"/\x3e');else{var d=c.createElement("link");d.setAttribute("rel",
|
||||
a);d.setAttribute("href",b);d.setAttribute("charset","UTF-8");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
|
||||
"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);"undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";
|
||||
"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;
|
||||
mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
|
||||
|
@ -469,26 +469,27 @@ a.lineTo(u+v*f,x-y*f),a.quadTo(E,F,C,D),function(b,c){B.push(function(){a.lineTo
|
|||
a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,r,s,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,q.x,q.y,-y,-v,c,e,f,m,!0),a.stroke(),a.end()))}};
|
||||
mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,k,l,m){g=k/g;var n=k*e/2;k=-k*d/2;var p=(l+f)*d;f=(l+f)*e;m?a.moveTo(b-n+p,c-k+f):a.lineTo(b-n+p,c-k+f);a.lineTo(b-n/g+p,c-k/g+f);a.lineTo(b+l*d,c+l*e);a.lineTo(b+n/g+p,c+k/g+f);a.lineTo(b+n+p,c+k+f)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
|
||||
mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
|
||||
function mxText(a,b,c,d,e,f,g,k,l,m,n,p,q,s,r,t,y,x,z,v,u){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);this.spacingBottom=this.spacing+parseInt(p||
|
||||
0);this.spacingLeft=this.spacing+parseInt(q||0);this.horizontal=null!=s?s:!0;this.background=r;this.border=t;this.wrap=null!=y?y:!1;this.clipped=null!=x?x:!1;this.overflow=null!=z?z:"visible";this.labelPadding=null!=v?v:0;this.textDirection=u;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
|
||||
mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
|
||||
function mxText(a,b,c,d,e,f,g,k,l,m,n,p,q,s,r,t,y,x,z,v,u){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
|
||||
this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(q||0);this.horizontal=null!=s?s:!0;this.background=r;this.border=t;this.wrap=null!=y?y:!1;this.clipped=null!=x?x:!1;this.overflow=null!=z?z:"visible";this.labelPadding=null!=v?v:0;this.textDirection=u;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
|
||||
mxText.prototype.replaceLinefeeds=!0;mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
|
||||
mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
|
||||
mxText.prototype.paint=function(a,b){var c=this.scale,d=this.bounds.x/c,e=this.bounds.y/c,f=this.bounds.width/c,c=this.bounds.height/c;this.updateTransform(a,d,e,f,c);this.configureCanvas(a,d,e,f,c);if(b){var g=null!=this.state?this.state.unscaledWidth:null;null!=this.node.firstChild&&this.lastUnscaledWidth!=g&&a.invalidateCachedOffsetSize(this.node);a.updateText(d,e,f,c,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node)}else{var k=(g=mxUtils.isNode(this.value)||
|
||||
this.dialect==mxConstants.DIALECT_STRICTHTML)||a instanceof mxVmlCanvas2D?"html":"",l=this.value;!g&&"html"==k&&(l=mxUtils.htmlEntities(l,!1));"html"==k&&!mxUtils.isNode(this.value)&&(l=mxUtils.replaceTrailingNewlines(l,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));var l=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==k?l.replace(/\n/g,"\x3cbr/\x3e"):l,m=this.textDirection;m==mxConstants.TEXT_DIRECTION_AUTO&&!g&&(m=this.getAutoDirection());m!=mxConstants.TEXT_DIRECTION_LTR&&m!=mxConstants.TEXT_DIRECTION_RTL&&
|
||||
(m=null);a.text(d,e,f,c,l,this.align,this.valign,this.wrap,k,this.overflow,this.clipped,this.getTextRotation(),m)}this.lastUnscaledWidth=null!=this.state?this.state.unscaledWidth:null};
|
||||
mxText.prototype.redraw=function(){if(this.visible&&this.checkBounds()&&this.cacheEnabled&&this.lastValue==this.value&&(mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML))if("DIV"==this.node.nodeName&&(this.isHtmlAllowed()||!mxClient.IS_VML))this.updateSize(this.node,null==this.state||null==this.state.view.textDiv),mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform(),this.updateBoundingBox();else{var a=this.createCanvas();
|
||||
null!=a&&null!=a.updateText&&null!=a.invalidateCachedOffsetSize?(this.paint(a,!0),this.destroyCanvas(a),this.updateBoundingBox()):mxShape.prototype.redraw.apply(this,arguments)}else mxShape.prototype.redraw.apply(this,arguments),mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML?this.lastValue=this.value:this.lastValue=null};
|
||||
mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.valign=this.align="";this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacing=2;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=0;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;delete this.margin};
|
||||
mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.align=mxConstants.ALIGN_CENTER;this.valign=mxConstants.ALIGN_MIDDLE;this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacing=2;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=0;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;
|
||||
delete this.margin};
|
||||
mxText.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign=
|
||||
mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing),this.spacingTop=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop)+this.spacing,this.spacingRight=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight)+this.spacing,this.spacingBottom=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom)+this.spacing,this.spacingLeft=mxUtils.getValue(this.style,
|
||||
mxConstants.STYLE_SPACING_LEFT,this.spacingLeft)+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.updateMargin());this.flipH=this.flipV=
|
||||
null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0<a.length&&"z"<a[0]?mxConstants.TEXT_DIRECTION_RTL:mxConstants.TEXT_DIRECTION_LTR};
|
||||
mxConstants.STYLE_SPACING_LEFT,this.spacingLeft)+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_OPACITY,
|
||||
100),this.updateMargin());this.flipH=this.flipV=null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0<a.length&&"z"<a[0]?mxConstants.TEXT_DIRECTION_RTL:mxConstants.TEXT_DIRECTION_LTR};
|
||||
mxText.prototype.updateBoundingBox=function(){var a=this.node;this.boundingBox=this.bounds.clone();var b=this.getTextRotation(),c=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER):null,d=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE):null;if(!this.ignoreStringSize&&null!=a&&"fill"!=this.overflow&&(!this.clipped||!this.ignoreClippedStringSize||c!=mxConstants.ALIGN_CENTER||d!=mxConstants.ALIGN_MIDDLE)){d=
|
||||
c=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,c=parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();if("string"==typeof this.value&&0==mxUtils.trim(this.value)){this.boundingBox=null;return}if(0==e.width&&0==e.height){this.boundingBox=null;return}this.boundingBox=new mxRectangle(e.x,e.y,e.width,e.height);b=0}catch(f){}else c=
|
||||
null!=this.state?this.state.view.textDiv:null,null!=this.offsetWidth&&null!=this.offsetHeight||(null!=c&&(this.updateFont(c),this.updateSize(c,!1),this.updateInnerHtml(c),a=c),e=a,8==document.documentMode&&!mxClient.IS_EM?(d=Math.round(this.bounds.width/this.scale),this.wrap&&0<d?(a.style.wordWrap=mxConstants.WORD_WRAP,a.style.whiteSpace="normal","break-word"!=a.style.wordWrap&&(a=e.getElementsByTagName("div"),0<a.length&&(e=a[a.length-1]),c=e.offsetWidth+2,a=this.node.getElementsByTagName("div"),
|
||||
this.clipped&&(c=Math.min(d,c)),1<a.length&&(a[a.length-2].style.width=c+"px"))):a.style.whiteSpace="nowrap"):null!=e.firstChild&&"DIV"==e.firstChild.nodeName&&(e=e.firstChild),this.offsetWidth=e.offsetWidth+this.textWidthPadding,this.offsetHeight=e.offsetHeight),c=this.offsetWidth*this.scale,d=this.offsetHeight*this.scale;null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x+this.margin.x*c,this.bounds.y+this.margin.y*d,c,d))}else this.boundingBox.x+=this.margin.x*this.boundingBox.width,
|
||||
this.boundingBox.y+=this.margin.y*this.boundingBox.height;null!=this.boundingBox&&(0!=b?(this.unrotatedBoundingBox=mxRectangle.fromRectangle(this.boundingBox),b=mxUtils.getBoundingBox(this.boundingBox,b),this.boundingBox.x=b.x,this.boundingBox.y=b.y,mxClient.IS_QUIRKS||(this.boundingBox.width=b.width,this.boundingBox.height=b.height)):this.unrotatedBoundingBox=null)};mxText.prototype.getShapeRotation=function(){return 0};
|
||||
mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
|
||||
c=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,c=parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();"string"==typeof this.value&&0==mxUtils.trim(this.value)?this.boundingBox=null:this.boundingBox=0==e.width&&0==e.height?null:new mxRectangle(e.x,e.y,e.width,e.height);return}catch(f){}else c=null!=this.state?this.state.view.textDiv:
|
||||
null,null!=this.offsetWidth&&null!=this.offsetHeight||(null!=c&&(this.updateFont(c),this.updateSize(c,!1),this.updateInnerHtml(c),a=c),e=a,8==document.documentMode&&!mxClient.IS_EM?(d=Math.round(this.bounds.width/this.scale),this.wrap&&0<d?(a.style.wordWrap=mxConstants.WORD_WRAP,a.style.whiteSpace="normal","break-word"!=a.style.wordWrap&&(a=e.getElementsByTagName("div"),0<a.length&&(e=a[a.length-1]),c=e.offsetWidth+2,a=this.node.getElementsByTagName("div"),this.clipped&&(c=Math.min(d,c)),1<a.length&&
|
||||
(a[a.length-2].style.width=c+"px"))):a.style.whiteSpace="nowrap"):null!=e.firstChild&&"DIV"==e.firstChild.nodeName&&(e=e.firstChild),this.offsetWidth=e.offsetWidth+this.textWidthPadding,this.offsetHeight=e.offsetHeight),c=this.offsetWidth*this.scale,d=this.offsetHeight*this.scale;null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x,this.bounds.y,c,d))}null!=this.boundingBox&&(0!=b?(b=mxUtils.getBoundingBox(new mxRectangle(this.margin.x*this.boundingBox.width,this.margin.y*this.boundingBox.height,
|
||||
this.boundingBox.width,this.boundingBox.height),b,new mxPoint(0,0)),this.unrotatedBoundingBox=mxRectangle.fromRectangle(this.boundingBox),this.unrotatedBoundingBox.x+=this.margin.x*this.unrotatedBoundingBox.width,this.unrotatedBoundingBox.y+=this.margin.y*this.unrotatedBoundingBox.height,this.boundingBox.x+=b.x,this.boundingBox.y+=b.y,this.boundingBox.width=b.width,this.boundingBox.height=b.height):(this.boundingBox.x+=this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height,
|
||||
this.unrotatedBoundingBox=null))};mxText.prototype.getShapeRotation=function(){return 0};mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
|
||||
mxText.prototype.configureCanvas=function(a,b,c,d,e){mxShape.prototype.configureCanvas.apply(this,arguments);a.setFontColor(this.color);a.setFontBackgroundColor(this.background);a.setFontBorderColor(this.border);a.setFontFamily(this.family);a.setFontSize(this.size);a.setFontStyle(this.fontStyle)};
|
||||
mxText.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width="1px";this.node.style.height="1px";this.node.style.overflow="visible"};
|
||||
mxText.prototype.redrawHtmlShape=function(){var a=this.node.style;a.whiteSpace="normal";a.overflow="";a.width="";a.height="";this.updateValue();this.updateFont(this.node);this.updateSize(this.node,null==this.state||null==this.state.view.textDiv);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()};
|
||||
|
@ -788,7 +789,7 @@ mxCell.prototype.isCollapsed=function(){return 0!=this.collapsed};mxCell.prototy
|
|||
mxCell.prototype.getIndex=function(a){return mxUtils.indexOf(this.children,a)};mxCell.prototype.getChildAt=function(a){return null==this.children?null:this.children[a]};mxCell.prototype.insert=function(a,b){null!=a&&(null==b&&(b=this.getChildCount(),a.getParent()==this&&b--),a.removeFromParent(),a.setParent(this),null==this.children?(this.children=[],this.children.push(a)):this.children.splice(b,0,a));return a};
|
||||
mxCell.prototype.remove=function(a){var b=null;null!=this.children&&0<=a&&(b=this.getChildAt(a),null!=b&&(this.children.splice(a,1),b.setParent(null)));return b};mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var a=this.parent.getIndex(this);this.parent.remove(a)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(a){return mxUtils.indexOf(this.edges,a)};
|
||||
mxCell.prototype.getEdgeAt=function(a){return null==this.edges?null:this.edges[a]};mxCell.prototype.insertEdge=function(a,b){if(null!=a&&(a.removeFromTerminal(b),a.setTerminal(this,b),null==this.edges||a.getTerminal(!b)!=this||0>mxUtils.indexOf(this.edges,a)))null==this.edges&&(this.edges=[]),this.edges.push(a);return a};mxCell.prototype.removeEdge=function(a,b){if(null!=a){if(a.getTerminal(!b)!=this&&null!=this.edges){var c=this.getEdgeIndex(a);0<=c&&this.edges.splice(c,1)}a.setTerminal(null,b)}return a};
|
||||
mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var b=this.getValue();return null!=b&&b.nodeType==mxConstants.NODETYPE_ELEMENT?b.hasAttribute(a):!1};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};
|
||||
mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var b=this.getValue();return null!=b&&b.nodeType==mxConstants.NODETYPE_ELEMENT&&b.hasAttribute?b.hasAttribute(a):null!=b.getAttribute(a)};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};
|
||||
mxCell.prototype.setAttribute=function(a,b){var c=this.getValue();null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.setAttribute(a,b)};mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(){var a=this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,b,c,d){mxRectangle.call(this,a,b,c,d)}mxGeometry.prototype=new mxRectangle;
|
||||
mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1;
|
||||
mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,b){b?this.sourcePoint=a:this.targetPoint=a;return a};
|
||||
|
@ -827,7 +828,7 @@ g.writeln(k);mxClient.IS_VML?g.writeln('\x3chtml xmlns:v\x3d"urn:schemas-microso
|
|||
(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var q=this.pageFormat.width-2*this.border,s=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=n;l.height/=n;var r=Math.max(1,Math.ceil((l.width+this.x0)/q)),t=Math.max(1,Math.ceil((l.height+this.y0)/s));this.pageCount=r*t;var y=mxUtils.bind(this,function(){if(this.pageSelector&&(1<t||1<r)){var a=this.createPageSelector(t,r);g.body.appendChild(a);
|
||||
if(mxClient.IS_IE&&null==g.documentMode||5==g.documentMode||8==g.documentMode||7==g.documentMode){a.style.position="absolute";var b=function(){a.style.top=(g.body.scrollTop||g.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}}),x=mxUtils.bind(this,function(a,b){null!=this.borderColor&&(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background=this.backgroundColor;
|
||||
if(c||b)a.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),g.body.appendChild(a));(c||b)&&this.addPageBreak(g)}),z=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=z)for(var v=0;v<z.length;v++)x(z[v],!0);for(var u=this.getAppendices(this.pageFormat.width,this.pageFormat.height),v=0;v<t;v++){var A=v*s/this.scale-this.y0/this.scale+(l.y-p.y*m)/m;for(a=0;a<
|
||||
r;a++){if(null==this.wnd)return null;var C=a*q/this.scale-this.x0/this.scale+(l.x-p.x*m)/m,B=v*r+a+1,G=new mxRectangle(C,A,q,s),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-C,-A,this.scale,B,a,G);this.printBackgroundImage&&this.insertBackgroundImage(a,-C,-A)}),B);f.setAttribute("id","mxPage-"+B);x(f,null!=u||v<t-1||a<r-1)}}if(null!=u)for(v=0;v<u.length;v++)x(u[v],v<u.length);b&&!d&&(this.closeDocument(),y());this.wnd.focus()}catch(H){null!=
|
||||
r;a++){if(null==this.wnd)return null;var C=a*q/this.scale-this.x0/this.scale+(l.x-p.x*m)/m,B=v*r+a+1,G=new mxRectangle(C,A,q,s),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-C,-A,this.scale,B,a,G);this.printBackgroundImage&&this.insertBackgroundImage(a,-C,-A)}),B);f.setAttribute("id","mxPage-"+B);x(f,null!=u||v<t-1||a<r-1)}}if(null!=u)for(v=0;v<u.length;v++)x(u[v],v<u.length-1);b&&!d&&(this.closeDocument(),y());this.wnd.focus()}catch(H){null!=
|
||||
f&&null!=f.parentNode&&f.parentNode.removeChild(f)}finally{this.graph.cellRenderer.initializeOverlay=e}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var b=a.createElement("hr");b.className="mxPageBreak";a.body.appendChild(b)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close();mxEvent.release(a.body)}};
|
||||
mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("\x3ctitle\x3e"+this.title+"\x3c/title\x3e");mxClient.IS_VML&&a.writeln('\x3cstyle type\x3d"text/css"\x3ev\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}\x3c/style\x3e');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('\x3cstyle type\x3d"text/css"\x3e');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");
|
||||
a.writeln("}");a.writeln("@media screen {");a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("\x3c/style\x3e")};mxPrintPreview.prototype.writePostfix=function(a){};
|
||||
|
@ -921,9 +922,9 @@ e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a));mxEvent.consume(b)},f
|
|||
mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0};
|
||||
mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(c){var e=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(c).nodeName||mxClient.IS_TOUCH)e=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b.container,e,c),e=b.view.getState(b.getCellAt(c.x,c.y));return e};mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c,a))}),mxUtils.bind(this,
|
||||
function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d,c(d)))}),mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d,c(d)))}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&(b.dblClick(c,a.cell),mxEvent.consume(c))}))};
|
||||
mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph;b&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),a.text.opacity=mxUtils.getValue(a.style,mxConstants.STYLE_TEXT_OPACITY,100));var e=this.getLabelBounds(a),f=
|
||||
d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,k=a.style[mxConstants.STYLE_OVERFLOW]||"visible";if(b||a.text.value!=c||a.text.isWrapping!=f||a.text.overflow!=k||a.text.isClipping!=d||a.text.scale!=this.getTextScale(a)||a.text.dialect!=g||!a.text.bounds.equals(e))a.text.dialect=g,a.text.value=c,a.text.bounds=e,a.text.scale=this.getTextScale(a),a.text.wrap=f,a.text.clipped=d,a.text.overflow=
|
||||
k,c=a.text.node.style.visibility,this.redrawLabelShape(a.text),a.text.node.style.visibility=c}};
|
||||
mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph;b&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),a.text.valign=d.getVerticalAlign(a));var e=this.getLabelBounds(a),f=d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),
|
||||
g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,k=a.style[mxConstants.STYLE_OVERFLOW]||"visible";if(b||a.text.value!=c||a.text.isWrapping!=f||a.text.overflow!=k||a.text.isClipping!=d||a.text.scale!=this.getTextScale(a)||a.text.dialect!=g||!a.text.bounds.equals(e))a.text.dialect=g,a.text.value=c,a.text.bounds=e,a.text.scale=this.getTextScale(a),a.text.wrap=f,a.text.clipped=d,a.text.overflow=k,c=a.text.node.style.visibility,this.redrawLabelShape(a.text),
|
||||
a.text.node.style.visibility=c}};
|
||||
mxCellRenderer.prototype.isTextShapeInvalid=function(a,b){function c(c,e,f){return b[c]!=(a.style[e]||f)}return c("fontStyle",mxConstants.STYLE_FONTSTYLE,mxConstants.DEFAULT_FONTSTYLE)||c("family",mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY)||c("size",mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)||c("color",mxConstants.STYLE_FONTCOLOR,"black")||c("align",mxConstants.STYLE_ALIGN,"")||c("valign",mxConstants.STYLE_VERTICAL_ALIGN,"")||c("spacing",mxConstants.STYLE_SPACING,2)||
|
||||
c("spacingTop",mxConstants.STYLE_SPACING_TOP,2)||c("spacingRight",mxConstants.STYLE_SPACING_RIGHT,2)||c("spacingBottom",mxConstants.STYLE_SPACING_BOTTOM,2)||c("spacingLeft",mxConstants.STYLE_SPACING_LEFT,2)||c("horizontal",mxConstants.STYLE_HORIZONTAL,!0)||c("background",mxConstants.STYLE_LABEL_BACKGROUNDCOLOR)||c("border",mxConstants.STYLE_LABEL_BORDERCOLOR)||c("opacity",mxConstants.STYLE_TEXT_OPACITY,100)||c("textDirection",mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION)};
|
||||
mxCellRenderer.prototype.redrawLabelShape=function(a){a.redraw()};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};
|
||||
|
@ -1063,7 +1064,7 @@ mxGraph.prototype.resetEdgesOnResize=!1;mxGraph.prototype.resetEdgesOnMove=!1;mx
|
|||
mxGraph.prototype.swimlaneNesting=!0;mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=0.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
|
||||
mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
|
||||
mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(a){return this.isEditing()||!this.isMouseDown&&!mxEvent.isShiftDown(a)})));8==document.documentMode&&
|
||||
a.insertAdjacentHTML("beforeend",'\x3cv:group style\x3d"DISPLAY: none;"\x3e\x3c/v:group\x3e')};
|
||||
a.insertAdjacentHTML("beforeend","\x3c"+mxClient.VML_PREFIX+':group style\x3d"DISPLAY: none;"\x3e\x3c/'+mxClient.VML_PREFIX+":group\x3e")};
|
||||
mxGraph.prototype.createHandlers=function(){this.tooltipHandler=this.createTooltipHandler();this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=this.createSelectionCellsHandler();this.connectionHandler=this.createConnectionHandler();this.connectionHandler.setEnabled(!1);this.graphHandler=this.createGraphHandler();this.panningHandler=this.createPanningHandler();this.panningHandler.panningEnabled=!1;this.popupMenuHandler=this.createPopupMenuHandler()};
|
||||
mxGraph.prototype.createTooltipHandler=function(){return new mxTooltipHandler(this)};mxGraph.prototype.createSelectionCellsHandler=function(){return new mxSelectionCellsHandler(this)};mxGraph.prototype.createConnectionHandler=function(){return new mxConnectionHandler(this)};mxGraph.prototype.createGraphHandler=function(){return new mxGraphHandler(this)};mxGraph.prototype.createPanningHandler=function(){return new mxPanningHandler(this)};mxGraph.prototype.createPopupMenuHandler=function(){return new mxPopupMenuHandler(this)};
|
||||
mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
|
||||
|
@ -1357,7 +1358,7 @@ mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=b.sourc
|
|||
mxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()){var c=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var d=b.getCell();if(this.connectOnDrop&&null==this.target&&null!=d&&c.getModel().isVertex(d)&&c.isCellConnectable(d)&&c.isEdgeValid(null,this.cell,d))c.connectionHandler.connect(this.cell,d,b.getEvent());else{var d=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),e=c.getView().scale,f=this.roundLength(this.currentDx/
|
||||
e),e=this.roundLength(this.currentDy/e),g=this.target;c.isSplitEnabled()&&c.isSplitTarget(g,this.cells,b.getEvent())?c.splitEdge(g,this.cells,null,f,e):this.moveCells(this.cells,f,e,d,this.target,b.getEvent())}}else this.isSelectEnabled()&&(this.delayedSelection&&null!=this.cell)&&this.selectDelayed(b)}this.cellWasClicked&&b.consume();this.reset()};
|
||||
mxGraphHandler.prototype.selectDelayed=function(a){(!this.graph.isCellSelected(this.cell)||!this.graph.popupMenuHandler.isPopupTrigger(a))&&this.graph.selectCellForEvent(this.cell,a.getEvent())};mxGraphHandler.prototype.reset=function(){this.destroyShapes();this.removeHint();this.delayedSelection=this.cellWasClicked=!1;this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null};
|
||||
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)){a=this.graph.getView().getState(a);c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return null!=a&&!mxUtils.contains(a,c.x,c.y)}return!1};
|
||||
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)&&(a=this.graph.getView().getState(a),null!=a)){c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return!mxUtils.contains(a,c.x,c.y)}return!1};
|
||||
mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));null==e&&(this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),a,f))&&(e=this.graph.getDefaultParent());a=this.graph.moveCells(a,b-this.graph.panDx/this.graph.view.scale,c-this.graph.panDy/this.graph.view.scale,d,e,f);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0]);d&&this.graph.setSelectionCells(a)};
|
||||
mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null);this.destroyShapes();this.removeHint()};
|
||||
function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");d==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(e)&&(this.start(e),this.active=!0,this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",e)),e.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler),this.gestureHandler=mxUtils.bind(this,function(a,c){if(this.isPinchEnabled()){var d=
|
||||
|
@ -1738,7 +1739,7 @@ a),null!=b&&(this.graph.constrainChild(b),this.fireEvent(new mxEventObject(mxEve
|
|||
mxEditor.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tasks&&this.tasks.destroy(),null!=this.outline&&this.outline.destroy(),null!=this.properties&&this.properties.destroy(),null!=this.keyHandler&&this.keyHandler.destroy(),null!=this.rubberband&&this.rubberband.destroy(),null!=this.toolbar&&this.toolbar.destroy(),null!=this.graph&&this.graph.destroy(),this.templates=this.status=null)};
|
||||
var mxCodecRegistry={codecs:[],aliases:[],register:function(a){if(null!=a){var b=a.getName();mxCodecRegistry.codecs[b]=a;var c=mxUtils.getFunctionName(a.template.constructor);c!=b&&mxCodecRegistry.addAlias(c,b)}return a},addAlias:function(a,b){mxCodecRegistry.aliases[a]=b},getCodec:function(a){var b=null;if(null!=a){var b=mxUtils.getFunctionName(a),c=mxCodecRegistry.aliases[b];null!=c&&(b=c);b=mxCodecRegistry.codecs[b];if(null==b)try{b=new mxObjectCodec(new a),mxCodecRegistry.register(b)}catch(d){}}return b}};
|
||||
function mxCodec(a){this.document=a||mxUtils.createXmlDocument();this.objects=[]}mxCodec.prototype.document=null;mxCodec.prototype.objects=null;mxCodec.prototype.elements=null;mxCodec.prototype.encodeDefaults=!1;mxCodec.prototype.putObject=function(a,b){return this.objects[a]=b};mxCodec.prototype.getObject=function(a){var b=null;null!=a&&(b=this.objects[a],null==b&&(b=this.lookup(a),null==b&&(a=this.getElementById(a),null!=a&&(b=this.decode(a)))));return b};mxCodec.prototype.lookup=function(a){return null};
|
||||
mxCodec.prototype.getElementById=function(a){null==this.elements&&(this.elements={},this.addElement(this.document.documentElement));return this.elements[a]};mxCodec.prototype.addElement=function(a){if(a.nodeType==mxConstants.NODETYPE_ELEMENT){var b=a.getAttribute("id");null!=b&&null==this.elements[b]&&(this.elements[b]=a)}for(a=a.firstChild;null!=a;)this.addElement(a),a=a.nextSibling};
|
||||
mxCodec.prototype.getElementById=function(a){if(null==this.elements){if(null==this.document.documentElement)throw Error("mxCodec constructor needs document parameter");this.elements={};this.addElement(this.document.documentElement)}return this.elements[a]};mxCodec.prototype.addElement=function(a){if(a.nodeType==mxConstants.NODETYPE_ELEMENT){var b=a.getAttribute("id");null!=b&&null==this.elements[b]&&(this.elements[b]=a)}for(a=a.firstChild;null!=a;)this.addElement(a),a=a.nextSibling};
|
||||
mxCodec.prototype.getId=function(a){var b=null;null!=a&&(b=this.reference(a),null==b&&a instanceof mxCell&&(b=a.getId(),null==b&&(b=mxCellPath.create(a),0==b.length&&(b="root"))));return b};mxCodec.prototype.reference=function(a){return null};mxCodec.prototype.encode=function(a){var b=null;if(null!=a&&null!=a.constructor){var c=mxCodecRegistry.getCodec(a.constructor);null!=c?b=c.encode(this,a):mxUtils.isNode(a)?b=mxUtils.importNode(this.document,a,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(a.constructor))}return b};
|
||||
mxCodec.prototype.decode=function(a,b){var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=null;try{c=window[a.nodeName]}catch(d){}c=mxCodecRegistry.getCodec(c);null!=c?c=c.decode(this,a,b):(c=a.cloneNode(!0),c.removeAttribute("as"))}return c};mxCodec.prototype.encodeCell=function(a,b,c){b.appendChild(this.encode(a));if(null==c||c){c=a.getChildCount();for(var d=0;d<c;d++)this.encodeCell(a.getChildAt(d),b)}};
|
||||
mxCodec.prototype.isCellCodec=function(a){return null!=a&&"function"==typeof a.isCellCodec?a.isCellCodec():!1};mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=mxCodecRegistry.getCodec(a.nodeName);if(!this.isCellCodec(c))for(var d=a.firstChild;null!=d&&!this.isCellCodec(c);)c=mxCodecRegistry.getCodec(d.nodeName),d=d.nextSibling;this.isCellCodec(c)||(c=mxCodecRegistry.getCodec(mxCell));c=c.decode(this,a);b&&this.insertIntoGraph(c)}return c};
|
||||
|
|
|
@ -481,7 +481,7 @@ public class mxVsdxCodec
|
|||
|
||||
//styleMap.put(mxConstants.STYLE_FILLCOLOR, subShape2.getColor());
|
||||
//TODO need to check if "shape=" should be added before the shape name (for "image", it should be skipped for example)
|
||||
String style = ";" + mxVsdxUtils.getStyleString(styleMap, "=");
|
||||
String style = mxVsdxUtils.getStyleString(styleMap, "=");
|
||||
|
||||
mxCell group = null;
|
||||
|
||||
|
@ -640,7 +640,7 @@ public class mxVsdxCodec
|
|||
if (geomExists || !textLabel.isEmpty() || shape.hasScratchControl()
|
||||
|| shape.isDisplacedLabel())
|
||||
{
|
||||
String style = ";vsdx16Vertex;" + mxVsdxUtils.getStyleString(styleMap, "=");
|
||||
String style = mxVsdxUtils.getStyleString(styleMap, "=");
|
||||
|
||||
mxCell v1 = null;
|
||||
|
||||
|
@ -802,7 +802,7 @@ public class mxVsdxCodec
|
|||
.getStyleFromEdgeShape(parentHeight);
|
||||
//Insert new edge and set constraints.
|
||||
Object edge = graph.insertEdge(parent, null, edgeShape.getTextLabel(), source,
|
||||
target, ";" + mxVsdxUtils.getStyleString(styleMap, "="));
|
||||
target, mxVsdxUtils.getStyleString(styleMap, "="));
|
||||
|
||||
mxGeometry edgeGeometry = graph.getModel().getGeometry(edge);
|
||||
edgeGeometry.setPoints(edgeShape.getRoutingPoints(parentHeight, beginXY));
|
||||
|
@ -861,7 +861,7 @@ public class mxVsdxCodec
|
|||
//TODO add style numeric entries rounding option
|
||||
|
||||
//Insert new edge and set constraints.
|
||||
Object edge = graph.insertEdge(parent, null, edgeShape.getTextLabel(), null, null, ";" + mxVsdxUtils.getStyleString(styleMap, "="));
|
||||
Object edge = graph.insertEdge(parent, null, edgeShape.getTextLabel(), null, null, mxVsdxUtils.getStyleString(styleMap, "="));
|
||||
mxGeometry edgeGeometry = graph.getModel().getGeometry(edge);
|
||||
edgeGeometry.setPoints(edgeShape.getRoutingPoints(parentHeight, beginXY));
|
||||
|
||||
|
|
50
src/com/mxgraph/io/vsdx/Paragraph.java
Normal file
50
src/com/mxgraph/io/vsdx/Paragraph.java
Normal file
|
@ -0,0 +1,50 @@
|
|||
/**
|
||||
* Copyright (c) 2006-2016, JGraph Ltd
|
||||
* Copyright (c) 2006-2016, Gaudenz Alder
|
||||
*/
|
||||
package com.mxgraph.io.vsdx;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Represents a single formatted section of text
|
||||
*
|
||||
*/
|
||||
public class Paragraph
|
||||
{
|
||||
protected ArrayList<String> values;
|
||||
|
||||
protected ArrayList<String> charIndex;
|
||||
|
||||
protected String paraIndex;
|
||||
|
||||
public Paragraph(String val, String ch, String pg)
|
||||
{
|
||||
this.values = new ArrayList<String>();
|
||||
this.values.add(val);
|
||||
this.charIndex = new ArrayList<String>();
|
||||
this.charIndex.add(ch);
|
||||
this.paraIndex = pg;
|
||||
}
|
||||
|
||||
public void addValue(String val, String ch)
|
||||
{
|
||||
this.values.add(val);
|
||||
this.charIndex.add(ch);
|
||||
}
|
||||
|
||||
public String getParagraphIndex()
|
||||
{
|
||||
return this.paraIndex;
|
||||
}
|
||||
|
||||
public String getValue(int index)
|
||||
{
|
||||
return values.get(index);
|
||||
}
|
||||
|
||||
public String getChar(int index)
|
||||
{
|
||||
return charIndex.get(index);
|
||||
}
|
||||
}
|
|
@ -8,27 +8,44 @@ import java.util.ArrayList;
|
|||
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* Wrapper for a Section element https://msdn.microsoft.com/en-us/library/office/jj684189.aspx
|
||||
*
|
||||
*/
|
||||
public class Section
|
||||
{
|
||||
/**
|
||||
* The section element
|
||||
*/
|
||||
protected Element elem = null;
|
||||
|
||||
/**
|
||||
* Constructs a new Section
|
||||
* @param elem the Element to wrap
|
||||
*/
|
||||
public Section(Element elem)
|
||||
{
|
||||
this.elem = elem;
|
||||
}
|
||||
|
||||
public Element getIndexedCell(Integer index, String cellKey)
|
||||
/**
|
||||
* Return the specified cell by key by row index, if it exists
|
||||
* @param index the row index to search
|
||||
* @param cellKey the name of the Cell to search for
|
||||
* @return the Element of the specified Cell, if null if it doesn't exist
|
||||
*/
|
||||
public Element getIndexedCell(String index, String cellKey)
|
||||
{
|
||||
ArrayList<Element> rows = mxVsdxUtils.getDirectChildNamedElements(this.elem, "row");
|
||||
ArrayList<Element> rows = mxVsdxUtils.getDirectChildNamedElements(this.elem, "Row");
|
||||
|
||||
for (int i=0; i < rows.size(); i++)
|
||||
{
|
||||
Element row = rows.get(i);
|
||||
String n = row.getAttribute("ix");
|
||||
String n = row.getAttribute("IX");
|
||||
|
||||
if (n.equals(index))
|
||||
{
|
||||
ArrayList<Element> cells = mxVsdxUtils.getDirectChildNamedElements(row, "cell");
|
||||
ArrayList<Element> cells = mxVsdxUtils.getDirectChildNamedElements(row, "Cell");
|
||||
|
||||
for (int j=0; j < cells.size(); j++)
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@ package com.mxgraph.io.vsdx;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -16,6 +17,7 @@ import org.w3c.dom.Node;
|
|||
import org.w3c.dom.NodeList;
|
||||
|
||||
import com.mxgraph.io.mxVsdxCodec;
|
||||
import com.mxgraph.util.mxConstants;
|
||||
|
||||
public class Shape extends Style
|
||||
{
|
||||
|
@ -24,6 +26,16 @@ public class Shape extends Style
|
|||
*/
|
||||
protected Element text;
|
||||
|
||||
/**
|
||||
* List of paragraphs in this shape
|
||||
*/
|
||||
protected LinkedHashMap<String,Paragraph> paragraphs = null;
|
||||
|
||||
/**
|
||||
* mxGraph cell style map
|
||||
*/
|
||||
Map<String, String> styleMap = new HashMap<String, String>();
|
||||
|
||||
protected double width = 0;
|
||||
|
||||
protected double height = 0;
|
||||
|
@ -949,4 +961,489 @@ public class Shape extends Style
|
|||
{
|
||||
return !(this.geom == null || this.geom.isEmpty());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Last cp IX referenced in the Text Element.
|
||||
*/
|
||||
String cp = "";
|
||||
|
||||
/**
|
||||
* Last pp IX referenced in the Text Element.
|
||||
*/
|
||||
String pp = "";
|
||||
|
||||
/**
|
||||
* Last tp IX referenced in the Text Element.
|
||||
*/
|
||||
String tp = "";
|
||||
|
||||
/**
|
||||
* Last fld IX referenced in the Text Element.
|
||||
*/
|
||||
String fld = "";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the text contained in the shape formated with tags html.<br/>
|
||||
* @return Text content in html.
|
||||
*/
|
||||
public String getHtmlTextContent(NodeList txtChildren)
|
||||
{
|
||||
String ret = "";
|
||||
boolean first = true;
|
||||
|
||||
if (txtChildren != null && txtChildren.getLength() > 0)
|
||||
{
|
||||
for (int index = 0; index < txtChildren.getLength(); index++)
|
||||
{
|
||||
Node node = txtChildren.item(index);
|
||||
|
||||
if (node.getNodeName().equals("cp"))
|
||||
{
|
||||
Element elem = (Element)node;
|
||||
cp = elem.getAttribute("IX");
|
||||
}
|
||||
else if (node.getNodeName().equals("tp"))
|
||||
{
|
||||
Element elem = (Element)node;
|
||||
tp = elem.getAttribute("IX");
|
||||
}
|
||||
else if (node.getNodeName().equals("pp"))
|
||||
{
|
||||
Element elem = (Element)node;
|
||||
pp = elem.getAttribute("IX");
|
||||
|
||||
if (first)
|
||||
{
|
||||
first = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret += "</p>";
|
||||
}
|
||||
|
||||
String para = "<p>";
|
||||
ret += getTextParagraphFormated(para);
|
||||
}
|
||||
else if (node.getNodeName().equals("fld"))
|
||||
{
|
||||
Element elem = (Element)node;
|
||||
fld = elem.getAttribute("IX");
|
||||
String text = elem.getTextContent();
|
||||
text = textToList(text, pp);
|
||||
text = text.replaceAll("\n", "<br/>");
|
||||
ret += getTextCharFormated(text);
|
||||
}
|
||||
else if (node.getNodeName().equals("#text"))
|
||||
{
|
||||
String text = node.getTextContent();
|
||||
|
||||
// There's a case in master shapes where the text element has the raw value "N".
|
||||
// The source tool doesn't render this. Example is ALM_Information_flow.vdx, the two label
|
||||
// edges in the center
|
||||
// if (!masterShapeOnly || !text.equals("N"))
|
||||
// {
|
||||
text = textToList(text, pp);
|
||||
// It's HTML text, so escape it.
|
||||
text = text.replaceAll("&", "&")
|
||||
.replaceAll("\"", """)
|
||||
.replaceAll("'", "′")
|
||||
.replaceAll("<", "<")
|
||||
.replaceAll(">", ">")
|
||||
.replaceAll("\n", "<br/>");
|
||||
ret += getTextCharFormated(text);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String end = first ? "" : "</p>";
|
||||
ret += end;
|
||||
mxVsdxUtils.surroundByTags(ret, "div");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform plain text into a HTML list if the Para element referenced by
|
||||
* pp indicates it.
|
||||
* @param text Text to be transformed.
|
||||
* @param pp Reference to a Para element.
|
||||
* @return Text like a HTML list.
|
||||
*/
|
||||
public String textToList(String text, String pp)
|
||||
{
|
||||
if (!pp.equals(""))
|
||||
{
|
||||
String bullet = getBullet(pp);
|
||||
|
||||
if (!bullet.equals("0"))
|
||||
{
|
||||
String[] entries = text.split("\n");
|
||||
String ret = "";
|
||||
|
||||
for (String entry : entries)
|
||||
{
|
||||
ret += mxVsdxUtils.surroundByTags(entry, "li");
|
||||
}
|
||||
|
||||
ret = mxVsdxUtils.surroundByTags(ret, "ul");
|
||||
HashMap<String, String> styleMap = new HashMap<String, String>();
|
||||
|
||||
if (bullet.equals("4"))
|
||||
{
|
||||
styleMap.put("list-style-type", "square");
|
||||
}
|
||||
else
|
||||
{
|
||||
styleMap.put("list-style-type", "disc");
|
||||
}
|
||||
|
||||
ret = this.insertAttributes(ret, styleMap);
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the paragraph formated according the properties in the last
|
||||
* Para element referenced.
|
||||
* @param para Paragraph to be formated
|
||||
* @return Formated paragraph.
|
||||
*/
|
||||
public String getTextParagraphFormated(String para)
|
||||
{
|
||||
String ret = "";
|
||||
HashMap<String, String> styleMap = new HashMap<String, String>();
|
||||
styleMap.put("align", getHorizontalAlign(pp, true));
|
||||
styleMap.put("margin-left", getIndentLeft(pp));
|
||||
styleMap.put("margin-right", getIndentRight(pp));
|
||||
styleMap.put("margin-top", getSpBefore(pp) + "px");
|
||||
styleMap.put("margin-bottom", getSpAfter(pp) + "px");
|
||||
styleMap.put("text-indent", getIndentFirst(pp));
|
||||
styleMap.put("valign", getAlignVertical());
|
||||
String spc = getSpcLine(pp);
|
||||
String spcNum = spc.replaceAll("[^\\d.]", "");
|
||||
String postFix = spc.substring(spcNum.length(),spc.length());
|
||||
double lineH = (Double.parseDouble(spcNum) / 0.71);
|
||||
spc = Double.toString(lineH);
|
||||
|
||||
if (spc.contains("."))
|
||||
{
|
||||
spc = spc.substring(0, spc.lastIndexOf(".") + 3);
|
||||
}
|
||||
|
||||
spc = spc + postFix;
|
||||
styleMap.put("line-height", spc);
|
||||
styleMap.put("direction", getTextDirection(pp));
|
||||
ret += insertAttributes(para, styleMap);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the text formated according the properties in the last
|
||||
* Char element referenced.
|
||||
* @param text Text to be formated
|
||||
* @return Formated text.
|
||||
*/
|
||||
public String getTextCharFormated(String text)
|
||||
{
|
||||
String ret = "";
|
||||
String color = "color:" + getTextColor(cp) + ";";
|
||||
String size = "font-size:" + (Double.parseDouble(this.getTextSize(cp)) / 0.71) + "px;";
|
||||
String font = "font-family:" + this.getTextFont(cp) + ";";
|
||||
String direction = "direction:" + this.getRtlText(cp) + ";";
|
||||
String space = "letter-spacing:" + (Double.parseDouble(this.getLetterSpace(cp)) / 0.71) + "px;";
|
||||
String pos = this.getTextPos(cp);
|
||||
String tCase = getTextCase(cp);
|
||||
|
||||
if (tCase.equals("1"))
|
||||
{
|
||||
text = text.toUpperCase();
|
||||
}
|
||||
else if (tCase.equals("2"))
|
||||
{
|
||||
text = mxVsdxUtils.toInitialCapital(text);
|
||||
}
|
||||
|
||||
if (pos.equals("1"))
|
||||
{
|
||||
text = mxVsdxUtils.surroundByTags(text, "sup");
|
||||
}
|
||||
else if (pos.equals("2"))
|
||||
{
|
||||
text = mxVsdxUtils.surroundByTags(text, "sub");
|
||||
}
|
||||
|
||||
text = this.isBold(cp) ? mxVsdxUtils.surroundByTags(text, "b") : text;
|
||||
text = this.isItalic(cp) ? mxVsdxUtils.surroundByTags(text, "i") : text;
|
||||
text = this.isUnderline(cp) ? mxVsdxUtils.surroundByTags(text, "u") : text;
|
||||
text = this.getTextStrike(cp) ? mxVsdxUtils.surroundByTags(text, "s") : text;
|
||||
text = this.isSmallCaps(cp) ? mxVsdxUtils.toSmallCaps(text, this.getTextSize(cp)) : text;
|
||||
|
||||
ret += "<font style=\"" + size + font + color + direction + space + "\">" + text + "</font>";
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the direction of the text. It may be right to left or left to right.<br/>
|
||||
* This property may to be founded in the shape, master shape, stylesheet or
|
||||
* default style-sheet.
|
||||
* @param index Index of the Para element that contains the Flags element.
|
||||
* @return The direction of the text.
|
||||
*/
|
||||
public String getTextDirection(String index)
|
||||
{
|
||||
String direction = getFlags(index);
|
||||
|
||||
if (direction.equals("0"))
|
||||
{
|
||||
direction = "ltr";
|
||||
}
|
||||
else if (direction.equals("1"))
|
||||
{
|
||||
direction = "rtl";
|
||||
}
|
||||
|
||||
return direction;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the space between lines in a paragraph.<br/>
|
||||
* This property may to be founded in the shape, master shape, stylesheet or
|
||||
* default style-sheet.
|
||||
* @param index Index of the Para element that contains the SpLine element.
|
||||
* @return The space between lines n pixels.
|
||||
*/
|
||||
public String getSpcLine(String index)
|
||||
{
|
||||
String ret = "0";
|
||||
boolean isPercent = false;
|
||||
double space = getSpLine(index);
|
||||
|
||||
if (space > 0)
|
||||
{
|
||||
space = space * mxVsdxUtils.conversionFactor;
|
||||
}
|
||||
else if (space == 0)
|
||||
{
|
||||
space = 100;
|
||||
isPercent = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
space = Math.abs(space) * 100;
|
||||
isPercent = true;
|
||||
}
|
||||
|
||||
ret = String.valueOf(space);
|
||||
ret += isPercent ? "%" : "px";
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the space before a paragraph.<br/>
|
||||
* This property may to be founded in the shape, master shape, stylesheet or
|
||||
* default style-sheet.
|
||||
* @param index Index of the Para element that contains the SpBefore element.
|
||||
* @return The space before the paragraph in pixels.
|
||||
*/
|
||||
public String getSpcBefore(String index)
|
||||
{
|
||||
return getSpBefore(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts the style attributes contained in attr into the text.<br/>
|
||||
* The text must be surrounded by tags html.
|
||||
* @param text Text where the attributes must be inserted.
|
||||
* @param attr Map with the attributes.
|
||||
* @return Text with the attributes applied like style.
|
||||
*/
|
||||
public String insertAttributes(String text, HashMap<String, String> attr)
|
||||
{
|
||||
if (text.contains(">"))
|
||||
{
|
||||
int i = text.indexOf(">");
|
||||
String tail = text.substring(i);
|
||||
String head = text.substring(0, i);
|
||||
|
||||
String style = " style=\"" + mxVsdxUtils.getStyleString(attr, ":") + "\"";
|
||||
return head + style + tail;
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the direction of the text. It may be right to left or left to right.<br/>
|
||||
* This property may to be founded in the shape, master shape, stylesheet or
|
||||
* default stylesheet.
|
||||
* @param index Index of the Char element that contains the RTLText element.
|
||||
* @return Direction of the text.
|
||||
*/
|
||||
public String getRtlText(String index)
|
||||
{
|
||||
Element rtlElem = getCellElement(mxVsdxConstants.RTL_TEXT, index, mxVsdxConstants.PARAGRAPH);
|
||||
String direction = getValue(rtlElem, "ltr");
|
||||
|
||||
|
||||
if (direction.equals("0"))
|
||||
{
|
||||
direction = "ltr";
|
||||
}
|
||||
else if (direction.equals("1"))
|
||||
{
|
||||
direction = "rtl";
|
||||
}
|
||||
|
||||
return direction;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the style property of the Char element of index = 'index'
|
||||
* indicates bold.<br/>
|
||||
* This property may to be founded in the shape, master shape, stylesheet or
|
||||
* default stylesheet.
|
||||
* @param index Index of the Char element that contains the Style element.
|
||||
* @return Returns <code>true</code> if the style property of the Char element of
|
||||
* index = 'index' indicates bold.
|
||||
*/
|
||||
public boolean isBold(String index)
|
||||
{
|
||||
boolean isBold = false;
|
||||
String style = getTextStyle(index);
|
||||
|
||||
if (!style.equals(""))
|
||||
{
|
||||
int value = Integer.parseInt(style);
|
||||
isBold = ((value & 1) == 1);
|
||||
}
|
||||
|
||||
return isBold;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the style property of the Char element of index = 'index'
|
||||
* indicates italic.<br/>
|
||||
* This property may to be founded in the shape, master shape, stylesheet or
|
||||
* default stylesheet.
|
||||
* @param index Index of the Char element that contains the Style element.
|
||||
* @return Returns <code>true</code> if the style property of the Char element of
|
||||
* index = 'index' indicates italic.
|
||||
*/
|
||||
public boolean isItalic(String index)
|
||||
{
|
||||
boolean isItalic = false;
|
||||
String style = getTextStyle(index);
|
||||
|
||||
if (!style.equals(""))
|
||||
{
|
||||
int value = Integer.parseInt(style);
|
||||
isItalic = ((value & 2) == 2);
|
||||
}
|
||||
|
||||
return isItalic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the style property of the Char element of index = 'index'
|
||||
* indicates underline.<br/>
|
||||
* This property may to be founded in the shape, master shape, stylesheet or
|
||||
* default stylesheet.
|
||||
* @param index Index of the Char element that contains the Style element.
|
||||
* @return Returns <code>true</code> if the style property of the Char element of
|
||||
* index = 'index' indicates underline.
|
||||
*/
|
||||
public boolean isUnderline(String index)
|
||||
{
|
||||
boolean isUnderline = false;
|
||||
String style = getTextStyle(index);
|
||||
|
||||
if (!style.equals(""))
|
||||
{
|
||||
int value = Integer.parseInt(style);
|
||||
isUnderline = ((value & 4) == 4);
|
||||
}
|
||||
|
||||
return isUnderline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the style property of the Char element of index = 'index'
|
||||
* indicates small caps.<br/>
|
||||
* This property may to be founded in the shape, master shape, stylesheet or
|
||||
* default stylesheet.
|
||||
* @param index Index of the Char element that contains the Style element.
|
||||
* @return Returns <code>true</code> if the style property of the Char element of
|
||||
* index = 'index' indicates small caps.
|
||||
*/
|
||||
public boolean isSmallCaps(String index)
|
||||
{
|
||||
boolean isSmallCaps = false;
|
||||
String style = getTextStyle(index);
|
||||
|
||||
if (!style.equals(""))
|
||||
{
|
||||
int value = Integer.parseInt(style);
|
||||
isSmallCaps = ((value & 8) == 8);
|
||||
}
|
||||
|
||||
return isSmallCaps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the actual text size defined by the Char element referenced in cp.<br/>
|
||||
* This property may to be founded in the shape, master shape, stylesheet or
|
||||
* default stylesheet.
|
||||
* @param index Index of the Char element that contains the Size element.
|
||||
* @return Returns the size of the font in pixels.
|
||||
*/
|
||||
public String getTextSize(String index)
|
||||
{
|
||||
Element sizeElem = getCellElement(mxVsdxConstants.SIZE, index, mxVsdxConstants.CHARACTER);
|
||||
double size = getValueAsDouble(sizeElem, 12) * 0.71;
|
||||
|
||||
return String.valueOf(size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the vertical align of the label.<br/>
|
||||
* The property may to be defined in master shape or text stylesheet.<br/>
|
||||
* @return Vertical align (bottom, middle and top)
|
||||
*/
|
||||
public String getAlignVertical()
|
||||
{
|
||||
String vertical = mxConstants.ALIGN_MIDDLE;
|
||||
|
||||
int align = Integer.parseInt(getValue(this.getCellElement(mxVsdxConstants.VERTICAL_ALIGN), "1"));
|
||||
|
||||
if (align == 0)
|
||||
{
|
||||
vertical = mxConstants.ALIGN_TOP;
|
||||
}
|
||||
else if (align == 2)
|
||||
{
|
||||
vertical = mxConstants.ALIGN_BOTTOM;
|
||||
}
|
||||
|
||||
return vertical;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
*/
|
||||
package com.mxgraph.io.vsdx;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
@ -14,13 +12,15 @@ import org.w3c.dom.Element;
|
|||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import com.mxgraph.util.mxConstants;
|
||||
|
||||
/**
|
||||
* This class is a general wrapper for one Shape Element.<br/>
|
||||
* Provides a set of methods for retrieving the value of different properties
|
||||
* stored in the shape element.<br/>
|
||||
* References to other shapes or style-sheets are not considered.
|
||||
*/
|
||||
public abstract class Style
|
||||
public class Style
|
||||
{
|
||||
protected Element shape;
|
||||
|
||||
|
@ -71,7 +71,7 @@ public abstract class Style
|
|||
styleTypes.put(mxVsdxConstants.RIGHT_MARGIN, mxVsdxConstants.TEXT_STYLE);
|
||||
styleTypes.put(mxVsdxConstants.TOP_MARGIN, mxVsdxConstants.TEXT_STYLE);
|
||||
styleTypes.put(mxVsdxConstants.PARAGRAPH, mxVsdxConstants.TEXT_STYLE);
|
||||
styleTypes.put(mxVsdxConstants.TOP_MARGIN, mxVsdxConstants.TEXT_STYLE);
|
||||
styleTypes.put(mxVsdxConstants.CHARACTER, mxVsdxConstants.TEXT_STYLE);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -111,12 +111,12 @@ public abstract class Style
|
|||
styleParents.put(mxVsdxConstants.FILL_STYLE, model.getStylesheet(shape.getAttribute(mxVsdxConstants.FILL_STYLE)));
|
||||
styleParents.put(mxVsdxConstants.LINE_STYLE, model.getStylesheet(shape.getAttribute(mxVsdxConstants.LINE_STYLE)));
|
||||
|
||||
mxStyleSheet textStyle = model.getStylesheet(shape.getAttribute(mxVsdxConstants.TEXT_STYLE));
|
||||
Style textStyle = model.getStylesheet(shape.getAttribute(mxVsdxConstants.TEXT_STYLE));
|
||||
styleParents.put(mxVsdxConstants.TEXT_STYLE, model.getStylesheet(shape.getAttribute(mxVsdxConstants.TEXT_STYLE)));
|
||||
|
||||
this.textParent = textStyle;
|
||||
|
||||
mxStyleSheet theme = model.getStylesheet("0");
|
||||
Style theme = model.getStylesheet("0");
|
||||
this.theme = theme;
|
||||
}
|
||||
|
||||
|
@ -185,38 +185,14 @@ public abstract class Style
|
|||
{
|
||||
return this.cellElements.containsKey(tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the 'primary' Element has a child with tag name = 'tag'.
|
||||
* @param tag Name of the Element to be found.
|
||||
* @return Returns <code>true</code> if the 'primary' Element has a child with tag name = 'tag'.
|
||||
*/
|
||||
protected boolean hasIndexedProperty(String parentTag, String ix, String tag)
|
||||
{
|
||||
NodeList children = shape.getChildNodes();
|
||||
Element primary = null;
|
||||
|
||||
if (mxVsdxUtils.nodeListHasTag(children, parentTag))
|
||||
{
|
||||
primary = mxVsdxUtils.nodeListTagIndexed(children, parentTag, ix);
|
||||
}
|
||||
|
||||
NodeList xChildren = null;
|
||||
|
||||
if (primary != null)
|
||||
{
|
||||
xChildren = primary.getChildNodes();
|
||||
}
|
||||
|
||||
return mxVsdxUtils.nodeListHasTag(xChildren, tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the element
|
||||
* @param elem The element whose value is to be found
|
||||
* @return String value of the element.
|
||||
* @param defaultValue the value to return if there is no value attribute
|
||||
* @return String value of the element, or the default value if no value found
|
||||
*/
|
||||
protected String getText(Element elem, String defaultValue)
|
||||
protected String getValue(Element elem, String defaultValue)
|
||||
{
|
||||
if (elem != null)
|
||||
{
|
||||
|
@ -227,45 +203,12 @@ public abstract class Style
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the element with tag name = 'tag' in the children
|
||||
* of primary.
|
||||
* @param parentTag tag Name of the parent style element
|
||||
* @param tag Name of the Element to be found.
|
||||
* @return String value of the element.
|
||||
* Returns the value of the element as a double
|
||||
* @param elem The element whose value is to be found
|
||||
* @param defaultValue the value to return if there is no value attribute
|
||||
* @return double value of the element, or the default value if no value found
|
||||
*/
|
||||
protected String getChildText(String parentTag, String ix, String tag, String defaultValue)
|
||||
{
|
||||
NodeList children = shape.getChildNodes();
|
||||
Element primary = null;
|
||||
|
||||
if (mxVsdxUtils.nodeListHasTag(children, parentTag))
|
||||
{
|
||||
primary = mxVsdxUtils.nodeListTagIndexed(children, parentTag, ix);
|
||||
}
|
||||
|
||||
if (primary != null)
|
||||
{
|
||||
NodeList nodeList = primary.getElementsByTagName(tag);
|
||||
|
||||
if (nodeList != null && nodeList.getLength() > 0)
|
||||
{
|
||||
return (nodeList.item(0).getTextContent());
|
||||
}
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the element with tag name = 'tag' in the children
|
||||
* of 'primary' in his double representation.<br/>
|
||||
* .vdx uses Inches for numerical representations, so this value
|
||||
* is multiplied by the result of <code>mxVdxUtils.conversionFactor()</code>
|
||||
* and is converted to pixels.
|
||||
* @param tag Name of the Element to be found.
|
||||
* @return Numerical value of the element.
|
||||
*/
|
||||
protected double getNumericalValue(Element cell, double defaultValue)
|
||||
protected double getValueAsDouble(Element cell, double defaultValue)
|
||||
{
|
||||
if (cell != null)
|
||||
{
|
||||
|
@ -281,6 +224,15 @@ public abstract class Style
|
|||
try
|
||||
{
|
||||
double parsedValue = Double.parseDouble(value);
|
||||
|
||||
String units = cell.getAttribute("U");
|
||||
|
||||
if (units.equals("PT"))
|
||||
{
|
||||
// Convert from points to pixels
|
||||
parsedValue = parsedValue * mxVsdxUtils.conversionFactor;
|
||||
}
|
||||
|
||||
return Math.round(parsedValue * 100.0) / 100.0;
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
|
@ -296,13 +248,10 @@ public abstract class Style
|
|||
//if (!tag.equals(mxVdxConstants.FILL_BKGND_TRANS) && !tag.equals(mxVdxConstants.FILL_FOREGND_TRANS) && !tag.equals(mxVdxConstants.LINE_COLOR_TRANS) && !tag.equals(mxVdxConstants.NO_LINE))
|
||||
|
||||
/**
|
||||
* Returns the value of the element with tag name = 'tag' in the children
|
||||
* of 'primary' in his double representation.<br/>
|
||||
* .vdx uses Inches for numerical representations, so this value
|
||||
* is multiplied by the result of <code>mxVdxUtils.conversionFactor()</code>
|
||||
* and is converted to pixels.
|
||||
* @param tag Name of the Element to be found.
|
||||
* @return Numerical value of the element.
|
||||
* Returns the value of the element as a double
|
||||
* @param elem The element whose value is to be found
|
||||
* @param defaultValue the value to return if there is no value attribute
|
||||
* @return double value of the element, or the default value if no value found
|
||||
*/
|
||||
protected double getScreenNumericalValue(Element cell, double defaultValue)
|
||||
{
|
||||
|
@ -329,39 +278,6 @@ public abstract class Style
|
|||
return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the element with tag name = 'tag' in the children
|
||||
* of 'primary' in his double representation.<br/>
|
||||
* .vdx uses Inches for numerical representations, so this value
|
||||
* is multiplied by the result of <code>mxVdxUtils.conversionFactor()</code>
|
||||
* and is converted to pixels.
|
||||
* @param tag Name of the Element to be found.
|
||||
* @return Numerical value of the element.
|
||||
*/
|
||||
protected double getChildNumericalValue(String parentTag, String ix, String tag, double defaultValue)
|
||||
{
|
||||
NodeList children = shape.getChildNodes();
|
||||
Element primary = null;
|
||||
|
||||
if (mxVsdxUtils.nodeListHasTag(children, parentTag))
|
||||
{
|
||||
primary = mxVsdxUtils.nodeListTagIndexed(children, parentTag, ix);
|
||||
}
|
||||
|
||||
if (primary != null)
|
||||
{
|
||||
NodeList nodeList = primary.getElementsByTagName(tag);
|
||||
|
||||
if (nodeList != null && nodeList.getLength() > 0)
|
||||
{
|
||||
double value = Double.parseDouble(nodeList.item(0).getTextContent()) * mxVsdxUtils.conversionFactor;
|
||||
return Math.round(value * 100.0) / 100.0;
|
||||
}
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the element with tag name = 'tag' in the children
|
||||
* of 'primary' in his double representation.<br/>
|
||||
|
@ -445,18 +361,42 @@ public abstract class Style
|
|||
return result;
|
||||
}
|
||||
|
||||
protected Element getCellElement(String cellKey, Integer index, String sectKey)
|
||||
protected Element getCellElement(String cellKey, String index, String sectKey)
|
||||
{
|
||||
Section sect = this.sections.get(sectKey);
|
||||
|
||||
if (sect == null)
|
||||
Element elem = null;
|
||||
boolean inherit = false;
|
||||
|
||||
if (sect != null)
|
||||
{
|
||||
return null;
|
||||
elem = sect.getIndexedCell(index, cellKey);
|
||||
}
|
||||
|
||||
Element elem = sect.getIndexedCell(index, cellKey);
|
||||
|
||||
if (elem == null)
|
||||
if (elem != null)
|
||||
{
|
||||
String form = elem.getAttribute("F");
|
||||
String value = elem.getAttribute("V");
|
||||
|
||||
if (form != null && value != null)
|
||||
{
|
||||
if (form.equals("Inh") && value.equals("Themed"))
|
||||
{
|
||||
inherit = true;
|
||||
}
|
||||
else if (form.equals("THEMEVAL()") && value.equals("Themed") && theme != null)
|
||||
{
|
||||
// Use "no style" style
|
||||
Element themeElem = theme.getCellElement(cellKey, index, sectKey);
|
||||
|
||||
if (themeElem != null)
|
||||
{
|
||||
return themeElem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (elem == null || inherit)
|
||||
{
|
||||
String styleType = Style.styleTypes.get(sectKey);
|
||||
Style parentStyle = this.styleParents.get(styleType);
|
||||
|
@ -543,7 +483,7 @@ public abstract class Style
|
|||
{
|
||||
String color = "";
|
||||
|
||||
if (this.getText(this.getCellElement(mxVsdxConstants.LINE_PATTERN), "1").equals("0"))
|
||||
if (this.getValue(this.getCellElement(mxVsdxConstants.LINE_PATTERN), "1").equals("0"))
|
||||
{
|
||||
color = "none";
|
||||
}
|
||||
|
@ -566,7 +506,7 @@ public abstract class Style
|
|||
protected String getFillColor()
|
||||
{
|
||||
String fillForeColor = this.getColor(this.getCellElement(mxVsdxConstants.FILL_FOREGND));
|
||||
String fillPattern = this.getText(this.getCellElement(mxVsdxConstants.FILL_PATTERN), "0");
|
||||
String fillPattern = this.getValue(this.getCellElement(mxVsdxConstants.FILL_PATTERN), "0");
|
||||
|
||||
if (fillPattern != null && fillPattern.equals("0"))
|
||||
{
|
||||
|
@ -580,7 +520,7 @@ public abstract class Style
|
|||
|
||||
protected String getColor(Element elem)
|
||||
{
|
||||
String color = this.getText(elem, "");
|
||||
String color = this.getValue(elem, "");
|
||||
|
||||
if (!color.startsWith("#"))
|
||||
{
|
||||
|
@ -598,7 +538,7 @@ public abstract class Style
|
|||
*/
|
||||
protected String getTextBkgndColor(Element elem)
|
||||
{
|
||||
String color = this.getText(elem, "");
|
||||
String color = this.getValue(elem, "");
|
||||
|
||||
if (!color.startsWith("#"))
|
||||
{
|
||||
|
@ -628,7 +568,7 @@ public abstract class Style
|
|||
*/
|
||||
public double getLineWeight()
|
||||
{
|
||||
return getNumericalValue(this.getCellElement(mxVsdxConstants.LINE_WEIGHT), 0);
|
||||
return getValueAsDouble(this.getCellElement(mxVsdxConstants.LINE_WEIGHT), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -637,7 +577,7 @@ public abstract class Style
|
|||
*/
|
||||
public double getStrokeTransparency()
|
||||
{
|
||||
return getNumericalValue(this.getCellElement(mxVsdxConstants.LINE_COLOR_TRANS), 0);
|
||||
return getValueAsDouble(this.getCellElement(mxVsdxConstants.LINE_COLOR_TRANS), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -667,46 +607,15 @@ public abstract class Style
|
|||
return this.Id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the amount of Connection Elements inside of Shape Element.
|
||||
* @return Number of Connection Elements.
|
||||
*/
|
||||
public int getAmountConnection()
|
||||
{
|
||||
List<Element> lineTo = new ArrayList<Element>();
|
||||
NodeList xChildrens = null;
|
||||
|
||||
if (shape != null)
|
||||
{
|
||||
xChildrens = shape.getChildNodes();
|
||||
}
|
||||
|
||||
if (mxVsdxUtils.nodeListHasTag(xChildrens, mxVsdxConstants.CONNECTION))
|
||||
{
|
||||
lineTo = mxVsdxUtils.nodeListTags(xChildrens, mxVsdxConstants.CONNECTION);
|
||||
}
|
||||
|
||||
return lineTo.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the color of one text fragment is defined
|
||||
* @param charIX IX attribute of Char element
|
||||
* @return Returns <code>true</code> if the color of one text fragment is defined.
|
||||
*/
|
||||
public boolean hasTextColor(String charIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.COLOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the color of one text fragment
|
||||
* @param charIX IX attribute of Char element
|
||||
* @return Text color in hexadecimal representation.
|
||||
*/
|
||||
public String getTextColor(String charIX)
|
||||
public String getTextColor(String index)
|
||||
{
|
||||
String color = getChildText(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.COLOR, "#000000");
|
||||
Element colorElem = getCellElement(mxVsdxConstants.COLOR, index, mxVsdxConstants.CHARACTER);
|
||||
String color = getValue(colorElem, "#000000");
|
||||
|
||||
if (!color.startsWith("#"))
|
||||
{
|
||||
|
@ -752,54 +661,15 @@ public abstract class Style
|
|||
return getScreenNumericalValue(this.getCellElement(mxVsdxConstants.RIGHT_MARGIN), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the size of one text fragment is defined.
|
||||
* @param charIX IX atribute of Char element
|
||||
* @return Returns <code>true</code> if the size of one text fragment is defined.
|
||||
*/
|
||||
public boolean hasTextSize(String charIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the size of one text fragment in pixels.
|
||||
* @param charIX IX atribute of Char element
|
||||
* @return String representation of the numerical value of the Size element.
|
||||
*/
|
||||
public String getTextSize(String charIX)
|
||||
{
|
||||
return String.valueOf(getChildNumericalValue(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.SIZE, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the style of one text fragment is defined.
|
||||
* @param charIX IX atribute of Char element
|
||||
* @return Returns <code>true</code> if the style of one text fragment is defined.
|
||||
*/
|
||||
public boolean hasTextStyle(String charIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.STYLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the style of one text fragment.
|
||||
* @param charIX IX atribute of Char element
|
||||
* @param charIX IX attribute of Char element
|
||||
* @return String value of the Style element.
|
||||
*/
|
||||
public String getTextStyle(String charIX)
|
||||
public String getTextStyle(String index)
|
||||
{
|
||||
return getChildText(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.STYLE, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the font of one text fragment is defined
|
||||
* @param charIX IX atribute of Char element
|
||||
* @return Returns <code>true</code> if the font of one text fragment is defined.
|
||||
*/
|
||||
public boolean hasTextFont(String charIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.FONT);
|
||||
Element styleElem = getCellElement(mxVsdxConstants.STYLE, index, mxVsdxConstants.CHARACTER);
|
||||
return getValue(styleElem, "");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -807,19 +677,10 @@ public abstract class Style
|
|||
* @param charIX IX attribute of Char element
|
||||
* @return Name of the font.
|
||||
*/
|
||||
public String getTextFont(String charIX)
|
||||
public String getTextFont(String index)
|
||||
{
|
||||
return pm.getFont(getChildText(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.FONT, ""));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the position of one text fragment is defined
|
||||
* @param charIX IX attribute of Char element
|
||||
* @return Returns <code>true</code> if the position of one text fragment is defined.
|
||||
*/
|
||||
public boolean hasTextPos(String charIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.POS);
|
||||
Element fontElem = getCellElement(mxVsdxConstants.FONT, index, mxVsdxConstants.CHARACTER);
|
||||
return getValue(fontElem, "");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -827,26 +688,10 @@ public abstract class Style
|
|||
* @param charIX IX attribute of Char element
|
||||
* @return Integer value of the Pos element.
|
||||
*/
|
||||
public int getTextPos(String charIX)
|
||||
public String getTextPos(String index)
|
||||
{
|
||||
String val = getChildText(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.POS, "");
|
||||
|
||||
if (!val.equals(""))
|
||||
{
|
||||
return Integer.parseInt(val);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the strikethru of one text fragment is defined
|
||||
* @param charIX IX attribute of Char element
|
||||
* @return Returns <code>true</code> if the strikethru of one text fragment is defined
|
||||
*/
|
||||
public boolean hasTextStrike(String charIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.STRIKETHRU);
|
||||
Element posElem = getCellElement(mxVsdxConstants.POS, index, mxVsdxConstants.CHARACTER);
|
||||
return getValue(posElem, "");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -854,20 +699,10 @@ public abstract class Style
|
|||
* @param charIX IX attribute of Char element
|
||||
* @return Returns <code>true</code> if one text fragment is Strikethru
|
||||
*/
|
||||
public boolean getTextStrike(String charIX)
|
||||
public boolean getTextStrike(String index)
|
||||
{
|
||||
String val = getChildText(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.STRIKETHRU, "");
|
||||
return val.equals("1");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the case of one text fragment is defined
|
||||
* @param charIX IX attribute of Char element
|
||||
* @return Returns <code>true</code> if the case of one text fragment is defined.
|
||||
*/
|
||||
public boolean hasTextCase(String charIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.CASE);
|
||||
Element strikeElem = getCellElement(mxVsdxConstants.STRIKETHRU, index, mxVsdxConstants.CHARACTER);
|
||||
return getValue(strikeElem, "").equals("1");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -875,53 +710,41 @@ public abstract class Style
|
|||
* @param charIX IX attribute of Char element
|
||||
* @return Integer value of the Case element
|
||||
*/
|
||||
public int getTextCase(String charIX)
|
||||
public String getTextCase(String index)
|
||||
{
|
||||
String val = getChildText(mxVsdxConstants.CHARACTER, charIX, mxVsdxConstants.CASE, "");
|
||||
Element caseElem = getCellElement(mxVsdxConstants.CASE, index, mxVsdxConstants.CHARACTER);
|
||||
return getValue(caseElem, "");
|
||||
}
|
||||
|
||||
if (!val.equals(""))
|
||||
/**
|
||||
* Returns the horizontal align property of a paragraph
|
||||
* @param index IX attribute of Para element
|
||||
* @param html whether to return the html values or mxGraph values
|
||||
* @return String value of the HorizontalAlign element.
|
||||
*/
|
||||
public String getHorizontalAlign(String index, boolean html)
|
||||
{
|
||||
String ret = "center";
|
||||
Element horAlign = getCellElement(mxVsdxConstants.HORIZONTAL_ALIGN, index, mxVsdxConstants.PARAGRAPH);
|
||||
String align = getValue(horAlign, "");
|
||||
|
||||
switch (align)
|
||||
{
|
||||
return Integer.parseInt(val);
|
||||
case "0":
|
||||
ret = html ? "left" : mxConstants.ALIGN_LEFT;
|
||||
break;
|
||||
case "2":
|
||||
ret = html ? "right" : mxConstants.ALIGN_RIGHT;
|
||||
break;
|
||||
case "3":
|
||||
case "4":
|
||||
ret = html ? "justify" : mxConstants.ALIGN_CENTER;
|
||||
break;
|
||||
default:
|
||||
ret = html ? "center" : mxConstants.ALIGN_CENTER;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the horizontal align of text is defined
|
||||
* @param paraIX IX attribute of Para element
|
||||
* @return Returns <code>true</code> if the horizontal align of text is defined.
|
||||
*/
|
||||
public boolean hasHorizontalAlign(String paraIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.HORIZONTAL_ALIGN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the horizontal align property of text
|
||||
* @param paraIX IX attribute of Para element
|
||||
* @return Integer value of the HorizontalAlign element.
|
||||
*/
|
||||
public int getHorizontalAlign(String paraIX)
|
||||
{
|
||||
String val = getChildText(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.HORIZONTAL_ALIGN, "");
|
||||
|
||||
if (!val.equals(""))
|
||||
{
|
||||
return Integer.parseInt(val);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the first indent of one paragraph is defined
|
||||
* @param paraIX IX attribute of Para element
|
||||
* @return Returns <code>true</code> if the first indent of one paragraph is defined.
|
||||
*/
|
||||
public boolean hasIndentFirst(String paraIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.INDENT_FIRST);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -929,19 +752,10 @@ public abstract class Style
|
|||
* @param paraIX IX attribute of Para element
|
||||
* @return String representation of the numerical value of the IndentFirst element.
|
||||
*/
|
||||
public String getIndentFirst(String paraIX)
|
||||
public String getIndentFirst(String index)
|
||||
{
|
||||
return String.valueOf(getChildNumericalValue(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.INDENT_FIRST, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the indent to left of one paragraph is defined
|
||||
* @param paraIX IX attribute of Para element
|
||||
* @return Returns <code>true</code> if the indent to left of one paragraph is defined.
|
||||
*/
|
||||
public boolean hasIndentLeft(String paraIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.INDENT_LEFT);
|
||||
Element indentFirstElem = getCellElement(mxVsdxConstants.INDENT_FIRST, index, mxVsdxConstants.PARAGRAPH);
|
||||
return String.valueOf(getScreenNumericalValue(indentFirstElem, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -949,19 +763,10 @@ public abstract class Style
|
|||
* @param paraIX IX attribute of Para element
|
||||
* @return String representation of the numerical value of the IndentLeft element.
|
||||
*/
|
||||
public String getIndentLeft(String paraIX)
|
||||
public String getIndentLeft(String index)
|
||||
{
|
||||
return String.valueOf(getChildNumericalValue(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.INDENT_LEFT, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the indent to right of one paragraph is defined
|
||||
* @param paraIX IX attribute of Para element
|
||||
* @return Returns <code>true</code> if the indent to right of one paragraph is defined.
|
||||
*/
|
||||
public boolean hasIndentRight(String paraIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.INDENT_RIGHT);
|
||||
Element indentLeftElem = getCellElement(mxVsdxConstants.INDENT_LEFT, index, mxVsdxConstants.PARAGRAPH);
|
||||
return String.valueOf(getScreenNumericalValue(indentLeftElem, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -969,19 +774,10 @@ public abstract class Style
|
|||
* @param paraIX IX attribute of Para element
|
||||
* @return String representation of the numerical value of the IndentRight element.
|
||||
*/
|
||||
public String getIndentRight(String paraIX)
|
||||
public String getIndentRight(String index)
|
||||
{
|
||||
return String.valueOf(getChildNumericalValue(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.INDENT_RIGHT, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the space before one paragraph is defined
|
||||
* @param paraIX IX attribute of Para element
|
||||
* @return Returns <code>true</code> if the space before one paragraph is defined.
|
||||
*/
|
||||
public boolean hasSpBefore(String paraIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.SPACE_BEFORE);
|
||||
Element indentRightElem = getCellElement(mxVsdxConstants.INDENT_RIGHT, index, mxVsdxConstants.PARAGRAPH);
|
||||
return String.valueOf(getScreenNumericalValue(indentRightElem, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -989,19 +785,10 @@ public abstract class Style
|
|||
* @param paraIX IX attribute of Para element
|
||||
* @return String representation of the numerical value of the SpBefore element.
|
||||
*/
|
||||
public String getSpBefore(String paraIX)
|
||||
public String getSpBefore(String index)
|
||||
{
|
||||
return String.valueOf(getChildNumericalValue(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.SPACE_BEFORE, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the space after one paragraph is defined
|
||||
* @param paraIX IX attribute of Para element
|
||||
* @return Returns <code>true</code> if the space after one paragraph is defined.
|
||||
*/
|
||||
public boolean hasSpAfter(String paraIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.SPACE_AFTER);
|
||||
Element spBeforeElem = getCellElement(mxVsdxConstants.SPACE_BEFORE, index, mxVsdxConstants.PARAGRAPH);
|
||||
return String.valueOf(getScreenNumericalValue(spBeforeElem, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1009,19 +796,10 @@ public abstract class Style
|
|||
* @param paraIX IX attribute of Para element
|
||||
* @return String representation of the numerical value of the SpAfter element.
|
||||
*/
|
||||
public String getSpAfter(String paraIX)
|
||||
public String getSpAfter(String index)
|
||||
{
|
||||
return String.valueOf(getChildNumericalValue(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.SPACE_AFTER, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the space between lines in one paragraph is defined
|
||||
* @param paraIX IX attribute of Para element
|
||||
* @return Returns <code>true</code> if the space between lines in one paragraph is defined.
|
||||
*/
|
||||
public boolean hasSpLine(String paraIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.SPACE_LINE);
|
||||
Element spAfterElem = getCellElement(mxVsdxConstants.SPACE_AFTER, index, mxVsdxConstants.PARAGRAPH);
|
||||
return String.valueOf(getScreenNumericalValue(spAfterElem, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1029,9 +807,10 @@ public abstract class Style
|
|||
* @param paraIX IX attribute of Para element.
|
||||
* @return Double representation of the value of the SpLine element.
|
||||
*/
|
||||
public double getSpLine(String paraIX)
|
||||
public double getSpLine(String index)
|
||||
{
|
||||
String val = getChildText(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.SPACE_LINE, "");
|
||||
Element spLineElem = getCellElement(mxVsdxConstants.SPACE_LINE, index, mxVsdxConstants.PARAGRAPH);
|
||||
String val = getValue(spLineElem, "");
|
||||
|
||||
if (!val.equals(""))
|
||||
{
|
||||
|
@ -1041,54 +820,15 @@ public abstract class Style
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the flags of one paragraph is defined.
|
||||
* @param paraIX IX attribute of Para element.
|
||||
* @return Returns <code>true</code> if the flags of one paragraph is defined.
|
||||
*/
|
||||
public boolean hasFlags(String paraIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.FLAGS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the flags of one paragraph.
|
||||
* @param paraIX IX attribute of Para element.
|
||||
* @return String value of the Flags element.
|
||||
*/
|
||||
public String getFlags(String paraIX)
|
||||
public String getFlags(String index)
|
||||
{
|
||||
return getChildText(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.FLAGS, "0");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the direction of one text fragment is defined
|
||||
* @param paraIX IX attribute of Para element
|
||||
* @return Returns <code>true</code> if the direction of one text fragment is defined.
|
||||
*/
|
||||
public boolean hasRTLText(String paraIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.RTL_TEXT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the direction of one text fragment.
|
||||
* @param paraIX IX attribute of Para element.
|
||||
* @return String value of the RTLText.
|
||||
*/
|
||||
public String getRTLText(String paraIX)
|
||||
{
|
||||
return getChildText(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.RTL_TEXT, "ltr");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the space between characters in one text fragment is defined.
|
||||
* @param paraIX IX attribute of Para element.
|
||||
* @return Returns <code>true</code> if the space between characters in one text fragment is defined.
|
||||
*/
|
||||
public boolean hasLetterSpace(String paraIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.LETTER_SPACE);
|
||||
Element flagsElem = getCellElement(mxVsdxConstants.FLAGS, index, mxVsdxConstants.PARAGRAPH);
|
||||
return getValue(flagsElem, "0");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1096,19 +836,10 @@ public abstract class Style
|
|||
* @param paraIX IX attribute of Para element.
|
||||
* @return String representation of the numerical value of the Letterspace element.
|
||||
*/
|
||||
public String getLetterSpace(String paraIX)
|
||||
public String getLetterSpace(String index)
|
||||
{
|
||||
return String.valueOf(getChildNumericalValue(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.LETTER_SPACE, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the bullet element is defined.
|
||||
* @param paraIX IX attribute of Para element.
|
||||
* @return Returns <code>true</code> if the bullet element is defined.
|
||||
*/
|
||||
public boolean hasBullet(String paraIX)
|
||||
{
|
||||
return hasIndexedProperty(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.BULLET);
|
||||
Element letterSpaceElem = getCellElement(mxVsdxConstants.LETTER_SPACE, index, mxVsdxConstants.PARAGRAPH);
|
||||
return String.valueOf(getScreenNumericalValue(letterSpaceElem, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1116,9 +847,10 @@ public abstract class Style
|
|||
* @param paraIX IX attribute of Para element.
|
||||
* @return String value of the Bullet element.
|
||||
*/
|
||||
public String getBullet(String paraIX)
|
||||
public String getBullet(String index)
|
||||
{
|
||||
return getChildText(mxVsdxConstants.PARAGRAPH, paraIX, mxVsdxConstants.BULLET, "0");
|
||||
Element bulletElem = getCellElement(mxVsdxConstants.BULLET, index, mxVsdxConstants.PARAGRAPH);
|
||||
return getValue(bulletElem, "0");
|
||||
}
|
||||
|
||||
public Element getShape() {
|
||||
|
|
|
@ -6,6 +6,7 @@ package com.mxgraph.io.vsdx;
|
|||
|
||||
import com.mxgraph.model.mxCell;
|
||||
import com.mxgraph.model.mxGeometry;
|
||||
import com.mxgraph.online.Utils;
|
||||
import com.mxgraph.util.mxConstants;
|
||||
import com.mxgraph.util.mxPoint;
|
||||
import com.mxgraph.util.mxResources;
|
||||
|
@ -18,6 +19,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Hashtable;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -76,17 +78,17 @@ public class VsdxShape extends Shape
|
|||
/**
|
||||
* Stylesheet with the fill style referenced by the shape.
|
||||
*/
|
||||
protected mxStyleSheet fillStyle = null;
|
||||
protected Style fillStyle = null;
|
||||
|
||||
/**
|
||||
* Stylesheet with the line style referenced by the shape.
|
||||
*/
|
||||
protected mxStyleSheet lineStyle = null;
|
||||
protected Style lineStyle = null;
|
||||
|
||||
/**
|
||||
* Stylesheet with the text style referenced by the shape.
|
||||
*/
|
||||
protected mxStyleSheet textStyle = null;
|
||||
protected Style textStyle = null;
|
||||
|
||||
/**
|
||||
* The prefix of the shape name
|
||||
|
@ -230,8 +232,9 @@ public class VsdxShape extends Shape
|
|||
{
|
||||
String masterId = this.getMasterId();
|
||||
Shape masterShape = null;
|
||||
NodeList txtChildren = getTextChildren();
|
||||
|
||||
if (master != null)
|
||||
if ((txtChildren == null || txtChildren.getLength() == 0) && master != null)
|
||||
{
|
||||
if (masterId != null)
|
||||
{
|
||||
|
@ -241,13 +244,33 @@ public class VsdxShape extends Shape
|
|||
{
|
||||
masterShape = master.getSubShape(this.getShapeMasterId());
|
||||
}
|
||||
|
||||
if (masterShape != null)
|
||||
{
|
||||
txtChildren = masterShape.getTextChildren();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.htmlLabels)
|
||||
{
|
||||
mxVsdxTextParser vtp = new mxVsdxTextParser(this, masterShape, textStyle, pm);
|
||||
//Get text with tags html
|
||||
return vtp.getHtmlTextContent();
|
||||
if (txtChildren != null && txtChildren.getLength() > 0)
|
||||
{
|
||||
// Collect text into same formatting paragraphs. If there's one paragraph, use the new system, otherwise
|
||||
// leave it to the old one.
|
||||
if (this.paragraphs == null)
|
||||
{
|
||||
initLabels(txtChildren);
|
||||
}
|
||||
|
||||
if (this.paragraphs.size() == 1)
|
||||
{
|
||||
return createHybridLabel(this.paragraphs.keySet().iterator().next());
|
||||
}
|
||||
else
|
||||
{
|
||||
return getHtmlTextContent(txtChildren);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -262,8 +285,91 @@ public class VsdxShape extends Shape
|
|||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialises the text labels
|
||||
* @param children the text Elements
|
||||
*/
|
||||
protected void initLabels(NodeList children)
|
||||
{
|
||||
// Lazy init
|
||||
paragraphs = new LinkedHashMap<String,Paragraph>();
|
||||
String ch = null;
|
||||
String pg = null;
|
||||
String value = null;
|
||||
|
||||
for (int index = 0; index < children.getLength(); index++)
|
||||
{
|
||||
Node node = children.item(index);
|
||||
|
||||
if (node.getNodeName().equals("cp"))
|
||||
{
|
||||
Element elem = (Element)node;
|
||||
ch = elem.getAttribute("IX");
|
||||
}
|
||||
else if (node.getNodeName().equals("tp"))
|
||||
{
|
||||
// TODO
|
||||
Element elem = (Element)node;
|
||||
elem.getAttribute("IX");
|
||||
}
|
||||
else if (node.getNodeName().equals("pp"))
|
||||
{
|
||||
Element elem = (Element)node;
|
||||
pg = elem.getAttribute("IX");
|
||||
|
||||
}
|
||||
else if (node.getNodeName().equals("fld"))
|
||||
{
|
||||
// TODO
|
||||
Element elem = (Element)node;
|
||||
elem.getAttribute("IX");
|
||||
}
|
||||
else if (node.getNodeName().equals("#text"))
|
||||
{
|
||||
value = Utils.chomp(node.getTextContent());
|
||||
}
|
||||
}
|
||||
|
||||
if (value != null && value.length() > 0)
|
||||
{
|
||||
// null key is allowed
|
||||
Paragraph para = paragraphs.get(pg);
|
||||
|
||||
if (para == null)
|
||||
{
|
||||
para = new Paragraph(value, ch, pg);
|
||||
paragraphs.put(pg, para);
|
||||
}
|
||||
else
|
||||
{
|
||||
para.addValue(value, ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected String createHybridLabel(String index)
|
||||
{
|
||||
Paragraph para = this.paragraphs.get(index);
|
||||
|
||||
this.styleMap.put(mxConstants.STYLE_ALIGN, getHorizontalAlign(index, false));
|
||||
this.styleMap.put(mxConstants.STYLE_SPACING_LEFT, getIndentLeft(index));
|
||||
this.styleMap.put(mxConstants.STYLE_SPACING_RIGHT, getIndentRight(index));
|
||||
this.styleMap.put(mxConstants.STYLE_SPACING_TOP, getSpBefore(index) + "px");
|
||||
this.styleMap.put(mxConstants.STYLE_SPACING_BOTTOM, getSpAfter(index) + "px");
|
||||
//this.styleMap.put("text-indent", getIndentFirst(index));
|
||||
this.styleMap.put(mxConstants.STYLE_VERTICAL_ALIGN, getAlignVertical());
|
||||
|
||||
this.styleMap.put("fontColor", getTextColor(index));
|
||||
this.styleMap.put("fontSize", String.valueOf((Double.parseDouble(this.getTextSize(cp)) / 0.71)));
|
||||
this.styleMap.put("fontFamily", getTextFont(index));
|
||||
|
||||
return para.getValue(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a nameU is for big connectors.
|
||||
* @param nameU NameU attribute.
|
||||
|
@ -335,7 +441,7 @@ public class VsdxShape extends Shape
|
|||
// need to translate the origin
|
||||
if (rotation && (lpy != h/2 || lpx != w/2))
|
||||
{
|
||||
double angle = Double.valueOf(this.getText(this.getCellElement(mxVsdxConstants.ANGLE), "0"));
|
||||
double angle = Double.valueOf(this.getValue(this.getCellElement(mxVsdxConstants.ANGLE), "0"));
|
||||
|
||||
if (angle != 0)
|
||||
{
|
||||
|
@ -437,7 +543,7 @@ public class VsdxShape extends Shape
|
|||
opacity = 0;
|
||||
}
|
||||
|
||||
opacity = getNumericalValue(this.getCellElement(key), 0);
|
||||
opacity = getValueAsDouble(this.getCellElement(key), 0);
|
||||
|
||||
opacity = 100 - opacity * 100;
|
||||
opacity = Math.max(opacity, 0);
|
||||
|
@ -454,7 +560,7 @@ public class VsdxShape extends Shape
|
|||
private String getGradient()
|
||||
{
|
||||
String gradient = "";
|
||||
String fillPattern = this.getText(this.getCellElement(mxVsdxConstants.FILL_PATTERN), "0");
|
||||
String fillPattern = this.getValue(this.getCellElement(mxVsdxConstants.FILL_PATTERN), "0");
|
||||
|
||||
if (fillPattern.equals("25") || fillPattern.equals("27") || fillPattern.equals("28") || fillPattern.equals("30"))
|
||||
{
|
||||
|
@ -472,7 +578,7 @@ public class VsdxShape extends Shape
|
|||
private String getGradientDirection()
|
||||
{
|
||||
String direction = "";
|
||||
String fillPattern = this.getText(this.getCellElement(mxVsdxConstants.FILL_PATTERN), "0");
|
||||
String fillPattern = this.getValue(this.getCellElement(mxVsdxConstants.FILL_PATTERN), "0");
|
||||
|
||||
if (fillPattern.equals("25"))
|
||||
{
|
||||
|
@ -500,7 +606,7 @@ public class VsdxShape extends Shape
|
|||
*/
|
||||
public double getRotation()
|
||||
{
|
||||
double rotation = Double.valueOf(this.getText(this.getCellElement(mxVsdxConstants.ANGLE), "0"));
|
||||
double rotation = Double.valueOf(this.getValue(this.getCellElement(mxVsdxConstants.ANGLE), "0"));
|
||||
|
||||
rotation = Math.toDegrees(rotation);
|
||||
rotation = rotation % 360;
|
||||
|
@ -557,29 +663,6 @@ public class VsdxShape extends Shape
|
|||
return rightMargin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the vertical align of the label.<br/>
|
||||
* The property may to be defined in master shape or text stylesheet.<br/>
|
||||
* @return Vertical align (bottom, middle and top)
|
||||
*/
|
||||
public String getAlignVertical()
|
||||
{
|
||||
String vertical = mxConstants.ALIGN_MIDDLE;
|
||||
|
||||
int align = Integer.parseInt(getText(this.getCellElement(mxVsdxConstants.VERTICAL_ALIGN), "1"));
|
||||
|
||||
if (align == 0)
|
||||
{
|
||||
vertical = mxConstants.ALIGN_TOP;
|
||||
}
|
||||
else if (align == 2)
|
||||
{
|
||||
vertical = mxConstants.ALIGN_BOTTOM;
|
||||
}
|
||||
|
||||
return vertical;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the label must be rotated.<br/>
|
||||
|
@ -591,7 +674,7 @@ public class VsdxShape extends Shape
|
|||
boolean hor = true;
|
||||
//Defines rotation.
|
||||
double rotation = this.getRotation();
|
||||
double angle = Double.valueOf(this.getText(this.getCellElement(mxVsdxConstants.TXT_ANGLE), "0"));
|
||||
double angle = Double.valueOf(this.getValue(this.getCellElement(mxVsdxConstants.TXT_ANGLE), "0"));
|
||||
|
||||
angle = Math.toDegrees(angle);
|
||||
angle = angle - rotation;
|
||||
|
@ -610,8 +693,6 @@ public class VsdxShape extends Shape
|
|||
*/
|
||||
public Map<String, String> getStyleFromShape()
|
||||
{
|
||||
Map<String, String> styleMap = new HashMap<String, String>();
|
||||
|
||||
//Set the style of the labels.
|
||||
|
||||
//Defines rotation.
|
||||
|
@ -770,14 +851,6 @@ public class VsdxShape extends Shape
|
|||
styleMap.put(mxConstants.STYLE_SPACING_RIGHT, Double.toString(rightMargin));
|
||||
}
|
||||
|
||||
//Defines label vertical align
|
||||
String verticalAlign = getAlignVertical();
|
||||
|
||||
if(verticalAlign != mxConstants.ALIGN_MIDDLE)
|
||||
{
|
||||
styleMap.put(mxConstants.STYLE_VERTICAL_ALIGN, verticalAlign);
|
||||
}
|
||||
|
||||
String direction = getDirection(form);
|
||||
|
||||
if (direction != mxConstants.DIRECTION_EAST)
|
||||
|
@ -802,73 +875,10 @@ public class VsdxShape extends Shape
|
|||
styleMap.put(mxConstants.STYLE_FLIPV, "1");
|
||||
}
|
||||
}
|
||||
/*
|
||||
Optional code for moving the style inside the html label to the shape's style
|
||||
pro:
|
||||
- label can be manipulated with the UI buttons
|
||||
con:
|
||||
- only a single style is allowed in a label
|
||||
*/
|
||||
|
||||
if (this.htmlLabels)
|
||||
{
|
||||
String label = getTextLabel();
|
||||
|
||||
if (label != null)
|
||||
{
|
||||
if (label.startsWith("<table>") || label.startsWith("<table "))
|
||||
{
|
||||
styleMap.put("overflow", "fill");
|
||||
}
|
||||
|
||||
String masterId = this.getMasterId();
|
||||
Shape masterShape = null;
|
||||
|
||||
if (this.master != null)
|
||||
{
|
||||
if (masterId != null)
|
||||
{
|
||||
masterShape = this.master.getMasterShape();
|
||||
}
|
||||
else
|
||||
{
|
||||
masterShape = this.master.getSubShape(this.getShapeMasterId());
|
||||
}
|
||||
}
|
||||
|
||||
mxVsdxTextParser vtp = new mxVsdxTextParser(this, masterShape, textStyle, pm);
|
||||
vtp.getHtmlTextContent();
|
||||
|
||||
if (!vtp.getHorAlign(vtp.pp).equals("center"))
|
||||
{
|
||||
styleMap.put(mxConstants.STYLE_ALIGN, vtp.getHorAlign(vtp.pp));
|
||||
}
|
||||
|
||||
styleMap.put(mxConstants.STYLE_VERTICAL_ALIGN, vtp.getVerAlign());
|
||||
|
||||
if (!vtp.getIndLeft(vtp.pp).equals("0.0"))
|
||||
{
|
||||
styleMap.put(mxConstants.STYLE_SPACING_LEFT, vtp.getIndLeft(vtp.pp));
|
||||
}
|
||||
|
||||
if (!vtp.getIndRight(vtp.pp).equals("0.0"))
|
||||
{
|
||||
styleMap.put(mxConstants.STYLE_SPACING_RIGHT, vtp.getIndRight(vtp.pp));
|
||||
}
|
||||
|
||||
if (!vtp.getSpcBefore(vtp.pp).equals("0.0"))
|
||||
{
|
||||
styleMap.put(mxConstants.STYLE_SPACING_TOP, vtp.getSpcBefore(vtp.pp));
|
||||
}
|
||||
|
||||
if (!vtp.getSpcAfter(vtp.pp).equals("0.0"))
|
||||
{
|
||||
styleMap.put(mxConstants.STYLE_SPACING_BOTTOM, vtp.getSpcAfter(vtp.pp));
|
||||
}
|
||||
}
|
||||
}
|
||||
resolveCommonStyles();
|
||||
|
||||
return resolveCommonStyles(styleMap);
|
||||
return this.styleMap;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -878,7 +888,7 @@ public class VsdxShape extends Shape
|
|||
*/
|
||||
public boolean isDashed()
|
||||
{
|
||||
String linePattern = this.getText(this.getCellElement(mxVsdxConstants.LINE_PATTERN), "0");
|
||||
String linePattern = this.getValue(this.getCellElement(mxVsdxConstants.LINE_PATTERN), "0");
|
||||
|
||||
if (linePattern.equals("Themed"))
|
||||
{
|
||||
|
@ -933,7 +943,7 @@ public class VsdxShape extends Shape
|
|||
*/
|
||||
public float getStartArrowSize()
|
||||
{
|
||||
String baSize = getText(this.getCellElement(mxVsdxConstants.BEGIN_ARROW_SIZE), "4");
|
||||
String baSize = getValue(this.getCellElement(mxVsdxConstants.BEGIN_ARROW_SIZE), "4");
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -955,7 +965,7 @@ public class VsdxShape extends Shape
|
|||
*/
|
||||
public float getFinalArrowSize()
|
||||
{
|
||||
String eaSize = getText(this.getCellElement(mxVsdxConstants.END_ARROW_SIZE), "4");
|
||||
String eaSize = getValue(this.getCellElement(mxVsdxConstants.END_ARROW_SIZE), "4");
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -976,7 +986,7 @@ public class VsdxShape extends Shape
|
|||
*/
|
||||
public boolean isRounded()
|
||||
{
|
||||
String val = getText(this.getCellElement(mxVsdxConstants.ROUNDING), "0");
|
||||
String val = getValue(this.getCellElement(mxVsdxConstants.ROUNDING), "0");
|
||||
return Double.valueOf(val) > 0;
|
||||
}
|
||||
|
||||
|
@ -990,7 +1000,7 @@ public class VsdxShape extends Shape
|
|||
// https://msdn.microsoft.com/en-us/library/office/jj230454.aspx TODO
|
||||
// double shdwShow = this.getNumericalValue(this.getStyleNode(mxVdxConstants.SHDW_PATTERN), 0);
|
||||
|
||||
String shdw = this.getText(this.getCellElement(mxVsdxConstants.SHDW_PATTERN), "0");
|
||||
String shdw = this.getValue(this.getCellElement(mxVsdxConstants.SHDW_PATTERN), "0");
|
||||
|
||||
if (shdw.equals("Themed"))
|
||||
{
|
||||
|
@ -1972,15 +1982,17 @@ public class VsdxShape extends Shape
|
|||
|
||||
//Adds html encoding - may need further elaboration
|
||||
styleMap.put("html", "1");
|
||||
|
||||
resolveCommonStyles();
|
||||
|
||||
return resolveCommonStyles(styleMap);
|
||||
return this.styleMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Analyzes a edge shape and returns a string with the style.
|
||||
* @return style read from the edge shape.
|
||||
*/
|
||||
public Map<String, String> resolveCommonStyles(Map<String, String> styleMap)
|
||||
public Map<String, String> resolveCommonStyles()
|
||||
{
|
||||
/** LABEL BACKGROUND COLOR **/
|
||||
String lbkgnd = this.getTextBkgndColor(this.getCellElement(mxVsdxConstants.TEXT_BKGND));
|
||||
|
@ -1999,7 +2011,7 @@ public class VsdxShape extends Shape
|
|||
*/
|
||||
public String getEdgeMarker(boolean start)
|
||||
{
|
||||
String marker = this.getText(this.getCellElement(start ? mxVsdxConstants.BEGIN_ARROW : mxVsdxConstants.END_ARROW), "0");
|
||||
String marker = this.getValue(this.getCellElement(start ? mxVsdxConstants.BEGIN_ARROW : mxVsdxConstants.END_ARROW), "0");
|
||||
return VsdxShape.arrowTypes.get(marker);
|
||||
}
|
||||
|
||||
|
@ -2022,7 +2034,7 @@ public class VsdxShape extends Shape
|
|||
return elem;
|
||||
}
|
||||
|
||||
protected Element getCellElement(String cellKey, Integer index, String sectKey)
|
||||
protected Element getCellElement(String cellKey, String index, String sectKey)
|
||||
{
|
||||
Element elem = super.getCellElement(cellKey, index, sectKey);
|
||||
|
||||
|
|
|
@ -41,21 +41,6 @@ public class mxPropertiesManager
|
|||
*/
|
||||
private HashMap<String, String> fontElementMap = new HashMap<String, String>();
|
||||
|
||||
/**
|
||||
* Stylesheet with the default text style.
|
||||
*/
|
||||
private mxStyleSheet textStyle;
|
||||
|
||||
/**
|
||||
* Stylesheet with the default line style.
|
||||
*/
|
||||
private mxStyleSheet lineStyle;
|
||||
|
||||
/**
|
||||
* Stylesheet with the default fill style.
|
||||
*/
|
||||
private mxStyleSheet fillStyle;
|
||||
|
||||
/**
|
||||
* Best guess at default colors if 0-23 are missing in the document (seems to always be the case for vsdx)
|
||||
*/
|
||||
|
@ -132,20 +117,6 @@ public class mxPropertiesManager
|
|||
fontElementMap.put(fontId, fontValue);
|
||||
}
|
||||
}
|
||||
|
||||
//Loads the defaults documents styles.
|
||||
NodeList vdxDocumentStyle = elem.getElementsByTagName(mxVsdxConstants.DOCUMENT_SHEET);
|
||||
|
||||
if (vdxDocumentStyle.getLength() > 0)
|
||||
{
|
||||
Element defaultStyle = (Element) vdxDocumentStyle.item(0);
|
||||
String lineId = defaultStyle.getAttribute(mxVsdxConstants.LINE_STYLE);
|
||||
String fillId = defaultStyle.getAttribute(mxVsdxConstants.FILL_STYLE);
|
||||
String textId = defaultStyle.getAttribute(mxVsdxConstants.TEXT_STYLE);
|
||||
lineStyle = model.getStylesheet(lineId);
|
||||
fillStyle = model.getStylesheet(fillId);
|
||||
textStyle = model.getStylesheet(textId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -189,31 +160,4 @@ public class mxPropertiesManager
|
|||
return font;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default fill style.
|
||||
* @return Stylesheet with the default fill style wrapped in an instance of mxStyleSheet.
|
||||
*/
|
||||
public mxStyleSheet getFillStyle()
|
||||
{
|
||||
return fillStyle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default line style.
|
||||
* @return Stylesheet with the default line style wrapped in an instance of mxStyleSheet.
|
||||
*/
|
||||
public mxStyleSheet getLineStyle()
|
||||
{
|
||||
return lineStyle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default text style.
|
||||
* @return Stylesheet with the default text style wrapped in an instance of mxStyleSheet.
|
||||
*/
|
||||
public mxStyleSheet getTextStyle()
|
||||
{
|
||||
return textStyle;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,193 +0,0 @@
|
|||
package com.mxgraph.io.vsdx;
|
||||
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* This class is a wrapper for a stylesheet element.<br/>
|
||||
* The Stylesheet element is treated like a shape element.<br/>
|
||||
* If a property is not found in the shape element but it may be found in a stylesheet,
|
||||
* the property is searched in such stylesheet.<br/>
|
||||
* All method that recieve a index like param ignores it. Stylesheets only have
|
||||
* one element of each class.
|
||||
*/
|
||||
public class mxStyleSheet extends Shape
|
||||
{
|
||||
public mxStyleSheet(Element s, mxVsdxModel model)
|
||||
{
|
||||
super(s, model);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFlags(String paraIX)
|
||||
{
|
||||
return super.getFlags("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHorizontalAlign(String paraIX)
|
||||
{
|
||||
return super.getHorizontalAlign("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIndentFirst(String paraIX)
|
||||
{
|
||||
return super.getIndentFirst("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIndentLeft(String paraIX)
|
||||
{
|
||||
return super.getIndentLeft("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIndentRight(String paraIX)
|
||||
{
|
||||
return super.getIndentRight("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLetterSpace(String paraIX)
|
||||
{
|
||||
return super.getLetterSpace("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRTLText(String paraIX)
|
||||
{
|
||||
return super.getRTLText("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSpAfter(String paraIX)
|
||||
{
|
||||
return super.getSpAfter("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSpBefore(String paraIX)
|
||||
{
|
||||
return super.getSpBefore("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getSpLine(String paraIX)
|
||||
{
|
||||
return super.getSpLine("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextColor(String charIX)
|
||||
{
|
||||
return super.getTextColor("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextFont(String charIX)
|
||||
{
|
||||
return super.getTextFont("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextSize(String charIX)
|
||||
{
|
||||
return super.getTextSize("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTextStrike(String charIX)
|
||||
{
|
||||
return super.getTextStrike("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextStyle(String charIX)
|
||||
{
|
||||
return super.getTextStyle("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasFlags(String paraIX)
|
||||
{
|
||||
return super.hasFlags("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasHorizontalAlign(String paraIX)
|
||||
{
|
||||
return super.hasHorizontalAlign("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasIndentFirst(String paraIX)
|
||||
{
|
||||
return super.hasIndentFirst("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasIndentLeft(String paraIX)
|
||||
{
|
||||
return super.hasIndentLeft("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasIndentRight(String paraIX)
|
||||
{
|
||||
return super.hasIndentRight("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasLetterSpace(String paraIX)
|
||||
{
|
||||
return super.hasLetterSpace("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSpAfter(String paraIX)
|
||||
{
|
||||
return super.hasSpAfter("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSpBefore(String paraIX)
|
||||
{
|
||||
return super.hasSpBefore("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasSpLine(String paraIX)
|
||||
{
|
||||
return super.hasSpLine("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTextFont(String charIX)
|
||||
{
|
||||
return super.hasTextFont("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTextPos(String charIX)
|
||||
{
|
||||
return super.hasTextPos("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTextSize(String charIX)
|
||||
{
|
||||
return super.hasTextSize("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTextStrike(String charIX)
|
||||
{
|
||||
return super.hasTextStrike("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTextStyle(String charIX)
|
||||
{
|
||||
return super.hasTextStyle("0");
|
||||
}
|
||||
}
|
|
@ -85,7 +85,7 @@ public class mxVsdxConstants
|
|||
public static String PAGE_HEIGHT = "PageHeight";
|
||||
public static String PAGE_WIDTH = "PageWidth";
|
||||
public static String PAGES = "Pages";
|
||||
public static String PARAGRAPH = "Para";
|
||||
public static String PARAGRAPH = "Paragraph";
|
||||
public static String PIN_X = "PinX";
|
||||
public static String PIN_Y = "PinY";
|
||||
public static String POS = "Pos";
|
||||
|
|
|
@ -54,7 +54,7 @@ public class mxVsdxModel {
|
|||
/**
|
||||
* Map stylesheets indexed by their ID
|
||||
*/
|
||||
protected Map<String, mxStyleSheet> stylesheets = new HashMap<String, mxStyleSheet>();
|
||||
protected Map<String, Style> stylesheets = new HashMap<String, Style>();
|
||||
|
||||
mxPropertiesManager pm;
|
||||
|
||||
|
@ -102,17 +102,17 @@ public class mxVsdxModel {
|
|||
{
|
||||
Element sheet = (Element) sheetList.item(i);
|
||||
String sheetId = sheet.getAttribute(mxVsdxConstants.ID);
|
||||
mxStyleSheet sheetElement = new mxStyleSheet(sheet, this);
|
||||
Style sheetElement = new Style(sheet, this);
|
||||
stylesheets.put(sheetId, sheetElement);
|
||||
}
|
||||
}
|
||||
|
||||
Collection <mxStyleSheet> sheets = stylesheets.values();
|
||||
Iterator<mxStyleSheet> iter = sheets.iterator();
|
||||
Collection <Style> sheets = stylesheets.values();
|
||||
Iterator<Style> iter = sheets.iterator();
|
||||
|
||||
while (iter.hasNext())
|
||||
{
|
||||
mxStyleSheet sheet = iter.next();
|
||||
Style sheet = iter.next();
|
||||
sheet.stylesheetRefs(this);
|
||||
}
|
||||
}
|
||||
|
@ -294,7 +294,7 @@ public class mxVsdxModel {
|
|||
* @param id StyleSheet's ID.
|
||||
* @return StyleSheet element with id = 'id' wrapped in an instance of mxStyleSheet.
|
||||
*/
|
||||
public mxStyleSheet getStylesheet(String id)
|
||||
public Style getStylesheet(String id)
|
||||
{
|
||||
return stylesheets.get(id);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,19 +5,16 @@
|
|||
package com.mxgraph.io.vsdx;
|
||||
|
||||
import com.mxgraph.util.mxConstants;
|
||||
import com.mxgraph.util.mxPoint;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
/**
|
||||
* General utilities for .vdx format support
|
||||
|
@ -32,109 +29,6 @@ public class mxVsdxUtils
|
|||
|
||||
private static final Logger log = Logger.getLogger(mxVsdxUtils.class.getName());
|
||||
|
||||
/**
|
||||
* Checks if the NodeList has a Node with name = tag.
|
||||
* @param nl NodeList
|
||||
* @param tag Name of the node.
|
||||
* @return Returns <code>true</code> if the Node List has a Node with name = tag.
|
||||
*/
|
||||
public static boolean nodeListHasTag(NodeList nl, String tag)
|
||||
{
|
||||
boolean has = false;
|
||||
|
||||
if (nl != null)
|
||||
{
|
||||
int length = nl.getLength();
|
||||
|
||||
for (int i = 0; (i < length) && !has; i++)
|
||||
{
|
||||
has = (nl.item(i)).getNodeName().equals(tag);
|
||||
}
|
||||
}
|
||||
|
||||
return has;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the first Element that has name = tag in Node List.
|
||||
* @param nl NodeList
|
||||
* @param tag Name of the Element
|
||||
* @return Element with name = 'tag'.
|
||||
*/
|
||||
public static Element nodeListTag(NodeList nl, String tag)
|
||||
{
|
||||
if (nl != null)
|
||||
{
|
||||
int length = nl.getLength();
|
||||
boolean has = false;
|
||||
|
||||
for (int i = 0; (i < length) && !has; i++)
|
||||
{
|
||||
has = (nl.item(i)).getNodeName().equals(tag);
|
||||
|
||||
if (has)
|
||||
{
|
||||
return (Element) nl.item(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Element that has name = tag and Index = ix in Node List.
|
||||
* @param nl NodeList
|
||||
* @param tag name of the Element
|
||||
* @return Element that has name = tag and Index = ix in Node List..
|
||||
*/
|
||||
public static Element nodeListTagIndexed(NodeList nl, String tag, String ix)
|
||||
{
|
||||
if (nl != null)
|
||||
{
|
||||
int length = nl.getLength();
|
||||
boolean has = false;
|
||||
|
||||
for (int i = 0; (i < length) && !has; i++)
|
||||
{
|
||||
has = (nl.item(i)).getNodeName().equals(tag) && ((Element) (nl.item(i))).getAttribute("IX").equals(ix);
|
||||
|
||||
if (has)
|
||||
{
|
||||
return (Element) nl.item(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list with the elements included in the Node List that have name = tag.
|
||||
* @param nl NodeList
|
||||
* @param tag name of the Element.
|
||||
* @return List with the indicated elements.
|
||||
*/
|
||||
public static List<Element> nodeListTags(NodeList nl, String tag)
|
||||
{
|
||||
ArrayList<Element> ret = new ArrayList<Element>();
|
||||
|
||||
if (nl != null)
|
||||
{
|
||||
int length = nl.getLength();
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
if (tag.equals((nl.item(i)).getNodeName()))
|
||||
{
|
||||
ret.add((Element) nl.item(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a collection of direct child Elements that match the specified tag name
|
||||
* @param parent the parent whose direct children will be processed
|
||||
|
@ -284,43 +178,6 @@ public class mxVsdxUtils
|
|||
return styleMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a list of mxPoint in the standard output.
|
||||
* @param list Lis of mxPoint.
|
||||
*/
|
||||
public static void printPointList(List<mxPoint> list)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
for (mxPoint p : list)
|
||||
{
|
||||
i++;
|
||||
System.out.println("Point " + i + " X=" + p.getX() + ", Y=" + p.getY());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array with the cells contained in the map, ordered according
|
||||
* the order of the keys in orderList.
|
||||
* @param orderList List of keys in the order desired.
|
||||
* @param map Map with the object to be put in the array.
|
||||
* @return Array with the cells.
|
||||
*/
|
||||
public static Object[] getOrderArray(List<ShapePageId> orderList, HashMap<ShapePageId, Object> map)
|
||||
{
|
||||
int length = orderList.size();
|
||||
Object[] array = new Object[length];
|
||||
int i = 0;
|
||||
|
||||
for (ShapePageId key : orderList)
|
||||
{
|
||||
array[i] = map.get(key);
|
||||
i++;
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
|
||||
public static boolean isInsideTriangle(double x, double y, double ax, double ay, double bx, double by, double cx, double cy)
|
||||
{
|
||||
bx = bx - ax;
|
||||
|
|
|
@ -44,8 +44,8 @@ public class Utils
|
|||
public static String inflate(byte[] binary) throws IOException
|
||||
{
|
||||
StringBuffer result = new StringBuffer();
|
||||
InputStream in = new InflaterInputStream(new ByteArrayInputStream(
|
||||
binary), new Inflater(true));
|
||||
InputStream in = new InflaterInputStream(
|
||||
new ByteArrayInputStream(binary), new Inflater(true));
|
||||
|
||||
while (in.available() != 0)
|
||||
{
|
||||
|
@ -76,18 +76,19 @@ public class Utils
|
|||
Deflater deflater = new Deflater(Deflater.DEFAULT_COMPRESSION, true);
|
||||
byte[] inBytes = inString.getBytes("UTF-8");
|
||||
deflater.setInput(inBytes);
|
||||
|
||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(inBytes.length);
|
||||
deflater.finish();
|
||||
byte[] buffer = new byte[IO_BUFFER_SIZE];
|
||||
|
||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(
|
||||
inBytes.length);
|
||||
deflater.finish();
|
||||
byte[] buffer = new byte[IO_BUFFER_SIZE];
|
||||
|
||||
while (!deflater.finished())
|
||||
{
|
||||
{
|
||||
int count = deflater.deflate(buffer); // returns the generated code... index
|
||||
outputStream.write(buffer, 0, count);
|
||||
}
|
||||
outputStream.write(buffer, 0, count);
|
||||
}
|
||||
|
||||
outputStream.close();
|
||||
outputStream.close();
|
||||
byte[] output = outputStream.toByteArray();
|
||||
|
||||
return output;
|
||||
|
@ -99,8 +100,7 @@ public class Utils
|
|||
* @param out the output stream
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void copy(InputStream in, OutputStream out)
|
||||
throws IOException
|
||||
public static void copy(InputStream in, OutputStream out) throws IOException
|
||||
{
|
||||
copy(in, out, IO_BUFFER_SIZE);
|
||||
}
|
||||
|
@ -159,21 +159,89 @@ public class Utils
|
|||
*/
|
||||
public static String encodeURIComponent(String s, String charset)
|
||||
{
|
||||
String result = null;
|
||||
|
||||
try
|
||||
if (s == null)
|
||||
{
|
||||
result = URLEncoder.encode(s, charset).replaceAll("\\+", "%20")
|
||||
.replaceAll("\\%21", "!").replaceAll("\\%28", "(")
|
||||
.replaceAll("\\%29", ")").replaceAll("\\%7E", "~");
|
||||
return null;
|
||||
}
|
||||
|
||||
// This exception should never occur.
|
||||
catch (UnsupportedEncodingException e)
|
||||
else
|
||||
{
|
||||
result = s;
|
||||
}
|
||||
String result;
|
||||
|
||||
return result;
|
||||
try
|
||||
{
|
||||
result = URLEncoder.encode(s, charset).replaceAll("\\+", "%20")
|
||||
.replaceAll("\\%21", "!").replaceAll("\\%28", "(")
|
||||
.replaceAll("\\%29", ")").replaceAll("\\%7E", "~");
|
||||
}
|
||||
catch (UnsupportedEncodingException e)
|
||||
{
|
||||
// This exception should never occur
|
||||
result = s;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Removes one newline from end of a String if it's there,
|
||||
* otherwise leave it alone. A newline is "{@code \n}",
|
||||
* "{@code \r}", or "{@code \r\n}".</p>
|
||||
*
|
||||
* <p>Borrowed from Apache Commons Lang 3.5</p>
|
||||
*
|
||||
* <pre>
|
||||
* StringUtils.chomp(null) = null
|
||||
* StringUtils.chomp("") = ""
|
||||
* StringUtils.chomp("abc \r") = "abc "
|
||||
* StringUtils.chomp("abc\n") = "abc"
|
||||
* StringUtils.chomp("abc\r\n") = "abc"
|
||||
* StringUtils.chomp("abc\r\n\r\n") = "abc\r\n"
|
||||
* StringUtils.chomp("abc\n\r") = "abc\n"
|
||||
* StringUtils.chomp("abc\n\rabc") = "abc\n\rabc"
|
||||
* StringUtils.chomp("\r") = ""
|
||||
* StringUtils.chomp("\n") = ""
|
||||
* StringUtils.chomp("\r\n") = ""
|
||||
* </pre>
|
||||
*
|
||||
* @param str the String to chomp a newline from, may be null
|
||||
* @return String without newline, {@code null} if null String input
|
||||
*/
|
||||
public static String chomp(final String str)
|
||||
{
|
||||
if (str.isEmpty())
|
||||
{
|
||||
return str;
|
||||
}
|
||||
|
||||
if (str.length() == 1)
|
||||
{
|
||||
final char ch = str.charAt(0);
|
||||
|
||||
if (ch == '\r' || ch == '\n')
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
int lastIdx = str.length() - 1;
|
||||
final char last = str.charAt(lastIdx);
|
||||
|
||||
if (last == '\n')
|
||||
{
|
||||
if (str.charAt(lastIdx - 1) == '\r')
|
||||
{
|
||||
lastIdx--;
|
||||
}
|
||||
}
|
||||
else if (last != '\r')
|
||||
{
|
||||
lastIdx++;
|
||||
}
|
||||
|
||||
return str.substring(0, lastIdx);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
CACHE MANIFEST
|
||||
|
||||
# THIS FILE WAS GENERATED. DO NOT MODIFY!
|
||||
# 12/01/2016 11:51 AM
|
||||
# 12/08/2016 02:05 PM
|
||||
|
||||
/app.html
|
||||
/index.html?offline=1
|
||||
|
|
|
@ -6,6 +6,19 @@
|
|||
var isLocalStorage = false;
|
||||
var mxLoadStylesheets = false;
|
||||
</script>
|
||||
<!-- CSS for print output is needed for using current window -->
|
||||
<style type="text/css">
|
||||
@media print {
|
||||
table.mxPageSelector { display: none; }
|
||||
hr.mxPageBreak { display: none; }
|
||||
}
|
||||
@media screen {
|
||||
table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }
|
||||
table.mxPageSelector td { border: solid 1px gray; padding:4px; }
|
||||
body.mxPage { background: gray; }
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="mxgraph/css/common.css" charset="UTF-8" type="text/css">
|
||||
<script src="js/app.min.js"></script>
|
||||
<script>
|
||||
// NOTE: SVG Output fixes missing symbols in AsciiMath
|
||||
|
|
348
war/js/app.min.js
vendored
348
war/js/app.min.js
vendored
|
@ -52,10 +52,10 @@ H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(b,a,e){function g(p,u){function q(e,f,
|
|||
z]);var y;a.ia?(y=a.ia(k,z),"string"!==typeof y&&(r=d,y=z),r&&s!==+s&&(s=t.d.NONE)):(y=z,s!==+s&&(r=d));var x=z="",E=d;/^[~^$*|]?=$/.test(b[e])&&(z=b[e++],x=b[e++],/^[0-9A-Za-z:_\-]+$/.test(x)?x='"'+x+'"':"]"===x&&(x='""',--e),/^"([^\"\\]|\\.)*"$/.test(x)||(r=d),(E="i"===b[e])&&++e);"]"!==b[e]&&(++e,r=d);switch(s){case t.d.CLASSES:case t.d.LOCAL_NAME:case t.d.NONE:break;case t.d.GLOBAL_NAME:case t.d.ID:case t.d.IDREF:("\x3d"===z||"~\x3d"===z||"$\x3d"===z)&&'""'!=x&&!E?x='"'+x.substring(1,x.length-
|
||||
1)+l+'"':"|\x3d"===z||""===z||(r=d);break;case t.d.URI:case t.d.URI_FRAGMENT:""!==z&&(r=d);break;default:r=d}r&&(p+="["+y.replace(/[^\w-]/g,"\\$\x26")+z+x+(E?" i]":"]"))}else if(e<f&&":"===b[e])if(s=b[++e],F.test(s))u+=":"+s;else break;else break;e!==f&&(r=d);r&&(e=(k+m).replace(/[^ .*#\w-]/g,"\\$\x26")+p+u+g)&&v.push(e);return r}" "===b[p]&&++p;u-1!==p&&" "===b[u]&&--u;for(var v=[],s=p,r=c,z=p;r&&z<u;++z){var y=b[z];if(H[y]===H||" "===y)q(s,z,y)?s=z+1:r=d}q(s,u,"")||(r=d);return r?(v.length&&(s=
|
||||
v.join(""),k!==f&&(s="."+k+" "+s),m.push(s)),c):!e||e(b.slice(p,u))}var k=a.na,l=a.L,n=a.Aa,m=[],p=0,u,q=0,v;for(u=0;u<b.length;++u)if(v=b[u],"("==v||"["==v?(++q,c):")"==v||"]"==v?(q&&--q,c):!(" "==b[u]&&(q||H[b[u-1]]===H||H[b[u+1]]===H)))b[p++]=b[u];b.length=p;p=b.length;for(u=q=0;u<p;++u)if(","===b[u]){if(!g(q,u))return f;q=u+1}return!g(q,p)?f:m};(function(){var b=/^\w/,a=RegExp("^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*))*$",
|
||||
"i");s=function(d){d=d.slice();for(var e=d.length,c=0,f=0;f<e;++f){var g=d[f];" "!=g&&(d[c++]=g)}d.length=c;d=d.join(" ");return!d.length?"":!a.test(d)?"not all":b.test(d)?d:"not all , "+d}})();(function(){function b(a){var d=/^\s*[']([^']*)[']\s*$/,e=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,c=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/,k;return(k=/^\s*["]([^"]*)["]\s*$/.exec(a))||(k=d.exec(a))||(k=e.exec(a))||(k=c.exec(a))||(k=g.exec(a))?k[1]:f}function e(g,l,n,t,v,r,z){function F(){C=
|
||||
G.length&&G[G.length-1]===f}var E=a,B=z||[0],G=[],C=d;q(l,{startStylesheet:function(){E=[]},endStylesheet:function(){},startAtrule:function(a,d){if(C)a=f;else if("@media"===a)E.push("@media"," ",s(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(E.push(a," ",c+n.L),a="@keyframes"):a=f}else if("@import"===a&&0<d.length)if(a=f,"function"===typeof r){var l=s(d.slice(1));if("not all"!==l){++B[0];var m=[];E.push(m);var p=u(k(g,b(d[0])),function(b){var a=
|
||||
e(p,b.qa,n,t,v,r,B);--B[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;m[0]=b;r(b,!!B[0])},v)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");C=!a;G.push(a)},endAtrule:function(){G.pop();C||E.push(";");F()},startBlock:function(){C||E.push("{")},endBlock:function(){C||(E.push("}"),C=c)},startRuleset:function(b){if(!C){var d=a;"@keyframes"===G[G.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
|
||||
C=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,n),!b||!b.length?C=c:d=b.join(", "));C||E.push(d,"{")}G.push(f)},endRuleset:function(){G.pop();C||E.push("}");F()},declaration:function(b,a){if(!C){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);m(b,a,t,g,n.L);a.length&&E.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return E.join("")}},va:!!B[0]}}r=function(b,d,c,f){return e(b,d,c,f,a,a).result.toString()}})()})();"undefined"!==
|
||||
"i");s=function(d){d=d.slice();for(var e=d.length,c=0,f=0;f<e;++f){var g=d[f];" "!=g&&(d[c++]=g)}d.length=c;d=d.join(" ");return!d.length?"":!a.test(d)?"not all":b.test(d)?d:"not all , "+d}})();(function(){function b(a){var d=/^\s*[']([^']*)[']\s*$/,e=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,c=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/,k;return(k=/^\s*["]([^"]*)["]\s*$/.exec(a))||(k=d.exec(a))||(k=e.exec(a))||(k=c.exec(a))||(k=g.exec(a))?k[1]:f}function e(g,l,n,t,v,r,z){function F(){G=
|
||||
C.length&&C[C.length-1]===f}var E=a,B=z||[0],C=[],G=d;q(l,{startStylesheet:function(){E=[]},endStylesheet:function(){},startAtrule:function(a,d){if(G)a=f;else if("@media"===a)E.push("@media"," ",s(d));else if("@keyframes"===a||"@-webkit-keyframes"===a){var c=d[0];1===d.length&&!/__$|[^\w\-]/.test(c)?(E.push(a," ",c+n.L),a="@keyframes"):a=f}else if("@import"===a&&0<d.length)if(a=f,"function"===typeof r){var l=s(d.slice(1));if("not all"!==l){++B[0];var m=[];E.push(m);var p=u(k(g,b(d[0])),function(b){var a=
|
||||
e(p,b.qa,n,t,v,r,B);--B[0];b=l?{toString:function(){return"@media "+l+" {"+a.result+"}"}}:a.result;m[0]=b;r(b,!!B[0])},v)}}else window.console&&window.console.log("@import "+d.join(" ")+" elided");G=!a;C.push(a)},endAtrule:function(){C.pop();G||E.push(";");F()},startBlock:function(){G||E.push("{")},endBlock:function(){G||(E.push("}"),G=c)},startRuleset:function(b){if(!G){var d=a;"@keyframes"===C[C.length-1]?(d=b.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
|
||||
G=!d,d&&(d=d[0].replace(/ +/g,""))):(b=p(b,n),!b||!b.length?G=c:d=b.join(", "));G||E.push(d,"{")}C.push(f)},endRuleset:function(){C.pop();G||E.push("}");F()},declaration:function(b,a){if(!G){var e=d,f=a.length;2<=f&&"!"===a[f-2]&&"important"===a[f-1].toLowerCase()&&(e=c,a.length-=2);m(b,a,t,g,n.L);a.length&&E.push(b,":",a.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return E.join("")}},va:!!B[0]}}r=function(b,d,c,f){return e(b,d,c,f,a,a).result.toString()}})()})();"undefined"!==
|
||||
typeof window&&(window.sanitizeCssProperty=m,window.sanitizeCssSelectorList=p,window.sanitizeStylesheet=r,window.sanitizeMediaQuery=s);var q,u;(function(){function b(d,e,c,f,g){for(var k=e++;e<c&&"{"!==d[e]&&";"!==d[e];)++e;if(e<c&&(g||";"===d[e])){g=k+1;var l=e;g<c&&" "===d[g]&&++g;l>g&&" "===d[l-1]&&--l;f.startAtrule&&f.startAtrule(d[k].toLowerCase(),d.slice(g,l));e="{"===d[e]?a(d,e,c,f):e+1;f.endAtrule&&f.endAtrule()}return e}function a(c,f,g,k){++f;for(k.startBlock&&k.startBlock();f<g;){var l=
|
||||
c[f].charAt(0);if("}"==l){++f;break}f=" "===l||";"===l?f+1:"@"===l?b(c,f,g,k,d):"{"===l?a(c,f,g,k):e(c,f,g,k)}k.endBlock&&k.endBlock();return f}function e(b,a,d,g){var k=a,n=f(b,a,d,c);if(0>n)return n=~n,n===k?n+1:n;var m=b[n];if("{"!==m)return n===k?n+1:n;a=n+1;n>k&&" "===b[n-1]&&--n;for(g.startRuleset&&g.startRuleset(b.slice(k,n));a<d;){m=b[a];if("}"===m){++a;break}a=" "===m?a+1:l(b,a,d,g)}g.endRuleset&&g.endRuleset();return a}function f(b,a,d,e){for(var c,g=[],k=-1;a<d;++a)if(c=b[a].charAt(0),
|
||||
"["===c||"("===c)g[++k]=c;else if("]"===c&&"["===g[k]||")"===c&&"("===g[k])--k;else if("{"===c||"}"===c||";"===c||"@"===c||":"===c&&!e)break;0<=k&&(a=~(a+1));return a}function g(b,a,d){for(;a<d&&";"!==b[a]&&"}"!==b[a];)++a;return a<d&&";"===b[a]?a+1:a}function l(b,a,e,c){var k=b[a++];if(!n.test(k))return g(b,a,e);a<e&&" "===b[a]&&++a;if(a==e||":"!==b[a])return g(b,a,e);++a;a<e&&" "===b[a]&&++a;var m=f(b,a,e,d);if(0>m)m=~m;else{for(var p=[],t=0,u=a;u<m;++u)a=b[u]," "!==a&&(p[t++]=a);if(m<e){do{a=b[m];
|
||||
|
@ -198,8 +198,8 @@ window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"
|
|||
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/")||
|
||||
0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_WIN:0<navigator.appVersion.indexOf("Win"),
|
||||
IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,c,f){f=f||document;if(mxClient.IS_IE6)f.write('\x3clink rel\x3d"'+a+'" href\x3d"'+c+'" charset\x3d"ISO-8859-1" type\x3d"text/css"/\x3e');else{var d=f.createElement("link");d.setAttribute("rel",
|
||||
a);d.setAttribute("href",c);d.setAttribute("charset","ISO-8859-1");d.setAttribute("type","text/css");f.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
|
||||
IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,c,f){f=f||document;if(mxClient.IS_IE6)f.write('\x3clink rel\x3d"'+a+'" href\x3d"'+c+'" charset\x3d"UTF-8" type\x3d"text/css"/\x3e');else{var d=f.createElement("link");d.setAttribute("rel",
|
||||
a);d.setAttribute("href",c);d.setAttribute("charset","UTF-8");d.setAttribute("type","text/css");f.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
|
||||
"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);"undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";
|
||||
"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;
|
||||
mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
|
||||
|
@ -664,26 +664,27 @@ a.lineTo(y+x*e,v-t*e),a.quadTo(H,J,A,F),function(b,d){B.push(function(){a.lineTo
|
|||
a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<c.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,c[0].x,c[0].y,q,s,m,d,e,n,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-t,-x,f,b,e,n,!0),a.stroke(),a.end()))}};
|
||||
mxArrowConnector.prototype.paintMarker=function(a,c,f,d,b,e,g,k,l,n){g=k/g;var m=k*b/2;k=-k*d/2;var p=(l+e)*d;e=(l+e)*b;n?a.moveTo(c-m+p,f-k+e):a.lineTo(c-m+p,f-k+e);a.lineTo(c-m/g+p,f-k/g+e);a.lineTo(c+l*d,f+l*b);a.lineTo(c+m/g+p,f+k/g+e);a.lineTo(c+m+p,f+k+e)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
|
||||
mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
|
||||
function mxText(a,c,f,d,b,e,g,k,l,n,m,p,r,s,q,u,t,v,z,x,y){mxShape.call(this);this.value=a;this.bounds=c;this.color=null!=b?b:"black";this.align=null!=f?f:"";this.valign=null!=d?d:"";this.family=null!=e?e:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(n||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(p||
|
||||
0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=s?s:!0;this.background=q;this.border=u;this.wrap=null!=t?t:!1;this.clipped=null!=v?v:!1;this.overflow=null!=z?z:"visible";this.labelPadding=null!=x?x:0;this.textDirection=y;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
|
||||
mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
|
||||
function mxText(a,c,f,d,b,e,g,k,l,n,m,p,r,s,q,u,t,v,z,x,y){mxShape.call(this);this.value=a;this.bounds=c;this.color=null!=b?b:"black";this.align=null!=f?f:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=e?e:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(n||0);this.spacingRight=this.spacing+parseInt(m||0);
|
||||
this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=s?s:!0;this.background=q;this.border=u;this.wrap=null!=t?t:!1;this.clipped=null!=v?v:!1;this.overflow=null!=z?z:"visible";this.labelPadding=null!=x?x:0;this.textDirection=y;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
|
||||
mxText.prototype.replaceLinefeeds=!0;mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
|
||||
mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
|
||||
mxText.prototype.paint=function(a,c){var f=this.scale,d=this.bounds.x/f,b=this.bounds.y/f,e=this.bounds.width/f,f=this.bounds.height/f;this.updateTransform(a,d,b,e,f);this.configureCanvas(a,d,b,e,f);if(c){var g=null!=this.state?this.state.unscaledWidth:null;null!=this.node.firstChild&&this.lastUnscaledWidth!=g&&a.invalidateCachedOffsetSize(this.node);a.updateText(d,b,e,f,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node)}else{var k=(g=mxUtils.isNode(this.value)||
|
||||
this.dialect==mxConstants.DIALECT_STRICTHTML)||a instanceof mxVmlCanvas2D?"html":"",l=this.value;!g&&"html"==k&&(l=mxUtils.htmlEntities(l,!1));"html"==k&&!mxUtils.isNode(this.value)&&(l=mxUtils.replaceTrailingNewlines(l,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));var l=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==k?l.replace(/\n/g,"\x3cbr/\x3e"):l,n=this.textDirection;n==mxConstants.TEXT_DIRECTION_AUTO&&!g&&(n=this.getAutoDirection());n!=mxConstants.TEXT_DIRECTION_LTR&&n!=mxConstants.TEXT_DIRECTION_RTL&&
|
||||
(n=null);a.text(d,b,e,f,l,this.align,this.valign,this.wrap,k,this.overflow,this.clipped,this.getTextRotation(),n)}this.lastUnscaledWidth=null!=this.state?this.state.unscaledWidth:null};
|
||||
mxText.prototype.redraw=function(){if(this.visible&&this.checkBounds()&&this.cacheEnabled&&this.lastValue==this.value&&(mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML))if("DIV"==this.node.nodeName&&(this.isHtmlAllowed()||!mxClient.IS_VML))this.updateSize(this.node,null==this.state||null==this.state.view.textDiv),mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform(),this.updateBoundingBox();else{var a=this.createCanvas();
|
||||
null!=a&&null!=a.updateText&&null!=a.invalidateCachedOffsetSize?(this.paint(a,!0),this.destroyCanvas(a),this.updateBoundingBox()):mxShape.prototype.redraw.apply(this,arguments)}else mxShape.prototype.redraw.apply(this,arguments),mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML?this.lastValue=this.value:this.lastValue=null};
|
||||
mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.valign=this.align="";this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacing=2;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=0;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;delete this.margin};
|
||||
mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.align=mxConstants.ALIGN_CENTER;this.valign=mxConstants.ALIGN_MIDDLE;this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacing=2;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=0;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;
|
||||
delete this.margin};
|
||||
mxText.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign=
|
||||
mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing),this.spacingTop=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop)+this.spacing,this.spacingRight=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight)+this.spacing,this.spacingBottom=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom)+this.spacing,this.spacingLeft=mxUtils.getValue(this.style,
|
||||
mxConstants.STYLE_SPACING_LEFT,this.spacingLeft)+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.updateMargin());this.flipH=this.flipV=
|
||||
null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0<a.length&&"z"<a[0]?mxConstants.TEXT_DIRECTION_RTL:mxConstants.TEXT_DIRECTION_LTR};
|
||||
mxConstants.STYLE_SPACING_LEFT,this.spacingLeft)+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_OPACITY,
|
||||
100),this.updateMargin());this.flipH=this.flipV=null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0<a.length&&"z"<a[0]?mxConstants.TEXT_DIRECTION_RTL:mxConstants.TEXT_DIRECTION_LTR};
|
||||
mxText.prototype.updateBoundingBox=function(){var a=this.node;this.boundingBox=this.bounds.clone();var c=this.getTextRotation(),f=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER):null,d=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE):null;if(!this.ignoreStringSize&&null!=a&&"fill"!=this.overflow&&(!this.clipped||!this.ignoreClippedStringSize||f!=mxConstants.ALIGN_CENTER||d!=mxConstants.ALIGN_MIDDLE)){d=
|
||||
f=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,f=parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var b=a.getBBox();if("string"==typeof this.value&&0==mxUtils.trim(this.value)){this.boundingBox=null;return}if(0==b.width&&0==b.height){this.boundingBox=null;return}this.boundingBox=new mxRectangle(b.x,b.y,b.width,b.height);c=0}catch(e){}else f=
|
||||
null!=this.state?this.state.view.textDiv:null,null!=this.offsetWidth&&null!=this.offsetHeight||(null!=f&&(this.updateFont(f),this.updateSize(f,!1),this.updateInnerHtml(f),a=f),b=a,8==document.documentMode&&!mxClient.IS_EM?(d=Math.round(this.bounds.width/this.scale),this.wrap&&0<d?(a.style.wordWrap=mxConstants.WORD_WRAP,a.style.whiteSpace="normal","break-word"!=a.style.wordWrap&&(a=b.getElementsByTagName("div"),0<a.length&&(b=a[a.length-1]),f=b.offsetWidth+2,a=this.node.getElementsByTagName("div"),
|
||||
this.clipped&&(f=Math.min(d,f)),1<a.length&&(a[a.length-2].style.width=f+"px"))):a.style.whiteSpace="nowrap"):null!=b.firstChild&&"DIV"==b.firstChild.nodeName&&(b=b.firstChild),this.offsetWidth=b.offsetWidth+this.textWidthPadding,this.offsetHeight=b.offsetHeight),f=this.offsetWidth*this.scale,d=this.offsetHeight*this.scale;null!=f&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x+this.margin.x*f,this.bounds.y+this.margin.y*d,f,d))}else this.boundingBox.x+=this.margin.x*this.boundingBox.width,
|
||||
this.boundingBox.y+=this.margin.y*this.boundingBox.height;null!=this.boundingBox&&(0!=c?(this.unrotatedBoundingBox=mxRectangle.fromRectangle(this.boundingBox),c=mxUtils.getBoundingBox(this.boundingBox,c),this.boundingBox.x=c.x,this.boundingBox.y=c.y,mxClient.IS_QUIRKS||(this.boundingBox.width=c.width,this.boundingBox.height=c.height)):this.unrotatedBoundingBox=null)};mxText.prototype.getShapeRotation=function(){return 0};
|
||||
mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
|
||||
f=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,f=parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var b=a.getBBox();"string"==typeof this.value&&0==mxUtils.trim(this.value)?this.boundingBox=null:this.boundingBox=0==b.width&&0==b.height?null:new mxRectangle(b.x,b.y,b.width,b.height);return}catch(e){}else f=null!=this.state?this.state.view.textDiv:
|
||||
null,null!=this.offsetWidth&&null!=this.offsetHeight||(null!=f&&(this.updateFont(f),this.updateSize(f,!1),this.updateInnerHtml(f),a=f),b=a,8==document.documentMode&&!mxClient.IS_EM?(d=Math.round(this.bounds.width/this.scale),this.wrap&&0<d?(a.style.wordWrap=mxConstants.WORD_WRAP,a.style.whiteSpace="normal","break-word"!=a.style.wordWrap&&(a=b.getElementsByTagName("div"),0<a.length&&(b=a[a.length-1]),f=b.offsetWidth+2,a=this.node.getElementsByTagName("div"),this.clipped&&(f=Math.min(d,f)),1<a.length&&
|
||||
(a[a.length-2].style.width=f+"px"))):a.style.whiteSpace="nowrap"):null!=b.firstChild&&"DIV"==b.firstChild.nodeName&&(b=b.firstChild),this.offsetWidth=b.offsetWidth+this.textWidthPadding,this.offsetHeight=b.offsetHeight),f=this.offsetWidth*this.scale,d=this.offsetHeight*this.scale;null!=f&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x,this.bounds.y,f,d))}null!=this.boundingBox&&(0!=c?(c=mxUtils.getBoundingBox(new mxRectangle(this.margin.x*this.boundingBox.width,this.margin.y*this.boundingBox.height,
|
||||
this.boundingBox.width,this.boundingBox.height),c,new mxPoint(0,0)),this.unrotatedBoundingBox=mxRectangle.fromRectangle(this.boundingBox),this.unrotatedBoundingBox.x+=this.margin.x*this.unrotatedBoundingBox.width,this.unrotatedBoundingBox.y+=this.margin.y*this.unrotatedBoundingBox.height,this.boundingBox.x+=c.x,this.boundingBox.y+=c.y,this.boundingBox.width=c.width,this.boundingBox.height=c.height):(this.boundingBox.x+=this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height,
|
||||
this.unrotatedBoundingBox=null))};mxText.prototype.getShapeRotation=function(){return 0};mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
|
||||
mxText.prototype.configureCanvas=function(a,c,f,d,b){mxShape.prototype.configureCanvas.apply(this,arguments);a.setFontColor(this.color);a.setFontBackgroundColor(this.background);a.setFontBorderColor(this.border);a.setFontFamily(this.family);a.setFontSize(this.size);a.setFontStyle(this.fontStyle)};
|
||||
mxText.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width="1px";this.node.style.height="1px";this.node.style.overflow="visible"};
|
||||
mxText.prototype.redrawHtmlShape=function(){var a=this.node.style;a.whiteSpace="normal";a.overflow="";a.width="";a.height="";this.updateValue();this.updateFont(this.node);this.updateSize(this.node,null==this.state||null==this.state.view.textDiv);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()};
|
||||
|
@ -983,7 +984,7 @@ mxCell.prototype.isCollapsed=function(){return 0!=this.collapsed};mxCell.prototy
|
|||
mxCell.prototype.getIndex=function(a){return mxUtils.indexOf(this.children,a)};mxCell.prototype.getChildAt=function(a){return null==this.children?null:this.children[a]};mxCell.prototype.insert=function(a,c){null!=a&&(null==c&&(c=this.getChildCount(),a.getParent()==this&&c--),a.removeFromParent(),a.setParent(this),null==this.children?(this.children=[],this.children.push(a)):this.children.splice(c,0,a));return a};
|
||||
mxCell.prototype.remove=function(a){var c=null;null!=this.children&&0<=a&&(c=this.getChildAt(a),null!=c&&(this.children.splice(a,1),c.setParent(null)));return c};mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var a=this.parent.getIndex(this);this.parent.remove(a)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(a){return mxUtils.indexOf(this.edges,a)};
|
||||
mxCell.prototype.getEdgeAt=function(a){return null==this.edges?null:this.edges[a]};mxCell.prototype.insertEdge=function(a,c){if(null!=a&&(a.removeFromTerminal(c),a.setTerminal(this,c),null==this.edges||a.getTerminal(!c)!=this||0>mxUtils.indexOf(this.edges,a)))null==this.edges&&(this.edges=[]),this.edges.push(a);return a};mxCell.prototype.removeEdge=function(a,c){if(null!=a){if(a.getTerminal(!c)!=this&&null!=this.edges){var f=this.getEdgeIndex(a);0<=f&&this.edges.splice(f,1)}a.setTerminal(null,c)}return a};
|
||||
mxCell.prototype.removeFromTerminal=function(a){var c=this.getTerminal(a);null!=c&&c.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var c=this.getValue();return null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.hasAttribute(a):!1};mxCell.prototype.getAttribute=function(a,c){var f=this.getValue();return(null!=f&&f.nodeType==mxConstants.NODETYPE_ELEMENT?f.getAttribute(a):null)||c};
|
||||
mxCell.prototype.removeFromTerminal=function(a){var c=this.getTerminal(a);null!=c&&c.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var c=this.getValue();return null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.hasAttribute?c.hasAttribute(a):null!=c.getAttribute(a)};mxCell.prototype.getAttribute=function(a,c){var f=this.getValue();return(null!=f&&f.nodeType==mxConstants.NODETYPE_ELEMENT?f.getAttribute(a):null)||c};
|
||||
mxCell.prototype.setAttribute=function(a,c){var f=this.getValue();null!=f&&f.nodeType==mxConstants.NODETYPE_ELEMENT&&f.setAttribute(a,c)};mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(){var a=this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,c,f,d){mxRectangle.call(this,a,c,f,d)}mxGeometry.prototype=new mxRectangle;
|
||||
mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1;
|
||||
mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,c){c?this.sourcePoint=a:this.targetPoint=a;return a};
|
||||
|
@ -1022,7 +1023,7 @@ g.writeln(k);mxClient.IS_VML?g.writeln('\x3chtml xmlns:v\x3d"urn:schemas-microso
|
|||
(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var r=this.pageFormat.width-2*this.border,s=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=m;l.height/=m;var q=Math.max(1,Math.ceil((l.width+this.x0)/r)),u=Math.max(1,Math.ceil((l.height+this.y0)/s));this.pageCount=q*u;var t=mxUtils.bind(this,function(){if(this.pageSelector&&(1<u||1<q)){var b=this.createPageSelector(u,q);g.body.appendChild(b);
|
||||
if(mxClient.IS_IE&&null==g.documentMode||5==g.documentMode||8==g.documentMode||7==g.documentMode){b.style.position="absolute";var a=function(){b.style.top=(g.body.scrollTop||g.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(b){a()});mxEvent.addListener(this.wnd,"resize",function(b){a()})}}}),v=mxUtils.bind(this,function(b,a){null!=this.borderColor&&(b.style.borderColor=this.borderColor,b.style.borderStyle="solid",b.style.borderWidth="1px");b.style.background=this.backgroundColor;
|
||||
if(f||a)b.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(b.outerHTML),b.parentNode.removeChild(b)):(b.parentNode.removeChild(b),g.body.appendChild(b));(f||a)&&this.addPageBreak(g)}),z=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=z)for(var x=0;x<z.length;x++)v(z[x],!0);for(var y=this.getAppendices(this.pageFormat.width,this.pageFormat.height),x=0;x<u;x++){var C=x*s/this.scale-this.y0/this.scale+(l.y-p.y*n)/n;for(a=0;a<
|
||||
q;a++){if(null==this.wnd)return null;var A=a*r/this.scale-this.x0/this.scale+(l.x-p.x*n)/n,B=x*q+a+1,E=new mxRectangle(A,C,r,s),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-A,-C,this.scale,B,b,E);this.printBackgroundImage&&this.insertBackgroundImage(b,-A,-C)}),B);e.setAttribute("id","mxPage-"+B);v(e,null!=y||x<u-1||a<q-1)}}if(null!=y)for(x=0;x<y.length;x++)v(y[x],x<y.length);c&&!d&&(this.closeDocument(),t());this.wnd.focus()}catch(G){null!=
|
||||
q;a++){if(null==this.wnd)return null;var A=a*r/this.scale-this.x0/this.scale+(l.x-p.x*n)/n,B=x*q+a+1,E=new mxRectangle(A,C,r,s),e=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(b){this.addGraphFragment(-A,-C,this.scale,B,b,E);this.printBackgroundImage&&this.insertBackgroundImage(b,-A,-C)}),B);e.setAttribute("id","mxPage-"+B);v(e,null!=y||x<u-1||a<q-1)}}if(null!=y)for(x=0;x<y.length;x++)v(y[x],x<y.length-1);c&&!d&&(this.closeDocument(),t());this.wnd.focus()}catch(G){null!=
|
||||
e&&null!=e.parentNode&&e.parentNode.removeChild(e)}finally{this.graph.cellRenderer.initializeOverlay=b}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var c=a.createElement("hr");c.className="mxPageBreak";a.body.appendChild(c)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close();mxEvent.release(a.body)}};
|
||||
mxPrintPreview.prototype.writeHead=function(a,c){null!=this.title&&a.writeln("\x3ctitle\x3e"+this.title+"\x3c/title\x3e");mxClient.IS_VML&&a.writeln('\x3cstyle type\x3d"text/css"\x3ev\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}\x3c/style\x3e');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('\x3cstyle type\x3d"text/css"\x3e');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");
|
||||
a.writeln("}");a.writeln("@media screen {");a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=c&&a.writeln(c);a.writeln("\x3c/style\x3e")};mxPrintPreview.prototype.writePostfix=function(a){};
|
||||
|
@ -1116,9 +1117,9 @@ b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d,a));mxEvent.consume(d)},f
|
|||
mxCellRenderer.prototype.isShapeEvent=function(a,c){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,c){return!0};
|
||||
mxCellRenderer.prototype.installListeners=function(a){var c=a.view.graph,f=function(d){var b=a;if(c.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(d).nodeName||mxClient.IS_TOUCH)b=mxEvent.getClientX(d),d=mxEvent.getClientY(d),d=mxUtils.convertPoint(c.container,b,d),b=c.view.getState(c.getCellAt(d.x,d.y));return b};mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&c.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d,a))}),mxUtils.bind(this,
|
||||
function(d){this.isShapeEvent(a,d)&&c.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d,f(d)))}),mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&c.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d,f(d)))}));c.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&(c.dblClick(d,a.cell),mxEvent.consume(d))}))};
|
||||
mxCellRenderer.prototype.redrawLabel=function(a,c){var f=this.getLabelValue(a);if(null==a.text&&null!=f&&(mxUtils.isNode(f)||0<f.length))this.createLabel(a,f);else if(null!=a.text&&(null==f||0==f.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph;c&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),a.text.opacity=mxUtils.getValue(a.style,mxConstants.STYLE_TEXT_OPACITY,100));var b=this.getLabelBounds(a),e=
|
||||
d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),g=a.view.graph.isHtmlLabel(a.cell)||null!=f&&mxUtils.isNode(f)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,k=a.style[mxConstants.STYLE_OVERFLOW]||"visible";if(c||a.text.value!=f||a.text.isWrapping!=e||a.text.overflow!=k||a.text.isClipping!=d||a.text.scale!=this.getTextScale(a)||a.text.dialect!=g||!a.text.bounds.equals(b))a.text.dialect=g,a.text.value=f,a.text.bounds=b,a.text.scale=this.getTextScale(a),a.text.wrap=e,a.text.clipped=d,a.text.overflow=
|
||||
k,f=a.text.node.style.visibility,this.redrawLabelShape(a.text),a.text.node.style.visibility=f}};
|
||||
mxCellRenderer.prototype.redrawLabel=function(a,c){var f=this.getLabelValue(a);if(null==a.text&&null!=f&&(mxUtils.isNode(f)||0<f.length))this.createLabel(a,f);else if(null!=a.text&&(null==f||0==f.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph;c&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),a.text.valign=d.getVerticalAlign(a));var b=this.getLabelBounds(a),e=d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),
|
||||
g=a.view.graph.isHtmlLabel(a.cell)||null!=f&&mxUtils.isNode(f)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,k=a.style[mxConstants.STYLE_OVERFLOW]||"visible";if(c||a.text.value!=f||a.text.isWrapping!=e||a.text.overflow!=k||a.text.isClipping!=d||a.text.scale!=this.getTextScale(a)||a.text.dialect!=g||!a.text.bounds.equals(b))a.text.dialect=g,a.text.value=f,a.text.bounds=b,a.text.scale=this.getTextScale(a),a.text.wrap=e,a.text.clipped=d,a.text.overflow=k,f=a.text.node.style.visibility,this.redrawLabelShape(a.text),
|
||||
a.text.node.style.visibility=f}};
|
||||
mxCellRenderer.prototype.isTextShapeInvalid=function(a,c){function f(d,b,e){return c[d]!=(a.style[b]||e)}return f("fontStyle",mxConstants.STYLE_FONTSTYLE,mxConstants.DEFAULT_FONTSTYLE)||f("family",mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY)||f("size",mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)||f("color",mxConstants.STYLE_FONTCOLOR,"black")||f("align",mxConstants.STYLE_ALIGN,"")||f("valign",mxConstants.STYLE_VERTICAL_ALIGN,"")||f("spacing",mxConstants.STYLE_SPACING,2)||
|
||||
f("spacingTop",mxConstants.STYLE_SPACING_TOP,2)||f("spacingRight",mxConstants.STYLE_SPACING_RIGHT,2)||f("spacingBottom",mxConstants.STYLE_SPACING_BOTTOM,2)||f("spacingLeft",mxConstants.STYLE_SPACING_LEFT,2)||f("horizontal",mxConstants.STYLE_HORIZONTAL,!0)||f("background",mxConstants.STYLE_LABEL_BACKGROUNDCOLOR)||f("border",mxConstants.STYLE_LABEL_BORDERCOLOR)||f("opacity",mxConstants.STYLE_TEXT_OPACITY,100)||f("textDirection",mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION)};
|
||||
mxCellRenderer.prototype.redrawLabelShape=function(a){a.redraw()};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};
|
||||
|
@ -1258,7 +1259,7 @@ mxGraph.prototype.resetEdgesOnResize=!1;mxGraph.prototype.resetEdgesOnMove=!1;mx
|
|||
mxGraph.prototype.swimlaneNesting=!0;mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=0.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
|
||||
mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
|
||||
mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(a){return this.isEditing()||!this.isMouseDown&&!mxEvent.isShiftDown(a)})));8==document.documentMode&&
|
||||
a.insertAdjacentHTML("beforeend",'\x3cv:group style\x3d"DISPLAY: none;"\x3e\x3c/v:group\x3e')};
|
||||
a.insertAdjacentHTML("beforeend","\x3c"+mxClient.VML_PREFIX+':group style\x3d"DISPLAY: none;"\x3e\x3c/'+mxClient.VML_PREFIX+":group\x3e")};
|
||||
mxGraph.prototype.createHandlers=function(){this.tooltipHandler=this.createTooltipHandler();this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=this.createSelectionCellsHandler();this.connectionHandler=this.createConnectionHandler();this.connectionHandler.setEnabled(!1);this.graphHandler=this.createGraphHandler();this.panningHandler=this.createPanningHandler();this.panningHandler.panningEnabled=!1;this.popupMenuHandler=this.createPopupMenuHandler()};
|
||||
mxGraph.prototype.createTooltipHandler=function(){return new mxTooltipHandler(this)};mxGraph.prototype.createSelectionCellsHandler=function(){return new mxSelectionCellsHandler(this)};mxGraph.prototype.createConnectionHandler=function(){return new mxConnectionHandler(this)};mxGraph.prototype.createGraphHandler=function(){return new mxGraphHandler(this)};mxGraph.prototype.createPanningHandler=function(){return new mxPanningHandler(this)};mxGraph.prototype.createPopupMenuHandler=function(){return new mxPopupMenuHandler(this)};
|
||||
mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
|
||||
|
@ -1552,7 +1553,7 @@ mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=c.sourc
|
|||
mxGraphHandler.prototype.mouseUp=function(a,c){if(!c.isConsumed()){var f=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var d=c.getCell();if(this.connectOnDrop&&null==this.target&&null!=d&&f.getModel().isVertex(d)&&f.isCellConnectable(d)&&f.isEdgeValid(null,this.cell,d))f.connectionHandler.connect(this.cell,d,c.getEvent());else{var d=f.isCloneEvent(c.getEvent())&&f.isCellsCloneable()&&this.isCloneEnabled(),b=f.getView().scale,e=this.roundLength(this.currentDx/
|
||||
b),b=this.roundLength(this.currentDy/b),g=this.target;f.isSplitEnabled()&&f.isSplitTarget(g,this.cells,c.getEvent())?f.splitEdge(g,this.cells,null,e,b):this.moveCells(this.cells,e,b,d,this.target,c.getEvent())}}else this.isSelectEnabled()&&this.delayedSelection&&null!=this.cell&&this.selectDelayed(c)}this.cellWasClicked&&c.consume();this.reset()};
|
||||
mxGraphHandler.prototype.selectDelayed=function(a){(!this.graph.isCellSelected(this.cell)||!this.graph.popupMenuHandler.isPopupTrigger(a))&&this.graph.selectCellForEvent(this.cell,a.getEvent())};mxGraphHandler.prototype.reset=function(){this.destroyShapes();this.removeHint();this.delayedSelection=this.cellWasClicked=!1;this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null};
|
||||
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,f){if(this.graph.getModel().isVertex(a)){a=this.graph.getView().getState(a);f=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){c=Math.cos(-d);var d=Math.sin(-d),b=new mxPoint(a.getCenterX(),a.getCenterY());f=mxUtils.getRotatedPoint(f,c,d,b)}return null!=a&&!mxUtils.contains(a,f.x,f.y)}return!1};
|
||||
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,f){if(this.graph.getModel().isVertex(a)&&(a=this.graph.getView().getState(a),null!=a)){f=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){c=Math.cos(-d);var d=Math.sin(-d),b=new mxPoint(a.getCenterX(),a.getCenterY());f=mxUtils.getRotatedPoint(f,c,d,b)}return!mxUtils.contains(a,f.x,f.y)}return!1};
|
||||
mxGraphHandler.prototype.moveCells=function(a,c,f,d,b,e){d&&(a=this.graph.getCloneableCells(a));null==b&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),a,e)&&(b=this.graph.getDefaultParent());a=this.graph.moveCells(a,c-this.graph.panDx/this.graph.view.scale,f-this.graph.panDy/this.graph.view.scale,d,b,e);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0]);d&&this.graph.setSelectionCells(a)};
|
||||
mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null);this.destroyShapes();this.removeHint()};
|
||||
function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,f){var d=f.getProperty("eventName"),b=f.getProperty("event");d==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(b)&&(this.start(b),this.active=!0,this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",b)),b.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler),this.gestureHandler=mxUtils.bind(this,function(a,f){if(this.isPinchEnabled()){var d=
|
||||
|
@ -1933,7 +1934,7 @@ a),null!=c&&(this.graph.constrainChild(c),this.fireEvent(new mxEventObject(mxEve
|
|||
mxEditor.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tasks&&this.tasks.destroy(),null!=this.outline&&this.outline.destroy(),null!=this.properties&&this.properties.destroy(),null!=this.keyHandler&&this.keyHandler.destroy(),null!=this.rubberband&&this.rubberband.destroy(),null!=this.toolbar&&this.toolbar.destroy(),null!=this.graph&&this.graph.destroy(),this.templates=this.status=null)};
|
||||
var mxCodecRegistry={codecs:[],aliases:[],register:function(a){if(null!=a){var c=a.getName();mxCodecRegistry.codecs[c]=a;var f=mxUtils.getFunctionName(a.template.constructor);f!=c&&mxCodecRegistry.addAlias(f,c)}return a},addAlias:function(a,c){mxCodecRegistry.aliases[a]=c},getCodec:function(a){var c=null;if(null!=a){var c=mxUtils.getFunctionName(a),f=mxCodecRegistry.aliases[c];null!=f&&(c=f);c=mxCodecRegistry.codecs[c];if(null==c)try{c=new mxObjectCodec(new a),mxCodecRegistry.register(c)}catch(d){}}return c}};
|
||||
function mxCodec(a){this.document=a||mxUtils.createXmlDocument();this.objects=[]}mxCodec.prototype.document=null;mxCodec.prototype.objects=null;mxCodec.prototype.elements=null;mxCodec.prototype.encodeDefaults=!1;mxCodec.prototype.putObject=function(a,c){return this.objects[a]=c};mxCodec.prototype.getObject=function(a){var c=null;null!=a&&(c=this.objects[a],null==c&&(c=this.lookup(a),null==c&&(a=this.getElementById(a),null!=a&&(c=this.decode(a)))));return c};mxCodec.prototype.lookup=function(a){return null};
|
||||
mxCodec.prototype.getElementById=function(a){null==this.elements&&(this.elements={},this.addElement(this.document.documentElement));return this.elements[a]};mxCodec.prototype.addElement=function(a){if(a.nodeType==mxConstants.NODETYPE_ELEMENT){var c=a.getAttribute("id");null!=c&&null==this.elements[c]&&(this.elements[c]=a)}for(a=a.firstChild;null!=a;)this.addElement(a),a=a.nextSibling};
|
||||
mxCodec.prototype.getElementById=function(a){if(null==this.elements){if(null==this.document.documentElement)throw Error("mxCodec constructor needs document parameter");this.elements={};this.addElement(this.document.documentElement)}return this.elements[a]};mxCodec.prototype.addElement=function(a){if(a.nodeType==mxConstants.NODETYPE_ELEMENT){var c=a.getAttribute("id");null!=c&&null==this.elements[c]&&(this.elements[c]=a)}for(a=a.firstChild;null!=a;)this.addElement(a),a=a.nextSibling};
|
||||
mxCodec.prototype.getId=function(a){var c=null;null!=a&&(c=this.reference(a),null==c&&a instanceof mxCell&&(c=a.getId(),null==c&&(c=mxCellPath.create(a),0==c.length&&(c="root"))));return c};mxCodec.prototype.reference=function(a){return null};mxCodec.prototype.encode=function(a){var c=null;if(null!=a&&null!=a.constructor){var f=mxCodecRegistry.getCodec(a.constructor);null!=f?c=f.encode(this,a):mxUtils.isNode(a)?c=mxUtils.importNode(this.document,a,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(a.constructor))}return c};
|
||||
mxCodec.prototype.decode=function(a,c){var f=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){f=null;try{f=window[a.nodeName]}catch(d){}f=mxCodecRegistry.getCodec(f);null!=f?f=f.decode(this,a,c):(f=a.cloneNode(!0),f.removeAttribute("as"))}return f};mxCodec.prototype.encodeCell=function(a,c,f){c.appendChild(this.encode(a));if(null==f||f){f=a.getChildCount();for(var d=0;d<f;d++)this.encodeCell(a.getChildAt(d),c)}};
|
||||
mxCodec.prototype.isCellCodec=function(a){return null!=a&&"function"==typeof a.isCellCodec?a.isCellCodec():!1};mxCodec.prototype.decodeCell=function(a,c){c=null!=c?c:!0;var f=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){f=mxCodecRegistry.getCodec(a.nodeName);if(!this.isCellCodec(f))for(var d=a.firstChild;null!=d&&!this.isCellCodec(f);)f=mxCodecRegistry.getCodec(d.nodeName),d=d.nextSibling;this.isCellCodec(f)||(f=mxCodecRegistry.getCodec(mxCell));f=f.decode(this,a);c&&this.insertIntoGraph(f)}return f};
|
||||
|
@ -2864,9 +2865,9 @@ TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="non
|
|||
TextFormatPanel.prototype.addFont=function(a){function c(b,a){mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter=a?"progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'#c5ecff', EndColorStr\x3d'#87d4fb', GradientType\x3d0)":"":b.style.backgroundImage=a?"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,d=f.editor.graph,b=this.format.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="18px";e.style.paddingTop="10px";
|
||||
e.style.paddingBottom="6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position="relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";mxClient.IS_QUIRKS&&(e.style.display="block");if(d.cellEditor.isContentEditing()){var g=e.cloneNode(),k=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",g);k.style.color="rgb(112, 112, 112)";k.style.whiteSpace="nowrap";k.style.overflow=
|
||||
"hidden";k.style.margin="0px";this.addArrow(k);k.style.width="192px";k.style.height="15px";k=k.getElementsByTagName("div")[0];k.style.cssFloat="right";a.appendChild(g)}a.appendChild(e);g=this.createPanel();g.style.marginTop="8px";g.style.borderTop="1px solid #c0c0c0";g.style.paddingTop="6px";g.style.paddingBottom="6px";var l=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e);l.style.color="rgb(112, 112, 112)";l.style.whiteSpace="nowrap";l.style.overflow="hidden";
|
||||
l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px";k=e.cloneNode(!1);k.style.marginLeft="-3px";var n=this.editorUi.toolbar.addItems(["bold","italic","underline"],k,!0);n[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");n[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");n[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+
|
||||
")");var m=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(n);this.styleButtons([m]);var p=e.cloneNode(!1);p.style.marginLeft="-3px";p.style.paddingBottom="0px";var r=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT]),p),
|
||||
s=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER]),p),q=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
|
||||
l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px";mxClient.IS_FF&&(l.getElementsByTagName("div")[0].style.marginTop="-18px");k=e.cloneNode(!1);k.style.marginLeft="-3px";var n=this.editorUi.toolbar.addItems(["bold","italic","underline"],k,!0);n[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");n[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");n[2].setAttribute("title",
|
||||
mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var m=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(n);this.styleButtons([m]);var p=e.cloneNode(!1);p.style.marginLeft="-3px";p.style.paddingBottom="0px";var r=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
|
||||
[mxConstants.ALIGN_LEFT]),p),s=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER]),p),q=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
|
||||
[mxConstants.ALIGN_RIGHT]),p);this.styleButtons([r,s,q]);if(d.cellEditor.isContentEditing()){var u=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([u])}var t=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),v=this.editorUi.toolbar.addButton("geSprite-middle",
|
||||
mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),z=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([t,v,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var x,y,C,A,B,E,G;d.cellEditor.isContentEditing()?(t.style.display="none",v.style.display="none",
|
||||
z.style.display="none",m.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([C,x=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),y=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]),
|
||||
|
@ -5912,15 +5913,15 @@ null,this.getTagsForStencil("mxgraph.mockup.misc","ruler","mockup horizontal").j
|
|||
"misc.ruler2;dx\x3d100;rulerOrient\x3ddown;unitSize\x3d10;fillColor\x3d#ffffff;fontColor\x3d#999999;spacingLeft\x3d96;align\x3dleft;verticalAlign\x3dmiddle;spacingBottom\x3d10;spacingTop\x3d0;spacingRight\x3d0;rotation\x3d-90;spacing\x3d0;"+d,350,30,"1","Vertical Ruler",null,null,this.getTagsForStencil("mxgraph.mockup.misc","ruler","mockup horizontal").join(" ")),this.createVertexTemplateEntry(c+"misc.ruler2;dx\x3d100;rulerOrient\x3dup;unitSize\x3d10;fillColor\x3d#ffffff;fontColor\x3d#999999;spacingLeft\x3d96;align\x3dleft;verticalAlign\x3dmiddle;spacingBottom\x3d0;spacingTop\x3d10;spacingRight\x3d0;rotation\x3d-90;spacing\x3d0;"+
|
||||
d,350,30,"1","Vertical Ruler",null,null,this.getTagsForStencil("mxgraph.mockup.misc","ruler","mockup horizontal").join(" ")),this.addEntry("mockup revision table",function(){var b=new mxCell("",new mxGeometry(0,0,400,75),c+"misc.rrect;rSize\x3d0;strokeColor\x3d#666666;");b.vertex=!0;var a=new mxCell("REVISION HISTORY",new mxGeometry(0,0,400,25),c+"misc.rrect;rSize\x3d0;strokeColor\x3d#666666;fontSize\x3d17;fontColor\x3d#999999;");a.vertex=!0;b.insert(a);a=new mxCell("REV",new mxGeometry(0,25,50,25),
|
||||
c+"misc.rrect;rSize\x3d0;strokeColor\x3d#666666;fontSize\x3d17;fontColor\x3d#999999;");a.vertex=!0;b.insert(a);a=new mxCell("DATE",new mxGeometry(50,25,150,25),c+"misc.rrect;rSize\x3d0;strokeColor\x3d#666666;fontSize\x3d17;fontColor\x3d#999999;");a.vertex=!0;b.insert(a);a=new mxCell("DESCRIPTION",new mxGeometry(200,25,200,25),c+"misc.rrect;rSize\x3d0;strokeColor\x3d#666666;fontSize\x3d17;fontColor\x3d#999999;");a.vertex=!0;b.insert(a);a=new mxCell("A",new mxGeometry(0,50,50,25),c+"misc.rrect;rSize\x3d0;strokeColor\x3d#666666;fontSize\x3d17;fontColor\x3d#999999;");
|
||||
a.vertex=!0;b.insert(a);a=new mxCell("10/23/2014",new mxGeometry(50,50,150,25),c+"misc.rrect;rSize\x3d0;strokeColor\x3d#666666;fontSize\x3d17;fontColor\x3d#999999;");a.vertex=!0;b.insert(a);a=new mxCell("Design modified",new mxGeometry(200,50,200,25),c+"misc.rrect;rSize\x3d0;strokeColor\x3d#666666;fontSize\x3d17;fontColor\x3d#999999;");a.vertex=!0;b.insert(a);return e.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,"Revision Table")}),this.addEntry("mockup status bar",function(){var b=
|
||||
new mxCell("",new mxGeometry(0,0,500,30),c+"misc.rrect;rSize\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;");b.vertex=!0;var a=new mxCell("Status text",new mxGeometry(5,5,195,20),c+"misc.rrect;rSize\x3d5;strokeColor\x3dnone;fontSize\x3d15;fontColor\x3d#999999;fillColor\x3d#ddeeff;align\x3dleft;spacingLeft\x3d5;");a.vertex=!0;b.insert(a);a=new mxCell("Text 2",new mxGeometry(205,5,100,20),c+"misc.rrect;rSize\x3d5;strokeColor\x3dnone;fontSize\x3d15;fontColor\x3d#999999;fillColor\x3d#ddeeff;align\x3dleft;spacingLeft\x3d5;");
|
||||
a.vertex=!0;b.insert(a);a=new mxCell("Text 3",new mxGeometry(310,5,115,20),c+"misc.rrect;rSize\x3d5;strokeColor\x3dnone;fontSize\x3d15;fontColor\x3d#999999;fillColor\x3d#ddeeff;align\x3dleft;spacingLeft\x3d5;");a.vertex=!0;b.insert(a);a=new mxCell("",new mxGeometry(495,15,0,0),c+"misc.anchor;");a.vertex=!0;b.insert(a);var d=new mxCell("",new mxGeometry(-20,-10,20,20),"shape\x3dellipse;fillColor\x3dnone;strokeColor\x3d#008cff;resizable\x3d0;html\x3d1;");d.vertex=!0;a.insert(d);a=new mxCell("",new mxGeometry(465,
|
||||
15,0,0),c+"misc.anchor;");a.vertex=!0;b.insert(a);d=new mxCell("",new mxGeometry(-20,5,20,10),"shape\x3dline;strokeColor\x3d#008cff;resizable\x3d0;");d.vertex=!0;a.insert(d);return e.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,"Status Bar")}),this.createVertexTemplateEntry(f+"misc.pin;fillColor2\x3d#00dd00;fillColor3\x3d#004400;strokeColor\x3d#006600;",10,25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" ")),this.createVertexTemplateEntry(f+
|
||||
a.vertex=!0;b.insert(a);a=new mxCell("10/23/2014",new mxGeometry(50,50,150,25),c+"misc.rrect;rSize\x3d0;strokeColor\x3d#666666;fontSize\x3d17;fontColor\x3d#999999;");a.vertex=!0;b.insert(a);a=new mxCell("Design modified",new mxGeometry(200,50,200,25),c+"misc.rrect;rSize\x3d0;strokeColor\x3d#666666;fontSize\x3d17;fontColor\x3d#999999;");a.vertex=!0;b.insert(a);return e.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,"Revision Table")}),this.addEntry("mockup status bar",function(){var a=
|
||||
new mxCell("",new mxGeometry(0,0,500,30),c+"misc.rrect;rSize\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;");a.vertex=!0;var b=new mxCell("Status text",new mxGeometry(5,5,195,20),c+"misc.rrect;rSize\x3d5;strokeColor\x3dnone;fontSize\x3d15;fontColor\x3d#999999;fillColor\x3d#ddeeff;align\x3dleft;spacingLeft\x3d5;");b.vertex=!0;a.insert(b);b=new mxCell("Text 2",new mxGeometry(205,5,100,20),c+"misc.rrect;rSize\x3d5;strokeColor\x3dnone;fontSize\x3d15;fontColor\x3d#999999;fillColor\x3d#ddeeff;align\x3dleft;spacingLeft\x3d5;");
|
||||
b.vertex=!0;a.insert(b);b=new mxCell("Text 3",new mxGeometry(310,5,115,20),c+"misc.rrect;rSize\x3d5;strokeColor\x3dnone;fontSize\x3d15;fontColor\x3d#999999;fillColor\x3d#ddeeff;align\x3dleft;spacingLeft\x3d5;");b.vertex=!0;a.insert(b);b=new mxCell("",new mxGeometry(495,15,0,0),c+"misc.anchor;");b.vertex=!0;a.insert(b);var d=new mxCell("",new mxGeometry(-20,-10,20,20),"shape\x3dellipse;fillColor\x3dnone;strokeColor\x3d#008cff;resizable\x3d0;html\x3d1;");d.vertex=!0;b.insert(d);b=new mxCell("",new mxGeometry(465,
|
||||
15,0,0),c+"misc.anchor;");b.vertex=!0;a.insert(b);d=new mxCell("",new mxGeometry(-20,5,20,10),"shape\x3dline;strokeColor\x3d#008cff;resizable\x3d0;");d.vertex=!0;b.insert(d);return e.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Status Bar")}),this.createVertexTemplateEntry(f+"misc.pin;fillColor2\x3d#00dd00;fillColor3\x3d#004400;strokeColor\x3d#006600;",10,25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" ")),this.createVertexTemplateEntry(f+
|
||||
"misc.pin;fillColor2\x3d#dd0000;fillColor3\x3d#440000;strokeColor\x3d#660000;",10,25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" ")),this.createVertexTemplateEntry(f+"misc.pin;fillColor2\x3d#ccccff;fillColor3\x3d#0000ff;strokeColor\x3d#000066;",10,25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" ")),this.createVertexTemplateEntry(f+"misc.pin;fillColor2\x3d#ffff00;fillColor3\x3d#888800;strokeColor\x3d#999900;",10,
|
||||
25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" ")),this.createVertexTemplateEntry(f+"misc.pin;fillColor2\x3d#ffa500;fillColor3\x3d#885000;strokeColor\x3d#997000;",10,25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" "))];this.addPalette("mockupMisc","Mockup Misc",!1,mxUtils.bind(this,function(a){for(var b=0;b<k.length;b++)a.appendChild(k[b](a))}))};Sidebar.prototype.addMockupNavigationPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+
|
||||
"\x3dbottom;shadow\x3d0;dashed\x3d0;align\x3dcenter;html\x3d1;"+mxConstants.STYLE_VERTICAL_ALIGN+"\x3dtop;strokeWidth\x3d1;"+mxConstants.STYLE_SHAPE+"\x3dmxgraph.mockup.",c=mxConstants.STYLE_STROKEWIDTH+"\x3d1;shadow\x3d0;dashed\x3d0;align\x3dcenter;html\x3d1;"+mxConstants.STYLE_SHAPE+"\x3dmxgraph.mockup.",f=mxConstants.STYLE_STROKECOLOR+"\x3d#999999;",d=this,b=[this.addEntry("mockup navigation status bar",function(){var a=new mxCell("Layer 1",new mxGeometry(0,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#666666;fontStyle\x3d1;");
|
||||
a.vertex=!0;var b=new mxCell("\x3e",new mxGeometry(60,0,20,30),c+"navigation.anchor;fontSize\x3d24;fontColor\x3d#aaaaaa;fontStyle\x3d1;");b.vertex=!0;var f=new mxCell("Layer 2",new mxGeometry(80,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#666666;fontStyle\x3d1;");f.vertex=!0;var l=new mxCell("\x3e",new mxGeometry(140,0,20,30),c+"navigation.anchor;fontSize\x3d24;fontColor\x3d#aaaaaa;fontStyle\x3d1;");l.vertex=!0;var n=new mxCell("Layer 3",new mxGeometry(160,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#666666;fontStyle\x3d1;");
|
||||
n.vertex=!0;var m=new mxCell("\x3e",new mxGeometry(220,0,20,30),c+"navigation.anchor;fontSize\x3d24;fontColor\x3d#aaaaaa;fontStyle\x3d1;");m.vertex=!0;var p=new mxCell("Layer 4",new mxGeometry(240,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#008cff;fontStyle\x3d1;");p.vertex=!0;return d.createVertexTemplateFromCells([a,b,f,l,n,m,p],300,30,"Status Bar")}),this.createVertexTemplateEntry(c+"navigation.stepBar;strokeColor\x3d#c4c4c4;textColor\x3d#666666;textColor2\x3d#008cff;mainText\x3d,,+,;textSize\x3d17;fillColor\x3d#666666;overflow\x3dfill;fontSize\x3d17;fontColor\x3d#666666;",
|
||||
25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" ")),this.createVertexTemplateEntry(f+"misc.pin;fillColor2\x3d#ffa500;fillColor3\x3d#885000;strokeColor\x3d#997000;",10,25,"","Pin",null,null,this.getTagsForStencil("mxgraph.mockup.misc","pin","mockup ").join(" "))];this.addPalette("mockupMisc","Mockup Misc",!1,mxUtils.bind(this,function(b){for(var a=0;a<k.length;a++)b.appendChild(k[a](b))}))};Sidebar.prototype.addMockupNavigationPalette=function(){var a=mxConstants.STYLE_VERTICAL_LABEL_POSITION+
|
||||
"\x3dbottom;shadow\x3d0;dashed\x3d0;align\x3dcenter;html\x3d1;"+mxConstants.STYLE_VERTICAL_ALIGN+"\x3dtop;strokeWidth\x3d1;"+mxConstants.STYLE_SHAPE+"\x3dmxgraph.mockup.",c=mxConstants.STYLE_STROKEWIDTH+"\x3d1;shadow\x3d0;dashed\x3d0;align\x3dcenter;html\x3d1;"+mxConstants.STYLE_SHAPE+"\x3dmxgraph.mockup.",f=mxConstants.STYLE_STROKECOLOR+"\x3d#999999;",d=this,b=[this.addEntry("mockup navigation status bar",function(){var b=new mxCell("Layer 1",new mxGeometry(0,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#666666;fontStyle\x3d1;");
|
||||
b.vertex=!0;var a=new mxCell("\x3e",new mxGeometry(60,0,20,30),c+"navigation.anchor;fontSize\x3d24;fontColor\x3d#aaaaaa;fontStyle\x3d1;");a.vertex=!0;var f=new mxCell("Layer 2",new mxGeometry(80,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#666666;fontStyle\x3d1;");f.vertex=!0;var l=new mxCell("\x3e",new mxGeometry(140,0,20,30),c+"navigation.anchor;fontSize\x3d24;fontColor\x3d#aaaaaa;fontStyle\x3d1;");l.vertex=!0;var n=new mxCell("Layer 3",new mxGeometry(160,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#666666;fontStyle\x3d1;");
|
||||
n.vertex=!0;var m=new mxCell("\x3e",new mxGeometry(220,0,20,30),c+"navigation.anchor;fontSize\x3d24;fontColor\x3d#aaaaaa;fontStyle\x3d1;");m.vertex=!0;var p=new mxCell("Layer 4",new mxGeometry(240,0,60,30),c+"navigation.anchor;fontSize\x3d17;fontColor\x3d#008cff;fontStyle\x3d1;");p.vertex=!0;return d.createVertexTemplateFromCells([b,a,f,l,n,m,p],300,30,"Status Bar")}),this.createVertexTemplateEntry(c+"navigation.stepBar;strokeColor\x3d#c4c4c4;textColor\x3d#666666;textColor2\x3d#008cff;mainText\x3d,,+,;textSize\x3d17;fillColor\x3d#666666;overflow\x3dfill;fontSize\x3d17;fontColor\x3d#666666;",
|
||||
300,50,'\x3ctable border\x3d"0" cellpadding\x3d"0" cellspacing\x3d"0" width\x3d"100%" height\x3d"100%" style\x3d"font-size:1em;"\x3e\x3ctr height\x3d"0%"\x3e\x3ctd width\x3d"25%"\x3eLayer 1\x3c/td\x3e\x3ctd width\x3d"25%"\x3eLayer 2\x3c/td\x3e\x3ctd width\x3d"25%" style\x3d"color:#008cff;"\x3eLayer 3\x3c/td\x3e\x3ctd width\x3d"25%"\x3eLayer 4\x3c/td\x3e\x3c/tr\x3e\x3ctr height\x3d"100%"\x3e\x3ctd/\x3e\x3c/tr\x3e\x3c/table\x3e',"Step Bar",null,null,this.getTagsForStencil("mxgraph.mockup.navigation",
|
||||
"stepBar","mockup navigation ").join(" ")),this.createVertexTemplateEntry(a+"navigation.coverFlow;strokeColor\x3d#999999;fillColor\x3d#ffffff;",400,200,"","Cover Flow",null,null,this.getTagsForStencil("mxgraph.mockup.navigation","coverFlow","mockup navigation ").join(" ")),this.createVertexTemplateEntry(a+"navigation.scrollBar;fillColor\x3d#ffffff;"+f+"barPos\x3d20;fillColor2\x3d#99ddff;strokeColor2\x3dnone;",200,20,"","Horizontal Scroll Bar",null,null,this.getTagsForStencil("mxgraph.mockup.navigation",
|
||||
"scrollBar","mockup navigation ").join(" ")),this.createVertexTemplateEntry(a+"navigation.scrollBar;fillColor\x3d#ffffff;"+f+"barPos\x3d20;fillColor2\x3d#99ddff;strokeColor2\x3dnone;direction\x3dnorth;",20,200,"","Vertical Scroll Bar",null,null,this.getTagsForStencil("mxgraph.mockup.navigation","scrollBar","mockup navigation ").join(" ")),this.createVertexTemplateEntry(c+"navigation.pagination;linkText\x3d;fontSize\x3d17;fontColor\x3d#0000ff;fontStyle\x3d4;",350,30,"\x3c\x3c Prev 1 2 3 4 5 6 7 8 9 10 Next \x3e\x3e",
|
||||
|
@ -6378,7 +6379,7 @@ this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3
|
|||
this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.database_server_green;",43,56,"","Database Server (green)",null,null,this.getTagsForStencil("mxgraph.office.servers","database_server","office server ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.database_server_ghosted;",
|
||||
43,56,"","Database Server (ghosted)",null,null,this.getTagsForStencil("mxgraph.office.servers","database_server","office server ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.datacenter;",53,53,"","Datacenter",null,null,this.getTagsForStencil("mxgraph.office.servers","datacenter","office server ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.dirsync_server;",
|
||||
47,56,"","DirSync Server",null,null,this.getTagsForStencil("mxgraph.office.servers","dirsync server","office server ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.domain_controller;",45,55,"","Domain Controller",null,null,this.getTagsForStencil("mxgraph.office.servers","domain controller","office server ").join(" ")),
|
||||
this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.excahnge_client_access_server_role;",52,59,"","Excahnge Client Access Server Role",null,null,this.getTagsForStencil("mxgraph.office.servers","excahnge client access server role","office server ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.exchange_edge_transport_server_role;",
|
||||
this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.excahnge_client_access_server_role;",52,59,"","Exchange Client Access Server Role",null,null,this.getTagsForStencil("mxgraph.office.servers","excahnge client access server role","office server ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.exchange_edge_transport_server_role;",
|
||||
52,55,"","Exchange Edge Transport Server Role",null,null,this.getTagsForStencil("mxgraph.office.servers","exchange edge transport server role","office server ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.exchange_hub_transport_server_role;",52,59,"","Exchange Hub Transport Server Role",null,null,this.getTagsForStencil("mxgraph.office.servers",
|
||||
"exchange hub transport server role","office server ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.exchange_mailbox_server_role;",52,59,"","Exchange Mailbox Server Role",null,null,this.getTagsForStencil("mxgraph.office.servers","exchange mailbox server role","office server ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.exchange_um_server_role;",
|
||||
52,59,"","Exchange UM Server Role",null,null,this.getTagsForStencil("mxgraph.office.servers","exchange um server role","office server ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.servers.exchange_client_access_server;",57,59,"","Exchange Client Access Server",null,null,this.getTagsForStencil("mxgraph.office.servers","exchange client access server",
|
||||
|
@ -7135,57 +7136,58 @@ c+'"\x3e\x3c/script\x3e';b.focus();mxClient.IS_FF||5<=document.documentMode||mxC
|
|||
mxUtils.write(f,mxResources.get("embedNotice")+": ");mxUtils.br(f);var e=document.createElement("textarea");e.style.marginTop="6px";e.style.width="550px";e.style.height="20px";e.style.resize="none";e.style.marginBottom="10px";f.appendChild(e);mxUtils.br(f);mxUtils.write(f,mxResources.get("publicDiagramUrl")+": ");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","28");g.style.width="340px";g.style.marginBottom="8px";f.appendChild(g);mxUtils.br(f);var k=document.createElement("div");
|
||||
k.style.paddingTop="10px";k.style.textAlign="center";var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;k.appendChild(l);mxUtils.write(k,mxResources.get("fit"));var n=document.createElement("span");n.style.marginLeft="10px";mxUtils.write(n,mxResources.get("zoom")+": ");k.appendChild(n);var m=document.createElement("input");m.setAttribute("type","text");m.setAttribute("size","4");m.style.width="40px";m.value="100%";k.appendChild(m);
|
||||
n=document.createElement("span");n.style.marginLeft="10px";mxUtils.write(n,mxResources.get("link")+": ");k.appendChild(n);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","8");p.style.width="50px";p.value="#0000ff";k.appendChild(p);mxUtils.br(k);var r=document.createElement("input");r.setAttribute("type","checkbox");r.setAttribute("checked","checked");r.defaultChecked=!0;r.style.marginTop="14px";k.appendChild(r);mxUtils.write(k,mxResources.get("lightbox"));
|
||||
var s=document.createElement("input");s.setAttribute("type","checkbox");s.setAttribute("checked","checked");s.defaultChecked=!0;s.style.marginLeft="10px";var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginLeft="10px";n=a.editor.graph.getModel();null==a.pages||0==a.pages.length&&1>=n.getChildCount(n.getRoot())?q.setAttribute("disabled","disabled"):(q.setAttribute("checked","checked"),q.defaultChecked=!0);k.appendChild(q);mxUtils.write(k,mxResources.get("layers"));
|
||||
var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="10px";k.appendChild(u);mxUtils.write(k,mxResources.get("zoom"));u.setAttribute("checked","checked");u.defaultChecked=!0;var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="10px";null!=a.pages&&1<a.pages.length&&(t.setAttribute("checked","checked"),t.defaultChecked=!0,k.appendChild(t));mxUtils.write(k,mxResources.get("allPages"));f.appendChild(k);this.init=function(){c()};
|
||||
mxEvent.addListener(g,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(q,"change",c);mxEvent.addListener(s,"change",c);mxEvent.addListener(l,"change",c);mxEvent.addListener(r,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(t,"change",c);k=document.createElement("div");k.style.paddingTop="20px";k.style.textAlign="right";a.isOffline()||(n=mxUtils.button(mxResources.get("help"),function(){window.open("https://support.draw.io/pages/viewpage.action?pageId\x3d12878123")}),
|
||||
var s=document.createElement("input");s.setAttribute("type","checkbox");s.setAttribute("checked","checked");s.defaultChecked=!0;s.style.marginLeft="10px";k.appendChild(s);mxUtils.write(k,mxResources.get("edit"));var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginLeft="10px";n=a.editor.graph.getModel();null==a.pages||0==a.pages.length&&1>=n.getChildCount(n.getRoot())?q.setAttribute("disabled","disabled"):(q.setAttribute("checked","checked"),q.defaultChecked=!0);k.appendChild(q);
|
||||
mxUtils.write(k,mxResources.get("layers"));var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="10px";k.appendChild(u);mxUtils.write(k,mxResources.get("zoom"));u.setAttribute("checked","checked");u.defaultChecked=!0;var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="10px";null!=a.pages&&1<a.pages.length&&(t.setAttribute("checked","checked"),t.defaultChecked=!0,k.appendChild(t));mxUtils.write(k,mxResources.get("allPages"));
|
||||
f.appendChild(k);this.init=function(){c()};mxEvent.addListener(g,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(q,"change",c);mxEvent.addListener(s,"change",c);mxEvent.addListener(l,"change",c);mxEvent.addListener(r,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(t,"change",c);k=document.createElement("div");k.style.paddingTop="20px";k.style.textAlign="right";a.isOffline()||(n=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/solution/articles/16000042542-how-to-embed-html-")}),
|
||||
n.className="geBtn",k.appendChild(n));if(!mxClient.IS_CHROMEAPP&&!navigator.standalone&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))n=mxUtils.button(mxResources.get("preview"),function(){var a=window.open(),c=a.document;"CSS1Compat"===document.compatMode&&c.writeln("\x3c!DOCTYPE html\x3e");c.writeln("\x3chtml\x3e");c.writeln("\x3chead\x3e\x3ctitle\x3e"+encodeURIComponent(mxResources.get("preview"))+'\x3c/title\x3e\x3cmeta charset\x3d"utf-8"\x3e\x3c/head\x3e');c.writeln("\x3cbody\x3e");
|
||||
c.writeln(b.value);var d=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;d&&c.writeln(e.value);c.writeln("\x3c/body\x3e");c.writeln("\x3c/html\x3e");c.close();if(!d){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));d=a.document.createElement("img");d.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");d.style.marginLeft="6px";f.appendChild(d);a.document.body.insertBefore(f,
|
||||
a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(e.value)[1];c.body.appendChild(a);f.parentNode.removeChild(f)},20)}}),n.className="geBtn",k.appendChild(n);var n=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()}),v=mxUtils.button(mxResources.get("copy"),function(){b.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?b.select():document.execCommand("selectAll",
|
||||
!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});k.appendChild(n);!mxClient.IS_SF&&null==document.documentMode?(k.appendChild(v),v.className="geBtn gePrimaryBtn",n.className="geBtn"):n.className="geBtn gePrimaryBtn";f.appendChild(k);this.container=f},EmbedSvgDialog=function(a,c){function f(b){if(c){var f=a.editor.graph.getGraphBounds(),g=function(a){var b=" ",c="";p.checked&&(b=" onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0\x26edit\x3d_blank"+
|
||||
(r.checked?"\x26layers\x3d1":"")+"');}})(this);\"",c+="cursor:pointer;");k.checked&&(c+="max-width:100%;");var d="";m.checked&&(d=' width\x3d"'+Math.round(f.width)+'" height\x3d"'+Math.round(f.height)+'"');e.value='\x3cimg src\x3d"'+a+'"'+d+(""!=c?' style\x3d"'+c+'"':"")+b+"/\x3e";e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)};if(a.isExportToCanvas())e.value=mxResources.get("updatingDocument"),a.exportToCanvas(mxUtils.bind(this,
|
||||
function(b){var c=p.checked?a.getFileData(!0):null;b=a.createPngDataUri(b,c);g(b)}),null,null,null,mxUtils.bind(this,function(b){e.value="";a.handleError({message:mxResources.get("unknownError")})}),null,!0,m.checked?2:1,null,l.checked);else if(b=a.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){e.value=mxResources.get("updatingDocument");var v="";m.checked&&(v="\x26w\x3d"+Math.round(2*f.width)+"\x26h\x3d"+Math.round(2*f.height));var s=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+
|
||||
(p.checked?"1":"0")+v+"\x26xml\x3d"+encodeURIComponent(b));s.send(mxUtils.bind(this,function(){200==s.getStatus()?document.body.contains(d)&&g("data:image/png;base64,"+s.getText()):(e.value="",a.handleError({message:mxResources.get("unknownError")}))}))}else e.value="",a.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}else{b=a.editor.graph.getSvg();v=b.getElementsByTagName("a");if(null!=v)for(var x=0;x<v.length;x++){var y=v[x].getAttribute("href");null!=y&&("#"==
|
||||
y.charAt(0)&&"_blank"==v[x].getAttribute("target"))&&v[x].removeAttribute("target")}p.checked&&b.setAttribute("content",a.getFileData(!0));l.checked&&a.editor.addSvgShadow(b);if(n.checked){var C=" ",A="";p.checked&&(C="onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0\x26edit\x3d_blank"+
|
||||
(r.checked?"\x26layers\x3d1":"")+"');}})(this);\"",A+="cursor:pointer;");k.checked&&(A+="max-width:100%;");a.convertImages(b,function(b){e.value='\x3cimg src\x3d"'+a.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=A?' style\x3d"'+A+'"':"")+C+"/\x3e"})}else A="",p.checked&&(b.setAttribute("onclick","(function(svg){var src\x3dwindow.event.target||window.event.srcElement;while (src!\x3dnull\x26\x26src.nodeName.toLowerCase()!\x3d'a'){src\x3dsrc.parentNode;}if(src\x3d\x3dnull){if(svg.wnd!\x3dnull\x26\x26!svg.wnd.closed){svg.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dsvg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0\x26edit\x3d_blank"+
|
||||
(r.checked?"\x26layers\x3d1":"")+"');}}})(this);"),A+="cursor:pointer;"),k.checked&&(v=parseInt(b.getAttribute("width")),x=parseInt(b.getAttribute("height")),b.setAttribute("viewBox","0 0 "+v+" "+x),A+="max-width:100%;max-height:"+x+"px;",b.removeAttribute("height")),""!=A&&b.setAttribute("style",A),e.value=mxUtils.getXml(b);e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)}}a.getCurrentFile();var d=document.createElement("div"),
|
||||
b=a.editor.graph;b.getGraphBounds();mxUtils.write(d,mxResources.get("mainEmbedNotice")+": ");mxUtils.br(d);var e=document.createElement("textarea");e.style.marginTop="6px";e.style.width="550px";e.style.height="280px";e.style.resize="none";d.appendChild(e);mxUtils.br(d);var g=document.createElement("div");g.style.paddingTop="16px";g.style.textAlign="center";var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;g.appendChild(k);
|
||||
mxUtils.write(g,mxResources.get("fit"));var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.marginLeft="30px";b.shadowVisible&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);if(!c||a.isExportToCanvas())g.appendChild(l),mxUtils.write(g,mxResources.get("shadow"));var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginLeft="30px";c||(g.appendChild(n),mxUtils.write(g,mxResources.get("image")));var m=document.createElement("input");
|
||||
m.setAttribute("type","checkbox");m.style.marginLeft="30px";c&&(g.appendChild(m),mxUtils.write(g,mxResources.get("retina")));var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="30px";g.appendChild(p);mxUtils.write(g,mxResources.get("lightbox"));var r=document.createElement("input");r.setAttribute("type","checkbox");r.style.marginLeft="30px";b=a.editor.graph.getModel();1<b.getChildCount(b.getRoot())?(r.setAttribute("checked",
|
||||
"checked"),r.defaultChecked=!0):r.setAttribute("disabled","disabled");g.appendChild(r);mxUtils.write(g,mxResources.get("layers"));d.appendChild(g);this.init=function(){f()};mxEvent.addListener(n,"change",f);mxEvent.addListener(m,"change",f);mxEvent.addListener(l,"change",f);mxEvent.addListener(k,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(r,"change",f);g=document.createElement("div");g.style.paddingTop="18px";g.style.textAlign="right";!a.isOffline()&&!c&&(b=mxUtils.button(mxResources.get("help"),
|
||||
function(){window.open("https://support.draw.io/pages/viewpage.action?pageId\x3d12222606")}),b.className="geBtn",g.appendChild(b));if(!mxClient.IS_CHROMEAPP&&!navigator.standalone&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))b=mxUtils.button(mxResources.get("preview"),function(){var a=window.open().document;a.writeln("\x3chtml\x3e\x3chead\x3e\x3ctitle\x3e"+encodeURIComponent(mxResources.get("preview"))+'\x3c/title\x3e\x3cmeta charset\x3d"utf-8"\x3e\x3c/head\x3e\x3cbody\x3e'+
|
||||
e.value+"\x3c/body\x3e\x3c/html\x3e");a.close()}),b.className="geBtn",g.appendChild(b);var b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()}),s=mxUtils.button(mxResources.get("copy"),function(){e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});g.appendChild(b);!mxClient.IS_SF&&null==document.documentMode?(g.appendChild(s),s.className=
|
||||
"geBtn gePrimaryBtn",b.className="geBtn"):b.className="geBtn gePrimaryBtn";d.appendChild(g);this.container=d},GoogleSitesDialog=function(a){function c(){var a=null!=C.getTitle()?C.getTitle():this.defaultFilename;if(x.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type\x3d4\x26diagram\x3d"+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="\x26title\x3d"+encodeURIComponent(a));0<y.length&&(b+="\x26s\x3d"+y);""!=r.value&&"0"!=r.value&&(b+="\x26border\x3d"+r.value);""!=m.value&&
|
||||
(b+="\x26height\x3d"+m.value);b+="\x26pan\x3d"+(s.checked?"1":"0");b+="\x26zoom\x3d"+(q.checked?"1":"0");b+="\x26fit\x3d"+(z.checked?"1":"0");b+="\x26resize\x3d"+(v.checked?"1":"0");b+="\x26x0\x3d"+Number(n.value);b+="\x26y0\x3d"+k;d.mathEnabled&&(b+="\x26math\x3d1");t.checked?b+="\x26edit\x3d_blank":u.checked&&(b+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));l.value=b}else C.constructor==DriveFile||C.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed\x3d0\x26diagram\x3d",
|
||||
""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"\x26type\x3d3":(b+=C.getHash().substring(1),b=C.constructor==DropboxFile?b+"\x26type\x3d2":b+"\x26type\x3d1"),null!=a&&(b+="\x26title\x3d"+encodeURIComponent(a)),""!=m.value&&(a=parseInt(m.value)+parseInt(n.value),b+="\x26height\x3d"+a),l.value=b):l.value=""}var f=document.createElement("div"),d=a.editor.graph,b=d.getGraphBounds(),e=d.view.scale,g=Math.floor(b.x/e-d.view.translate.x),k=Math.floor(b.y/e-d.view.translate.y);mxUtils.write(f,
|
||||
mxResources.get("googleGadget")+":");mxUtils.br(f);var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.marginTop="2px";l.style.width="410px";f.appendChild(l);mxUtils.br(f);this.init=function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)};mxUtils.write(f,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size",
|
||||
"4");n.style.marginRight="16px";n.style.marginLeft="4px";n.value=g;f.appendChild(n);mxUtils.write(f,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(b.height/e);f.appendChild(m);mxUtils.br(f);b=document.createElement("hr");b.setAttribute("size","1");b.style.marginBottom="16px";b.style.marginTop="16px";f.appendChild(b);mxUtils.write(f,mxResources.get("publicDiagramUrl")+":");mxUtils.br(f);
|
||||
var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";f.appendChild(p);mxUtils.br(f);mxUtils.write(f,mxResources.get("borderWidth")+":");var r=document.createElement("input");r.setAttribute("type","text");r.setAttribute("size","3");r.style.marginBottom="8px";r.style.marginLeft="4px";r.value="0";f.appendChild(r);mxUtils.br(f);var s=document.createElement("input");s.setAttribute("type",
|
||||
"checkbox");s.setAttribute("checked","checked");s.defaultChecked=!0;s.style.marginLeft="16px";f.appendChild(s);mxUtils.write(f,mxResources.get("pan")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";f.appendChild(q);mxUtils.write(f,mxResources.get("zoom")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="8px";u.setAttribute("title",window.location.href);
|
||||
f.appendChild(u);mxUtils.write(f,mxResources.get("edit")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";f.appendChild(t);mxUtils.write(f,mxResources.get("asNew")+" ");mxUtils.br(f);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";f.appendChild(v);mxUtils.write(f,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type",
|
||||
"checkbox");z.style.marginLeft="8px";f.appendChild(z);mxUtils.write(f,mxResources.get("fit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";f.appendChild(x);mxUtils.write(f,mxResources.get("embed")+" ");var y=a.getBasenames().join(";"),C=a.getCurrentFile();c();p.setAttribute("placeholder",mxResources.get("loading")+"...");a.getPublicUrl(C,function(a){p.setAttribute("placeholder","");p.value=null!=a?a:"";c()});mxEvent.addListener(s,"change",c);
|
||||
mxEvent.addListener(q,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(n,"change",c);mxEvent.addListener(r,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(l,"click",function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)});
|
||||
b=document.createElement("div");b.style.paddingTop="12px";b.style.textAlign="right";e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);f.appendChild(b);this.container=f},IframeDialog=function(a,c,f){function d(){null!=v&&null!=v.getTitle()&&v.getTitle();if(f&&null!=v&&(""!=q.value||v.constructor==DriveFile||v.constructor==DropboxFile||v.constructor==OneDriveFile)){u.removeAttribute("disabled");t.removeAttribute("disabled");var a=
|
||||
"https://www.draw.io/?chrome\x3d0";p.checked&&(a+="\x26lightbox\x3d1");r.checked&&(a+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities("https://www.draw.io/#"+v.getHash())));e.foldingEnabled&&(a+="\x26nav\x3d1");s.checked&&(a+="\x26layers\x3d1");a=""!=q.value?a+("\x26url\x3d"+encodeURIComponent(mxUtils.htmlEntities(q.value))):a+("#"+v.getHash());l.value=a;l.removeAttribute("disabled")}else if(""!=q.value){u.removeAttribute("disabled");t.removeAttribute("disabled");var b=encodeURIComponent(mxUtils.htmlEntities(q.value));
|
||||
c?(a=EXPORT_URL+"?format\x3dpng\x26url\x3d"+b,l.value=a):(a="https://www.draw.io/?chrome\x3d0",p.checked&&(a+="\x26lightbox\x3d1"),r.checked&&(a+="\x26edit\x3d"+b),e.foldingEnabled&&(a+="\x26nav\x3d1"),s.checked&&(a+="\x26layers\x3d1"),l.value='\x3ciframe frameborder\x3d"0" style\x3d"width:'+n.value+";height:"+m.value+'" src\x3d"'+(a+("\x26url\x3d"+b))+'"\x3e\x3c/iframe\x3e');l.removeAttribute("disabled")}else!c&&!f&&null!=v&&(v.constructor==DriveFile||v.constructor==DropboxFile||v.constructor==OneDriveFile)?
|
||||
(u.removeAttribute("disabled"),t.removeAttribute("disabled"),a="https://www.draw.io/?chrome\x3d0",p.checked&&(a+="\x26lightbox\x3d1"),r.checked&&(a+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities("https://www.draw.io/#"+v.getHash()))),e.foldingEnabled&&(a+="\x26nav\x3d1"),s.checked&&(a+="\x26layers\x3d1"),a+="#"+v.getHash(),l.value='\x3ciframe frameborder\x3d"0" style\x3d"width:'+n.value+";height:"+m.value+'" src\x3d"'+a+'"\x3e\x3c/iframe\x3e',l.removeAttribute("disabled")):(u.setAttribute("disabled",
|
||||
"disabled"),t.setAttribute("disabled","disabled"),l.value=mxResources.get("invalidPublicUrl"),l.setAttribute("disabled","disabled"))}var b=document.createElement("div"),e=a.editor.graph,g=e.getGraphBounds(),k=e.view.scale;mxUtils.write(b,mxResources.get(f?"link":"mainEmbedNotice")+": ");mxUtils.br(b);var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.marginTop="2px";l.style.width="410px";b.appendChild(l);mxUtils.br(b);this.init=function(){"disabled"!=
|
||||
l.getAttribute("disabled")&&(l.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null))};var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginBottom="8px";n.style.marginLeft="4px";n.value="100%";!c&&!f&&(mxUtils.write(b,mxResources.get("width")+":"),b.appendChild(n));var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft=
|
||||
"4px";m.value=Math.ceil((g.y+g.height-e.view.translate.y)/k)+2+"px";var p=document.createElement("input");p.setAttribute("type","checkbox");var r=document.createElement("input");r.setAttribute("type","checkbox");var s=document.createElement("input");s.setAttribute("type","checkbox");c||(f||(mxUtils.write(b,mxResources.get("height")+":"),b.appendChild(m),mxUtils.br(b)),p.setAttribute("checked","checked"),p.defaultChecked=!0,b.appendChild(p),mxUtils.write(b,mxResources.get("lightbox")),s.style.marginLeft=
|
||||
"16px",g=a.editor.graph.getModel(),1<g.getChildCount(g.getRoot())?(s.setAttribute("checked","checked"),s.defaultChecked=!0):s.setAttribute("disabled","disabled"),b.appendChild(s),mxUtils.write(b,mxResources.get("layers")),r.style.marginLeft="16px",r.setAttribute("checked","checked"),r.defaultChecked=!0,b.appendChild(r),mxUtils.write(b,mxResources.get("edit")),mxUtils.br(b));g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";b.appendChild(g);
|
||||
mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";b.appendChild(q);mxUtils.br(b);var u=mxUtils.button(mxResources.get("preview"),function(){if(c||f)window.open(l.value);else{var a=window.open().document;"CSS1Compat"===document.compatMode&&a.writeln("\x3c!DOCTYPE html\x3e");a.writeln("\x3chead\x3e\x3ctitle\x3e"+
|
||||
encodeURIComponent(mxResources.get("preview"))+'\x3c/title\x3e\x3cmeta charset\x3d"utf-8"\x3e\x3c/head\x3e');a.writeln("\x3cbody\x3e");a.writeln(l.value);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close()}});u.className="geBtn";var t=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))}),v=a.getCurrentFile();
|
||||
d();q.setAttribute("placeholder",mxResources.get("loading")+"...");a.getPublicUrl(v,function(a){q.setAttribute("placeholder","");q.value=null!=a?a:"";d()});mxEvent.addListener(n,"change",d);mxEvent.addListener(m,"change",d);mxEvent.addListener(s,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(r,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(l,"click",function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",
|
||||
!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});(c||!mxClient.IS_QUIRKS&&!navigator.standalone&&(!window.chrome||!chrome.app||!chrome.app.runtime)&&(null==document.documentMode||9<=document.documentMode))&&g.appendChild(u);g.appendChild(k);!mxClient.IS_SF&&null==document.documentMode?(g.appendChild(t),t.className="geBtn gePrimaryBtn",k.className="geBtn"):k.className="geBtn gePrimaryBtn";
|
||||
b.appendChild(g);this.container=b},CreateGraphDialog=function(a,c,f){var d=document.createElement("div");d.style.textAlign="right";this.init=function(){var b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.width="100%";b.style.height="360px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);d.appendChild(b);var c=new Graph(b);c.setCellsCloneable(!0);c.setPanning(!0);c.setAllowDanglingEdges(!1);c.connectionHandler.select=
|
||||
!1;c.view.setTranslate(20,20);c.border=20;c.panningHandler.useLeftButtonForPanning=!0;var g="curved\x3d1;";c.cellRenderer.installCellOverlayListeners=function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown",
|
||||
"event",c,"state",a))})};c.getAllConnectionConstraints=function(){return null};c.connectionHandler.marker.highlight.keepOnTop=!1;c.connectionHandler.createEdgeState=function(a){a=c.createEdge(null,null,null,null,null,g);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var k=c.getDefaultParent(),l=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,d){c.connectionHandler.reset();c.clearSelection();
|
||||
var f=c.getCellGeometry(a),n;p(function(){n=c.insertVertex(k,null,"Entry",f.x,f.y,80,30,"rounded\x3d1;");l(n);c.view.refresh(n);c.insertEdge(k,null,"",a,n,g)},function(){c.scrollCellToVisible(n)})});b.addListener("pointerdown",function(a,b){var d=b.getProperty("event"),f=b.getProperty("state");c.popupMenuHandler.hideMenu();c.stopEditing(!1);var k=mxUtils.convertPoint(c.container,mxEvent.getClientX(d),mxEvent.getClientY(d));c.connectionHandler.start(f,k.x,k.y);c.isMouseDown=!0;c.isMouseTrigger=mxEvent.isMouseEvent(d);
|
||||
mxEvent.consume(d)});c.addCellOverlay(a,b)});c.getModel().beginUpdate();var n;try{n=c.insertVertex(k,null,"Start",0,0,80,30,"ellipse"),l(n)}finally{c.getModel().endUpdate()}var m;"horizontalTree"==f?(m=new mxCompactTreeLayout(c),m.edgeRouting=!1,m.levelDistance=30,g="edgeStyle\x3delbowEdgeStyle;elbow\x3dhorizontal;"):"verticalTree"==f?(m=new mxCompactTreeLayout(c,!1),m.edgeRouting=!1,m.levelDistance=30,g="edgeStyle\x3delbowEdgeStyle;elbow\x3dvertical;"):"verticalFlow"==f?m=new mxHierarchicalLayout(c,
|
||||
mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?m=new mxHierarchicalLayout(c,mxConstants.DIRECTION_WEST):"organic"==f?(m=new mxFastOrganicLayout(c,!1),m.forceConstant=80):"circle"==f&&(m=new mxCircleLayout(c));if(null!=m){var p=function(a,b){c.getModel().beginUpdate();try{null!=a&&a(),m.execute(c.getDefaultParent(),n)}catch(d){throw d;}finally{var f=new mxMorphing(c);f.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=b&&b()}));f.startAnimation()}},r=mxEdgeHandler.prototype.connect;
|
||||
mxEdgeHandler.prototype.connect=function(a,b,c,d,e){r.apply(this,arguments);p()};c.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};c.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var s=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){c.destroy();b.parentNode.removeChild(b);a.hideDialog()})});s.className="geBtn";a.editor.cancelFirst&&d.appendChild(s);var q=mxUtils.button(mxResources.get("insert"),function(){c.clearCellOverlays();
|
||||
var d=a.editor.graph.getFreeInsertPoint(),d=a.editor.graph.importCells(c.getModel().getChildren(c.getDefaultParent()),d.x,d.y),f=a.editor.graph.view,k=f.getBounds(d);k.x-=f.translate.x;k.y-=f.translate.y;a.editor.graph.scrollRectToVisible(k);a.editor.graph.setSelectionCells(d);c.destroy();b.parentNode.removeChild(b);a.hideDialog()});d.appendChild(q);q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(s)};this.container=d};
|
||||
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg\x3d\x3d":
|
||||
IMAGE_PATH+"/handle-connect.png",26,26);
|
||||
!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});k.appendChild(n);!mxClient.IS_SF&&null==document.documentMode?(k.appendChild(v),v.className="geBtn gePrimaryBtn",n.className="geBtn"):n.className="geBtn gePrimaryBtn";f.appendChild(k);this.container=f},EmbedSvgDialog=function(a,c){function f(b){if(c){var f=a.editor.graph.getGraphBounds(),g=function(a){var b=" ",c="";p.checked&&(b=" onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
|
||||
(r.checked?"\x26edit\x3d_blank":"")+(s.checked?"\x26layers\x3d1":"")+"');}})(this);\"",c+="cursor:pointer;");k.checked&&(c+="max-width:100%;");var d="";m.checked&&(d=' width\x3d"'+Math.round(f.width)+'" height\x3d"'+Math.round(f.height)+'"');e.value='\x3cimg src\x3d"'+a+'"'+d+(""!=c?' style\x3d"'+c+'"':"")+b+"/\x3e";e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)};if(a.isExportToCanvas())e.value=mxResources.get("updatingDocument"),
|
||||
a.exportToCanvas(mxUtils.bind(this,function(b){var c=p.checked?a.getFileData(!0):null;b=a.createPngDataUri(b,c);g(b)}),null,null,null,mxUtils.bind(this,function(b){e.value="";a.handleError({message:mxResources.get("unknownError")})}),null,!0,m.checked?2:1,null,l.checked);else if(b=a.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){e.value=mxResources.get("updatingDocument");var q="";m.checked&&(q="\x26w\x3d"+Math.round(2*f.width)+"\x26h\x3d"+Math.round(2*f.height));var x=new mxXmlRequest(EXPORT_URL,
|
||||
"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(p.checked?"1":"0")+q+"\x26xml\x3d"+encodeURIComponent(b));x.send(mxUtils.bind(this,function(){200==x.getStatus()?document.body.contains(d)&&g("data:image/png;base64,"+x.getText()):(e.value="",a.handleError({message:mxResources.get("unknownError")}))}))}else e.value="",a.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}else{b=a.editor.graph.getSvg();q=b.getElementsByTagName("a");if(null!=q)for(var y=0;y<q.length;y++){var C=
|
||||
q[y].getAttribute("href");null!=C&&("#"==C.charAt(0)&&"_blank"==q[y].getAttribute("target"))&&q[y].removeAttribute("target")}p.checked&&b.setAttribute("content",a.getFileData(!0));l.checked&&a.editor.addSvgShadow(b);if(n.checked){var A=" ",B="";p.checked&&(A="onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
|
||||
(r.checked?"\x26edit\x3d_blank":"")+(s.checked?"\x26layers\x3d1":"")+"');}})(this);\"",B+="cursor:pointer;");k.checked&&(B+="max-width:100%;");a.convertImages(b,function(b){e.value='\x3cimg src\x3d"'+a.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=B?' style\x3d"'+B+'"':"")+A+"/\x3e"})}else B="",p.checked&&(b.setAttribute("onclick","(function(svg){var src\x3dwindow.event.target||window.event.srcElement;while (src!\x3dnull\x26\x26src.nodeName.toLowerCase()!\x3d'a'){src\x3dsrc.parentNode;}if(src\x3d\x3dnull){if(svg.wnd!\x3dnull\x26\x26!svg.wnd.closed){svg.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dsvg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
|
||||
(r.checked?"\x26edit\x3d_blank":"")+(s.checked?"\x26layers\x3d1":"")+"');}}})(this);"),B+="cursor:pointer;"),k.checked&&(q=parseInt(b.getAttribute("width")),y=parseInt(b.getAttribute("height")),b.setAttribute("viewBox","0 0 "+q+" "+y),B+="max-width:100%;max-height:"+y+"px;",b.removeAttribute("height")),""!=B&&b.setAttribute("style",B),e.value=mxUtils.getXml(b);e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)}}a.getCurrentFile();
|
||||
var d=document.createElement("div"),b=a.editor.graph;b.getGraphBounds();mxUtils.write(d,mxResources.get("mainEmbedNotice")+": ");mxUtils.br(d);var e=document.createElement("textarea");e.style.marginTop="6px";e.style.width="550px";e.style.height="280px";e.style.resize="none";d.appendChild(e);mxUtils.br(d);var g=document.createElement("div");g.style.paddingTop="16px";g.style.textAlign="center";var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");
|
||||
k.defaultChecked=!0;g.appendChild(k);mxUtils.write(g,mxResources.get("fit"));var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.marginLeft="10px";b.shadowVisible&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);if(!c||a.isExportToCanvas())g.appendChild(l),mxUtils.write(g,mxResources.get("shadow"));var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginLeft="10px";c||(g.appendChild(n),mxUtils.write(g,mxResources.get("image")));var m=
|
||||
document.createElement("input");m.setAttribute("type","checkbox");m.style.marginLeft="10px";c&&(g.appendChild(m),mxUtils.write(g,mxResources.get("retina")));var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="10px";g.appendChild(p);mxUtils.write(g,mxResources.get("lightbox"));var r=document.createElement("input");r.setAttribute("type","checkbox");r.setAttribute("checked","checked");r.defaultChecked=!0;
|
||||
r.style.marginLeft="10px";g.appendChild(r);mxUtils.write(g,mxResources.get("edit"));var s=document.createElement("input");s.setAttribute("type","checkbox");s.style.marginLeft="10px";b=a.editor.graph.getModel();1<b.getChildCount(b.getRoot())?(s.setAttribute("checked","checked"),s.defaultChecked=!0):s.setAttribute("disabled","disabled");g.appendChild(s);mxUtils.write(g,mxResources.get("layers"));d.appendChild(g);this.init=function(){f()};mxEvent.addListener(n,"change",f);mxEvent.addListener(m,"change",
|
||||
f);mxEvent.addListener(l,"change",f);mxEvent.addListener(k,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(r,"change",f);mxEvent.addListener(s,"change",f);g=document.createElement("div");g.style.paddingTop="18px";g.style.textAlign="right";!a.isOffline()&&!c&&(b=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/solution/articles/16000042548-how-to-embed-svg-")}),b.className="geBtn",g.appendChild(b));if(!mxClient.IS_CHROMEAPP&&!navigator.standalone&&
|
||||
mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))b=mxUtils.button(mxResources.get("preview"),function(){var a=window.open().document;a.writeln("\x3chtml\x3e\x3chead\x3e\x3ctitle\x3e"+encodeURIComponent(mxResources.get("preview"))+'\x3c/title\x3e\x3cmeta charset\x3d"utf-8"\x3e\x3c/head\x3e\x3cbody\x3e'+e.value+"\x3c/body\x3e\x3c/html\x3e");a.close()}),b.className="geBtn",g.appendChild(b);var b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()}),q=mxUtils.button(mxResources.get("copy"),
|
||||
function(){e.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});g.appendChild(b);!mxClient.IS_SF&&null==document.documentMode?(g.appendChild(q),q.className="geBtn gePrimaryBtn",b.className="geBtn"):b.className="geBtn gePrimaryBtn";d.appendChild(g);this.container=d},GoogleSitesDialog=function(a){function c(){var a=null!=C.getTitle()?C.getTitle():this.defaultFilename;
|
||||
if(x.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type\x3d4\x26diagram\x3d"+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="\x26title\x3d"+encodeURIComponent(a));0<y.length&&(b+="\x26s\x3d"+y);""!=r.value&&"0"!=r.value&&(b+="\x26border\x3d"+r.value);""!=m.value&&(b+="\x26height\x3d"+m.value);b+="\x26pan\x3d"+(s.checked?"1":"0");b+="\x26zoom\x3d"+(q.checked?"1":"0");b+="\x26fit\x3d"+(z.checked?"1":"0");b+="\x26resize\x3d"+(v.checked?"1":"0");b+="\x26x0\x3d"+Number(n.value);
|
||||
b+="\x26y0\x3d"+k;d.mathEnabled&&(b+="\x26math\x3d1");t.checked?b+="\x26edit\x3d_blank":u.checked&&(b+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));l.value=b}else C.constructor==DriveFile||C.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed\x3d0\x26diagram\x3d",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"\x26type\x3d3":(b+=C.getHash().substring(1),b=C.constructor==DropboxFile?b+"\x26type\x3d2":b+"\x26type\x3d1"),null!=a&&(b+=
|
||||
"\x26title\x3d"+encodeURIComponent(a)),""!=m.value&&(a=parseInt(m.value)+parseInt(n.value),b+="\x26height\x3d"+a),l.value=b):l.value=""}var f=document.createElement("div"),d=a.editor.graph,b=d.getGraphBounds(),e=d.view.scale,g=Math.floor(b.x/e-d.view.translate.x),k=Math.floor(b.y/e-d.view.translate.y);mxUtils.write(f,mxResources.get("googleGadget")+":");mxUtils.br(f);var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.marginTop="2px";l.style.width=
|
||||
"410px";f.appendChild(l);mxUtils.br(f);this.init=function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)};mxUtils.write(f,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","4");n.style.marginRight="16px";n.style.marginLeft="4px";n.value=g;f.appendChild(n);mxUtils.write(f,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type",
|
||||
"text");m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(b.height/e);f.appendChild(m);mxUtils.br(f);b=document.createElement("hr");b.setAttribute("size","1");b.style.marginBottom="16px";b.style.marginTop="16px";f.appendChild(b);mxUtils.write(f,mxResources.get("publicDiagramUrl")+":");mxUtils.br(f);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";f.appendChild(p);
|
||||
mxUtils.br(f);mxUtils.write(f,mxResources.get("borderWidth")+":");var r=document.createElement("input");r.setAttribute("type","text");r.setAttribute("size","3");r.style.marginBottom="8px";r.style.marginLeft="4px";r.value="0";f.appendChild(r);mxUtils.br(f);var s=document.createElement("input");s.setAttribute("type","checkbox");s.setAttribute("checked","checked");s.defaultChecked=!0;s.style.marginLeft="16px";f.appendChild(s);mxUtils.write(f,mxResources.get("pan")+" ");var q=document.createElement("input");
|
||||
q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";f.appendChild(q);mxUtils.write(f,mxResources.get("zoom")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="8px";u.setAttribute("title",window.location.href);f.appendChild(u);mxUtils.write(f,mxResources.get("edit")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";f.appendChild(t);mxUtils.write(f,
|
||||
mxResources.get("asNew")+" ");mxUtils.br(f);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";f.appendChild(v);mxUtils.write(f,mxResources.get("resize")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";f.appendChild(z);mxUtils.write(f,mxResources.get("fit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft=
|
||||
"8px";f.appendChild(x);mxUtils.write(f,mxResources.get("embed")+" ");var y=a.getBasenames().join(";"),C=a.getCurrentFile();c();p.setAttribute("placeholder",mxResources.get("loading")+"...");a.getPublicUrl(C,function(a){p.setAttribute("placeholder","");p.value=null!=a?a:"";c()});mxEvent.addListener(s,"change",c);mxEvent.addListener(q,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(t,"change",c);mxEvent.addListener(x,
|
||||
"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(n,"change",c);mxEvent.addListener(r,"change",c);mxEvent.addListener(p,"change",c);mxEvent.addListener(l,"click",function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)});b=document.createElement("div");b.style.paddingTop="12px";b.style.textAlign="right";e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";
|
||||
b.appendChild(e);f.appendChild(b);this.container=f},IframeDialog=function(a,c,f){function d(){null!=v&&null!=v.getTitle()&&v.getTitle();if(f&&null!=v&&(""!=q.value||v.constructor==DriveFile||v.constructor==DropboxFile||v.constructor==OneDriveFile)){u.removeAttribute("disabled");t.removeAttribute("disabled");var a="https://www.draw.io/?chrome\x3d0";p.checked&&(a+="\x26lightbox\x3d1");r.checked&&(a+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities("https://www.draw.io/#"+v.getHash())));e.foldingEnabled&&
|
||||
(a+="\x26nav\x3d1");s.checked&&(a+="\x26layers\x3d1");a=""!=q.value?a+("\x26url\x3d"+encodeURIComponent(mxUtils.htmlEntities(q.value))):a+("#"+v.getHash());l.value=a;l.removeAttribute("disabled")}else if(""!=q.value){u.removeAttribute("disabled");t.removeAttribute("disabled");var b=encodeURIComponent(mxUtils.htmlEntities(q.value));c?(a=EXPORT_URL+"?format\x3dpng\x26url\x3d"+b,l.value=a):(a="https://www.draw.io/?chrome\x3d0",p.checked&&(a+="\x26lightbox\x3d1"),r.checked&&(a+="\x26edit\x3d"+b),e.foldingEnabled&&
|
||||
(a+="\x26nav\x3d1"),s.checked&&(a+="\x26layers\x3d1"),l.value='\x3ciframe frameborder\x3d"0" style\x3d"width:'+n.value+";height:"+m.value+'" src\x3d"'+(a+("\x26url\x3d"+b))+'"\x3e\x3c/iframe\x3e');l.removeAttribute("disabled")}else!c&&!f&&null!=v&&(v.constructor==DriveFile||v.constructor==DropboxFile||v.constructor==OneDriveFile)?(u.removeAttribute("disabled"),t.removeAttribute("disabled"),a="https://www.draw.io/?chrome\x3d0",p.checked&&(a+="\x26lightbox\x3d1"),r.checked&&(a+="\x26edit\x3d"+encodeURIComponent(mxUtils.htmlEntities("https://www.draw.io/#"+
|
||||
v.getHash()))),e.foldingEnabled&&(a+="\x26nav\x3d1"),s.checked&&(a+="\x26layers\x3d1"),a+="#"+v.getHash(),l.value='\x3ciframe frameborder\x3d"0" style\x3d"width:'+n.value+";height:"+m.value+'" src\x3d"'+a+'"\x3e\x3c/iframe\x3e',l.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),l.value=mxResources.get("invalidPublicUrl"),l.setAttribute("disabled","disabled"))}var b=document.createElement("div"),e=a.editor.graph,g=e.getGraphBounds(),k=e.view.scale;
|
||||
mxUtils.write(b,mxResources.get(f?"link":"mainEmbedNotice")+": ");mxUtils.br(b);var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.marginTop="2px";l.style.width="410px";b.appendChild(l);mxUtils.br(b);this.init=function(){"disabled"!=l.getAttribute("disabled")&&(l.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null))};var n=document.createElement("input");n.setAttribute("type","text");
|
||||
n.style.marginRight="16px";n.style.width="60px";n.style.marginBottom="8px";n.style.marginLeft="4px";n.value="100%";!c&&!f&&(mxUtils.write(b,mxResources.get("width")+":"),b.appendChild(n));var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.value=Math.ceil((g.y+g.height-e.view.translate.y)/k)+2+"px";var p=document.createElement("input");p.setAttribute("type","checkbox");var r=document.createElement("input");r.setAttribute("type","checkbox");
|
||||
var s=document.createElement("input");s.setAttribute("type","checkbox");c||(f||(mxUtils.write(b,mxResources.get("height")+":"),b.appendChild(m),mxUtils.br(b)),p.setAttribute("checked","checked"),p.defaultChecked=!0,b.appendChild(p),mxUtils.write(b,mxResources.get("lightbox")),s.style.marginLeft="16px",g=a.editor.graph.getModel(),1<g.getChildCount(g.getRoot())?(s.setAttribute("checked","checked"),s.defaultChecked=!0):s.setAttribute("disabled","disabled"),b.appendChild(s),mxUtils.write(b,mxResources.get("layers")),
|
||||
r.style.marginLeft="16px",r.setAttribute("checked","checked"),r.defaultChecked=!0,b.appendChild(r),mxUtils.write(b,mxResources.get("edit")),mxUtils.br(b));g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";b.appendChild(g);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";
|
||||
q.style.width="410px";b.appendChild(q);mxUtils.br(b);var u=mxUtils.button(mxResources.get("preview"),function(){if(c||f)window.open(l.value);else{var a=window.open().document;"CSS1Compat"===document.compatMode&&a.writeln("\x3c!DOCTYPE html\x3e");a.writeln("\x3chead\x3e\x3ctitle\x3e"+encodeURIComponent(mxResources.get("preview"))+'\x3c/title\x3e\x3cmeta charset\x3d"utf-8"\x3e\x3c/head\x3e');a.writeln("\x3cbody\x3e");a.writeln(l.value);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close()}});
|
||||
u.className="geBtn";var t=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))}),v=a.getCurrentFile();d();q.setAttribute("placeholder",mxResources.get("loading")+"...");a.getPublicUrl(v,function(a){q.setAttribute("placeholder","");q.value=null!=a?a:"";d()});mxEvent.addListener(n,"change",d);mxEvent.addListener(m,
|
||||
"change",d);mxEvent.addListener(s,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(r,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(l,"click",function(){l.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});(c||!mxClient.IS_QUIRKS&&!navigator.standalone&&
|
||||
(!window.chrome||!chrome.app||!chrome.app.runtime)&&(null==document.documentMode||9<=document.documentMode))&&g.appendChild(u);g.appendChild(k);!mxClient.IS_SF&&null==document.documentMode?(g.appendChild(t),t.className="geBtn gePrimaryBtn",k.className="geBtn"):k.className="geBtn gePrimaryBtn";b.appendChild(g);this.container=b},CreateGraphDialog=function(a,c,f){var d=document.createElement("div");d.style.textAlign="right";this.init=function(){var b=document.createElement("div");b.style.position="relative";
|
||||
b.style.border="1px solid gray";b.style.width="100%";b.style.height="360px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);d.appendChild(b);var c=new Graph(b);c.setCellsCloneable(!0);c.setPanning(!0);c.setAllowDanglingEdges(!1);c.connectionHandler.select=!1;c.view.setTranslate(20,20);c.border=20;c.panningHandler.useLeftButtonForPanning=!0;var g="curved\x3d1;";c.cellRenderer.installCellOverlayListeners=function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,
|
||||
arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))})};c.getAllConnectionConstraints=function(){return null};c.connectionHandler.marker.highlight.keepOnTop=!1;c.connectionHandler.createEdgeState=function(a){a=c.createEdge(null,null,
|
||||
null,null,null,g);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var k=c.getDefaultParent(),l=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,d){c.connectionHandler.reset();c.clearSelection();var f=c.getCellGeometry(a),n;p(function(){n=c.insertVertex(k,null,"Entry",f.x,f.y,80,30,"rounded\x3d1;");l(n);c.view.refresh(n);c.insertEdge(k,null,"",a,n,g)},function(){c.scrollCellToVisible(n)})});
|
||||
b.addListener("pointerdown",function(a,b){var d=b.getProperty("event"),f=b.getProperty("state");c.popupMenuHandler.hideMenu();c.stopEditing(!1);var k=mxUtils.convertPoint(c.container,mxEvent.getClientX(d),mxEvent.getClientY(d));c.connectionHandler.start(f,k.x,k.y);c.isMouseDown=!0;c.isMouseTrigger=mxEvent.isMouseEvent(d);mxEvent.consume(d)});c.addCellOverlay(a,b)});c.getModel().beginUpdate();var n;try{n=c.insertVertex(k,null,"Start",0,0,80,30,"ellipse"),l(n)}finally{c.getModel().endUpdate()}var m;
|
||||
"horizontalTree"==f?(m=new mxCompactTreeLayout(c),m.edgeRouting=!1,m.levelDistance=30,g="edgeStyle\x3delbowEdgeStyle;elbow\x3dhorizontal;"):"verticalTree"==f?(m=new mxCompactTreeLayout(c,!1),m.edgeRouting=!1,m.levelDistance=30,g="edgeStyle\x3delbowEdgeStyle;elbow\x3dvertical;"):"verticalFlow"==f?m=new mxHierarchicalLayout(c,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?m=new mxHierarchicalLayout(c,mxConstants.DIRECTION_WEST):"organic"==f?(m=new mxFastOrganicLayout(c,!1),m.forceConstant=80):"circle"==
|
||||
f&&(m=new mxCircleLayout(c));if(null!=m){var p=function(a,b){c.getModel().beginUpdate();try{null!=a&&a(),m.execute(c.getDefaultParent(),n)}catch(d){throw d;}finally{var f=new mxMorphing(c);f.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=b&&b()}));f.startAnimation()}},r=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(a,b,c,d,e){r.apply(this,arguments);p()};c.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};
|
||||
c.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var s=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){c.destroy();b.parentNode.removeChild(b);a.hideDialog()})});s.className="geBtn";a.editor.cancelFirst&&d.appendChild(s);var q=mxUtils.button(mxResources.get("insert"),function(){c.clearCellOverlays();var d=a.editor.graph.getFreeInsertPoint(),d=a.editor.graph.importCells(c.getModel().getChildren(c.getDefaultParent()),d.x,d.y),f=a.editor.graph.view,
|
||||
k=f.getBounds(d);k.x-=f.translate.x;k.y-=f.translate.y;a.editor.graph.scrollRectToVisible(k);a.editor.graph.setSelectionCells(d);c.destroy();b.parentNode.removeChild(b);a.hideDialog()});d.appendChild(q);q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(s)};this.container=d};
|
||||
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg\x3d\x3d":IMAGE_PATH+
|
||||
"/handle-connect.png",26,26);
|
||||
var BackgroundImageDialog=function(a,c){var f=document.createElement("div");f.style.whiteSpace="nowrap";var d=document.createElement("h2");mxUtils.write(d,mxResources.get("backgroundImage"));d.style.marginTop="0px";f.appendChild(d);mxUtils.write(f,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(f);var d=a.editor.graph.backgroundImage,b=document.createElement("input");b.setAttribute("type","text");b.style.marginTop="4px";b.style.marginBottom="4px";b.style.width="350px";b.value=
|
||||
null!=d?d.src:"";var e=!1,g=function(){!e&&""!=b.value&&!a.isOffline()?a.loadImage(mxUtils.trim(b.value),function(a){k.value=a.width;l.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));b.value="";k.value="";l.value=""}):(k.value="",l.value="")};this.init=function(){b.focus();if(Graph.fileSupport){b.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=f.parentNode,d=null;mxEvent.addListener(c,"dragleave",function(a){null!=
|
||||
d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(b){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=a.highlightElement(c);b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,c,d,e,f,k){b.value=a;g()},function(){},
|
||||
|
@ -7297,21 +7299,32 @@ f.setAttribute("title",mxResources.get("zoomOut"));f.style.outline="none";f.styl
|
|||
mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin="2px";mxUtils.setOpacity(u,60);b=mxUtils.button(g||mxResources.get("discard"),b);b.className="geBtn";var t=document.createElement("select");t.style.maxWidth="80px";t.style.position="relative";t.style.top="-2px";t.style.verticalAlign="bottom";t.style.marginRight="6px";t.style.display="none";d=mxUtils.button(e||mxResources.get("edit"),d);d.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.position=
|
||||
"absolute";e.style.top="470px";e.style.width="640px";e.style.textAlign="right";g=document.createElement("div");g.className="geToolbarContainer";g.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;top:470px;";this.init=function(){function b(a){if(null!=a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";n.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,m.getModel());m.maxFitScale=1;m.fit(8);
|
||||
m.center()}}function c(d){null!=d&&(d=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(d))).documentElement));return d}mxEvent.addListener(t,"change",function(a){r=parseInt(t.value);c(s[r]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var d=p.getElementsByTagName("diagram");s=[];for(var e=0;e<d.length;e++)s.push(d[e]);0<s.length&&c(s[r]);if(1<s.length){t.style.display="";for(e=0;e<s.length;e++)d=document.createElement("option"),mxUtils.write(d,s[e].getAttribute("name")||mxResources.get("pageWithNumber",
|
||||
[e+1])),d.setAttribute("value",e),e==r&&d.setAttribute("selected","selected"),t.appendChild(d)}}else b(p)};g.appendChild(t);g.appendChild(c);g.appendChild(f);g.appendChild(u);g.appendChild(l);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";a.editor.cancelFirst?(e.appendChild(c),e.appendChild(b),e.appendChild(d)):(e.appendChild(d),e.appendChild(b),e.appendChild(c));k.appendChild(e);k.appendChild(g);this.container=k},AnimationWindow=function(a,c,f,d,b){function e(a){for(var b=
|
||||
[],c=0;c<a.length;c++){var d=B.view.getState(a[c]);if(null!=d){for(var e=B.cellRenderer.getShapesForState(d),f=0;f<e.length;f++)null!=e[f]&&null!=e[f].node&&b.push(e[f].node);null!=d.control&&null!=d.control.node&&b.push(d.control.node)}}return b}function g(a){if(null!=a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition",null),a[b].style.opacity="0";window.setTimeout(function(){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition","all 1s ease-in-out"),
|
||||
a[b].style.opacity="1"},0)}}function k(a){if(null!=a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition",null),a[b].style.opacity="1";window.setTimeout(function(){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition","all 1s ease-in-out"),a[b].style.opacity="0"},0)}}function l(a){var b=a.absolutePoints.slice(),c=a.segments,d=a.length,e=b.length;return{execute:function(f,k){if(null!=a.shape){for(var g=[b[0]],l=d*f/k,n=1;n<e;n++)if(l<=c[n-1]){g.push(new mxPoint(b[n-
|
||||
1].x+(b[n].x-b[n-1].x)*l/c[n-1],b[n-1].y+(b[n].y-b[n-1].y)*l/c[n-1]));break}else l-=c[n-1],g.push(b[n]);a.shape.points=g;a.shape.redraw()}},stop:function(){null!=a.shape&&(a.shape.points=b,a.shape.redraw())}}}function n(a){var b=new mxRectangle.fromRectangle(a.shape.bounds),c=null;null!=a.text&&(null!=a.text.node&&null!=a.text.node.firstChild)&&(c=a.text.node.firstChild.getAttribute("transform"));return{execute:function(d,e){if(null!=a.shape){var f=d/e;a.shape.bounds=new mxRectangle(b.x,b.y,b.width*
|
||||
f,b.height);a.shape.redraw();null!=c&&a.text.node.firstChild.setAttribute("transform",c+" scale("+f+",1)")}},stop:function(){null!=a.shape&&(a.shape.bounds=b,a.shape.redraw(),null!=c&&a.text.node.firstChild.setAttribute("transform",c))}}}function m(a,b,c){function d(){if(g==b){window.clearInterval(m);for(var a=0;a<e.length;a++)e[a].stop()}else{for(a=0;a<e.length;a++)e[a].execute(g,b);g++}}b=null!=b?b:30;c=null!=c?c:30;for(var e=[],f=0;f<a.length;f++){var k=B.view.getState(a[f]);null!=k&&null!=k.shape&&
|
||||
B.model.isEdge(k.cell)&&null!=k.absolutePoints&&1<k.absolutePoints.length?e.push(l(k)):null!=k&&(B.model.isVertex(k.cell)&&null!=k.shape&&null!=k.shape.bounds)&&e.push(n(k))}var g=0,m=window.setInterval(d,c);d()}function p(a,b,c){c=null!=c?c:{};c[a.id]=b;for(var d=a.getChildCount(),e=0;e<d;e++)p(a.getChildAt(e),b.getChildAt(e),c);return c}function r(){if(!G){G=E=!0;B.getModel().clear();B.getModel().setRoot(B.cloneCells([a.editor.graph.getModel().getRoot()])[0]);B.maxFitScale=1;B.fit(8);B.center();
|
||||
B.getModel().beginUpdate();try{for(var b in B.getModel().cells){var c=B.getModel().cells[b];if(B.getModel().isVertex(c)||B.getModel().isEdge(c))B.setCellStyles("opacity","0",[c]),B.setCellStyles("noLabel","1",[c])}}finally{B.getModel().endUpdate()}var d=p(a.editor.graph.getModel().getRoot(),B.getModel().getRoot()),f=y.value.split("\n"),l=0,n=function(){if(E&&l<f.length){var a=f[l].split(" ");if(0<a.length)if("wait"==a[0]&&1<a.length)window.setTimeout(function(){l++;n()},parseFloat(a[1]));else{if(1<
|
||||
a.length){var c=d[a[1]];null!=c?"show"==a[0]?(B.setCellStyles("opacity","100",[c]),B.setCellStyles("noLabel",null,[c]),2<a.length&&"fade"==a[2]?g(e([c])):m([c])):"hide"==a[0]&&k(e([c])):console.log("cell not found",b,f[l])}l++;n()}}else G=!1};n()}}var s=document.createElement("table");s.style.width="100%";s.style.height="100%";var q=document.createElement("tbody"),u=document.createElement("tr"),t=document.createElement("td");t.style.width="140px";var v=document.createElement("td"),z=document.createElement("tr");
|
||||
z.style.height="40px";var x=document.createElement("td");x.setAttribute("colspan","2");var y=document.createElement("textarea");y.style.overflow="auto";y.style.width="100%";y.style.height="100%";t.appendChild(y);var C=a.editor.graph.getModel().getRoot();null!=C.value&&"object"==typeof C.value&&(y.value=C.value.getAttribute("animation"));var A=document.createElement("div");A.style.border="1px solid lightGray";A.style.background="#ffffff";A.style.width="100%";A.style.height="100%";A.style.overflow=
|
||||
"auto";mxEvent.disableContextMenu(A);v.appendChild(A);var B=new Graph(A);B.setEnabled(!1);B.setPanning(!0);B.foldingEnabled=!1;B.panningHandler.ignoreCell=!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var E=!1,G=!1,A=mxUtils.button("Fade In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"show "+b[c].id+" fade\n";y.value+="wait 1000\n"}});x.appendChild(A);A=mxUtils.button("Wipe In",
|
||||
function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"show "+b[c].id+"\n";y.value+="wait 1000\n"}});x.appendChild(A);A=mxUtils.button("Fade Out",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"hide "+b[c].id+"\n";y.value+="wait 1000\n"}});x.appendChild(A);A=mxUtils.button("Wait",function(){y.value+="wait 1000\n"});x.appendChild(A);A=mxUtils.button("Preview",function(){r()});x.appendChild(A);
|
||||
A=mxUtils.button("Stop",function(){E=!1;B.getModel().clear()});x.appendChild(A);A=mxUtils.button("Apply",function(){a.editor.graph.setAttributeForCell(C,"animation",y.value)});x.appendChild(A);C=a.editor.graph.getModel().getRoot();u.appendChild(t);u.appendChild(v);q.appendChild(u);z.appendChild(x);q.appendChild(z);s.appendChild(q);this.window=new mxWindow("Animation",s,c,f,d,b,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
|
||||
this.window.setVisible(!0)},AuthDialog=function(a,c,f,d){var b=document.createElement("div");b.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("authorizationRequired"));var g="Unknown",k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.marginRight="10px";c==a.drive?(g=mxResources.get("googleDrive"),k.src=IMAGE_PATH+
|
||||
"/google-drive-logo-white.svg"):c==a.dropbox?(g=mxResources.get("dropbox"),k.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive&&(g=mxResources.get("oneDrive"),k.src=IMAGE_PATH+"/onedrive-logo-white.svg");c=document.createElement("p");mxUtils.write(c,mxResources.get("authorizeThisAppIn",[g]));var l=document.createElement("input");l.setAttribute("type","checkbox");g=mxUtils.button(mxResources.get("authorize"),function(){a.hideDialog(!1);d(l.checked)});g.insertBefore(k,g.firstChild);g.style.marginTop=
|
||||
"6px";g.className="geBigButton";b.appendChild(e);b.appendChild(c);b.appendChild(g);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(l),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberMe")),f.appendChild(e),b.appendChild(f),l.checked=!0,l.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)}));this.container=b},MoreShapesDialog=function(a,c,f){f=null!=f?f:a.sidebar.entries;var d=document.createElement("div");
|
||||
[e+1])),d.setAttribute("value",e),e==r&&d.setAttribute("selected","selected"),t.appendChild(d)}}else b(p)};g.appendChild(t);g.appendChild(c);g.appendChild(f);g.appendChild(u);g.appendChild(l);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";a.editor.cancelFirst?(e.appendChild(c),e.appendChild(b),e.appendChild(d)):(e.appendChild(d),e.appendChild(b),e.appendChild(c));k.appendChild(e);k.appendChild(g);this.container=k},FindWindow=function(a,c,f,d,b){function e(){var a=
|
||||
k.model.getDescendants(k.model.getRoot()),b=p.value.toLowerCase(),c=RegExp(b),d=null;l!=b&&(l=b,n=null);var e=null==n;if(k.isEnabled()&&0<b.length)for(var f=0;f<a.length;f++){var g=k.view.getState(a[f]);if(null!=g&&null!=g.cell.value&&(e||null==d)&&(k.model.isVertex(g.cell)||k.model.isEdge(g.cell))){k.isHtmlLabel(g.cell)?(r.innerHTML=k.getLabel(g.cell),label=mxUtils.extractTextWithWhitespace([r])):label=k.getLabel(g.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();
|
||||
var m;if(!(m=c.test(label)))a:{m=c;var s=g.cell;if("object"===typeof s.value&&null!=s.value.attributes)for(var s=s.value.attributes,B=0;B<s.length;B++)if("label"!=s[B].nodeName&&m.test(s[B].nodeValue.toLowerCase())){m=!0;break a}m=!1}if(m)if(e){d=g;break}else null==d&&(d=g)}e=e||g==n}null!=d?(n=d,k.setSelectionCell(n.cell),k.scrollCellToVisible(n.cell)):k.clearSelection();return!k.isEnabled()||0==b.length||null!=d}var g=a.actions.get("find"),k=a.editor.graph,l=null,n=null,m=document.createElement("div");
|
||||
m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var p=document.createElement("input");p.setAttribute("placeholder",mxResources.get("find"));p.setAttribute("type","text");p.style.marginTop="4px";p.style.width="170px";p.style.fontSize="12px";p.style.borderRadius="4px";p.style.padding="6px";m.appendChild(p);var r=document.createElement("div");mxUtils.br(m);var s=mxUtils.button(mxResources.get("reset"),function(){p.value="";p.style.backgroundColor="";l=
|
||||
n=null;p.focus()});s.setAttribute("title",mxResources.get("reset"));s.style.marginTop="8px";s.style.marginRight="4px";s.style.backgroundColor="#f5f5f5";s.style.backgroundImage="none";s.className="geBtn";m.appendChild(s);s=mxUtils.button(mxResources.get("find"),function(){p.style.backgroundColor=e()?"":"#ffcfcf"});s.setAttribute("title",mxResources.get("find")+" (Enter)");s.style.marginTop="8px";s.style.backgroundColor="#4d90fe";s.style.backgroundImage="none";s.className="geBtn gePrimaryBtn";m.appendChild(s);
|
||||
mxEvent.addListener(p,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)g.funct();else if(l!=p.value.toLowerCase()||13==a.keyCode)p.style.backgroundColor=e()?"":"#ffcfcf"});mxEvent.addListener(m,"keydown",function(b){70==b.keyCode&&(a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b))&&(g.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),m,c,f,d,b,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);
|
||||
this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(p.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):k.container.focus()}))},TagsWindow=function(a,c,f,d,b){function e(a){a=null!=a?a:k.model.getDescendants(k.model.getRoot());for(var b=m.value.split(" "),c=[],d=0;d<a.length;d++)if(k.model.isVertex(a[d])||k.model.isEdge(a[d])){var e=null!=a[d].value&&"object"==typeof a[d].value?
|
||||
mxUtils.trim(a[d].value.getAttribute(l)||""):"",f=!0;if(0<e.length)for(var e=e.toLowerCase().split(" "),g=0;g<b.length&&f;g++)var n=mxUtils.trim(b[g]).toLowerCase(),f=f&&(0==n.length||0<=mxUtils.indexOf(e,n));else f=0==mxUtils.trim(m.value).length;f&&c.push(a[d])}return c}function g(a,b){k.model.beginUpdate();try{for(var c=0;c<a.length;c++)k.model.setVisible(a[c],b)}finally{k.model.endUpdate()}}var k=a.editor.graph,l="tags",n=document.createElement("div");n.style.userSelect="none";n.style.overflow=
|
||||
"hidden";n.style.padding="10px";n.style.height="100%";var m=document.createElement("input");m.setAttribute("placeholder",mxResources.get("allTags"));m.setAttribute("type","text");m.style.marginTop="4px";m.style.width="240px";m.style.fontSize="12px";m.style.borderRadius="4px";m.style.padding="6px";n.appendChild(m);mxEvent.addListener(m,"dblclick",function(){var b=new FilenameDialog(a,l,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(l=a)}),mxResources.get("enterPropertyName"));
|
||||
a.showDialog(b.container,300,80,!0,!0);b.init()});m.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(n);var p=mxUtils.button(mxResources.get("hide"),function(){g(e(),!1)});p.setAttribute("title",mxResources.get("hide"));p.style.marginTop="8px";p.style.marginRight="4px";p.style.backgroundColor="#f5f5f5";p.style.backgroundImage="none";p.className="geBtn";n.appendChild(p);p=mxUtils.button(mxResources.get("show"),function(){var a=e();g(a,!0);k.setSelectionCells(a)});p.setAttribute("title",
|
||||
mxResources.get("show"));p.style.marginTop="8px";p.style.marginRight="4px";p.style.backgroundColor="#f5f5f5";p.style.backgroundImage="none";p.className="geBtn";n.appendChild(p);var r=a.actions.get("tags"),p=mxUtils.button(mxResources.get("close"),function(){r.funct()});p.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");p.style.marginTop="8px";p.style.backgroundColor="#4d90fe";p.style.backgroundImage="none";p.className="geBtn gePrimaryBtn";n.appendChild(p);mxEvent.addListener(m,"keyup",
|
||||
function(a){(13==a.keyCode||27==a.keyCode)&&r.funct()});this.window=new mxWindow(mxResources.get("tags"),n,c,f,d,b,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(m.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):k.container.focus()}))},AnimationWindow=function(a,
|
||||
c,f,d,b){function e(a){for(var b=[],c=0;c<a.length;c++){var d=B.view.getState(a[c]);if(null!=d){for(var e=B.cellRenderer.getShapesForState(d),f=0;f<e.length;f++)null!=e[f]&&null!=e[f].node&&b.push(e[f].node);null!=d.control&&null!=d.control.node&&b.push(d.control.node)}}return b}function g(a){if(null!=a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition",null),a[b].style.opacity="0";window.setTimeout(function(){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,
|
||||
"transition","all 1s ease-in-out"),a[b].style.opacity="1"},0)}}function k(a){if(null!=a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition",null),a[b].style.opacity="1";window.setTimeout(function(){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition","all 1s ease-in-out"),a[b].style.opacity="0"},0)}}function l(a){var b=a.absolutePoints.slice(),c=a.segments,d=a.length,e=b.length;return{execute:function(f,k){if(null!=a.shape){for(var g=[b[0]],l=d*f/k,
|
||||
n=1;n<e;n++)if(l<=c[n-1]){g.push(new mxPoint(b[n-1].x+(b[n].x-b[n-1].x)*l/c[n-1],b[n-1].y+(b[n].y-b[n-1].y)*l/c[n-1]));break}else l-=c[n-1],g.push(b[n]);a.shape.points=g;a.shape.redraw()}},stop:function(){null!=a.shape&&(a.shape.points=b,a.shape.redraw())}}}function n(a){var b=new mxRectangle.fromRectangle(a.shape.bounds),c=null;null!=a.text&&(null!=a.text.node&&null!=a.text.node.firstChild)&&(c=a.text.node.firstChild.getAttribute("transform"));return{execute:function(d,e){if(null!=a.shape){var f=
|
||||
d/e;a.shape.bounds=new mxRectangle(b.x,b.y,b.width*f,b.height);a.shape.redraw();null!=c&&a.text.node.firstChild.setAttribute("transform",c+" scale("+f+",1)")}},stop:function(){null!=a.shape&&(a.shape.bounds=b,a.shape.redraw(),null!=c&&a.text.node.firstChild.setAttribute("transform",c))}}}function m(a,b,c){function d(){if(g==b){window.clearInterval(m);for(var a=0;a<e.length;a++)e[a].stop()}else{for(a=0;a<e.length;a++)e[a].execute(g,b);g++}}b=null!=b?b:30;c=null!=c?c:30;for(var e=[],f=0;f<a.length;f++){var k=
|
||||
B.view.getState(a[f]);null!=k&&null!=k.shape&&B.model.isEdge(k.cell)&&null!=k.absolutePoints&&1<k.absolutePoints.length?e.push(l(k)):null!=k&&(B.model.isVertex(k.cell)&&null!=k.shape&&null!=k.shape.bounds)&&e.push(n(k))}var g=0,m=window.setInterval(d,c);d()}function p(a,b,c){c=null!=c?c:{};c[a.id]=b;for(var d=a.getChildCount(),e=0;e<d;e++)p(a.getChildAt(e),b.getChildAt(e),c);return c}function r(){if(!G){G=E=!0;B.getModel().clear();B.getModel().setRoot(B.cloneCells([a.editor.graph.getModel().getRoot()])[0]);
|
||||
B.maxFitScale=1;B.fit(8);B.center();B.getModel().beginUpdate();try{for(var b in B.getModel().cells){var c=B.getModel().cells[b];if(B.getModel().isVertex(c)||B.getModel().isEdge(c))B.setCellStyles("opacity","0",[c]),B.setCellStyles("noLabel","1",[c])}}finally{B.getModel().endUpdate()}var d=p(a.editor.graph.getModel().getRoot(),B.getModel().getRoot()),f=y.value.split("\n"),l=0,n=function(){if(E&&l<f.length){var a=f[l].split(" ");if(0<a.length)if("wait"==a[0]&&1<a.length)window.setTimeout(function(){l++;
|
||||
n()},parseFloat(a[1]));else{if(1<a.length){var c=d[a[1]];null!=c?"show"==a[0]?(B.setCellStyles("opacity","100",[c]),B.setCellStyles("noLabel",null,[c]),2<a.length&&"fade"==a[2]?g(e([c])):m([c])):"hide"==a[0]&&k(e([c])):console.log("cell not found",b,f[l])}l++;n()}}else G=!1};n()}}var s=document.createElement("table");s.style.width="100%";s.style.height="100%";var q=document.createElement("tbody"),u=document.createElement("tr"),t=document.createElement("td");t.style.width="140px";var v=document.createElement("td"),
|
||||
z=document.createElement("tr");z.style.height="40px";var x=document.createElement("td");x.setAttribute("colspan","2");var y=document.createElement("textarea");y.style.overflow="auto";y.style.width="100%";y.style.height="100%";t.appendChild(y);var C=a.editor.graph.getModel().getRoot();null!=C.value&&"object"==typeof C.value&&(y.value=C.value.getAttribute("animation"));var A=document.createElement("div");A.style.border="1px solid lightGray";A.style.background="#ffffff";A.style.width="100%";A.style.height=
|
||||
"100%";A.style.overflow="auto";mxEvent.disableContextMenu(A);v.appendChild(A);var B=new Graph(A);B.setEnabled(!1);B.setPanning(!0);B.foldingEnabled=!1;B.panningHandler.ignoreCell=!0;B.panningHandler.useLeftButtonForPanning=!0;B.minFitScale=null;B.maxFitScale=null;B.centerZoom=!0;var E=!1,G=!1,A=mxUtils.button("Fade In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"show "+b[c].id+" fade\n";y.value+="wait 1000\n"}});x.appendChild(A);A=
|
||||
mxUtils.button("Wipe In",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"show "+b[c].id+"\n";y.value+="wait 1000\n"}});x.appendChild(A);A=mxUtils.button("Fade Out",function(){var b=a.editor.graph.getSelectionCells();if(0<b.length){for(var c=0;c<b.length;c++)y.value=y.value+"hide "+b[c].id+"\n";y.value+="wait 1000\n"}});x.appendChild(A);A=mxUtils.button("Wait",function(){y.value+="wait 1000\n"});x.appendChild(A);A=mxUtils.button("Preview",
|
||||
function(){r()});x.appendChild(A);A=mxUtils.button("Stop",function(){E=!1;B.getModel().clear()});x.appendChild(A);A=mxUtils.button("Apply",function(){a.editor.graph.setAttributeForCell(C,"animation",y.value)});x.appendChild(A);C=a.editor.graph.getModel().getRoot();u.appendChild(t);u.appendChild(v);q.appendChild(u);z.appendChild(x);q.appendChild(z);s.appendChild(q);this.window=new mxWindow("Animation",s,c,f,d,b,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);
|
||||
this.window.setClosable(!0);this.window.setVisible(!0)},AuthDialog=function(a,c,f,d){var b=document.createElement("div");b.style.textAlign="center";var e=document.createElement("p");e.style.fontSize="16pt";e.style.padding="0px";e.style.margin="0px";e.style.color="gray";mxUtils.write(e,mxResources.get("authorizationRequired"));var g="Unknown",k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.marginRight="10px";c==a.drive?(g=mxResources.get("googleDrive"),
|
||||
k.src=IMAGE_PATH+"/google-drive-logo-white.svg"):c==a.dropbox?(g=mxResources.get("dropbox"),k.src=IMAGE_PATH+"/dropbox-logo-white.svg"):c==a.oneDrive&&(g=mxResources.get("oneDrive"),k.src=IMAGE_PATH+"/onedrive-logo-white.svg");c=document.createElement("p");mxUtils.write(c,mxResources.get("authorizeThisAppIn",[g]));var l=document.createElement("input");l.setAttribute("type","checkbox");g=mxUtils.button(mxResources.get("authorize"),function(){a.hideDialog(!1);d(l.checked)});g.insertBefore(k,g.firstChild);
|
||||
g.style.marginTop="6px";g.className="geBigButton";b.appendChild(e);b.appendChild(c);b.appendChild(g);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(l),e=document.createElement("span"),mxUtils.write(e," "+mxResources.get("rememberMe")),f.appendChild(e),b.appendChild(f),l.checked=!0,l.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)}));this.container=b},MoreShapesDialog=function(a,c,f){f=null!=f?f:a.sidebar.entries;var d=document.createElement("div");
|
||||
if(c){c=document.createElement("div");c.className="geDialogTitle";mxUtils.write(c,mxResources.get("shapes"));c.style.position="absolute";c.style.top="0px";c.style.left="0px";c.style.lineHeight="40px";c.style.height="40px";c.style.right="0px";mxClient.IS_QUIRKS&&(c.style.width="718px");var b=document.createElement("div"),e=document.createElement("div");b.style.position="absolute";b.style.top="40px";b.style.left="0px";b.style.width="202px";b.style.bottom="60px";b.style.overflow="auto";mxClient.IS_QUIRKS&&
|
||||
(b.style.height="437px",b.style.marginTop="1px");e.style.position="absolute";e.style.left="202px";e.style.right="0px";e.style.top="40px";e.style.bottom="60px";e.style.overflow="auto";e.style.borderLeft="1px solid rgb(211, 211, 211)";e.style.textAlign="center";mxClient.IS_QUIRKS&&(e.style.width=parseInt(c.style.width)-202+"px",e.style.height=b.style.height,e.style.marginTop=b.style.marginTop);var g=null,k=[],l=document.createElement("div");l.style.position="relative";l.style.left="0px";l.style.right=
|
||||
"0px";for(var n=0;n<f.length;n++)(function(c){var d=l.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor="#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,c.title);b.appendChild(d);for(var f=0;f<c.entries.length;f++)(function(c){var d=l.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.checked=a.sidebar.isEntryVisible(c.id);m.defaultChecked=m.checked;d.appendChild(m);mxUtils.write(d,
|
||||
|
@ -7398,7 +7411,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 s=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,n){if(null!=c&&null==mxMarker.markers[c]){var m=this.getPackageForType(c);null!=m&&mxStencilRegistry.getStencil(m)}return s.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.0.1.8";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.plusImage=!mxClient.IS_SVG?IMAGE_PATH+"/plus.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII\x3d";
|
||||
[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 s=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,n){if(null!=c&&null==mxMarker.markers[c]){var m=this.getPackageForType(c);null!=m&&mxStencilRegistry.getStencil(m)}return s.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.0.2.1";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.plusImage=!mxClient.IS_SVG?IMAGE_PATH+"/plus.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII\x3d";
|
||||
EditorUi.spinImage=!mxClient.IS_SVG?IMAGE_PATH+"/spin.gif":"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw\x3d\x3d";
|
||||
EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
|
||||
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;(function(){EditorUi.prototype.useCanvasForExport=!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(d){}};
|
||||
|
@ -7467,42 +7480,43 @@ EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=t
|
|||
"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0<d&&(c=c.substring(0,d));c+=".png";d=this.createPngDataUri(a,b);this.saveLocalFile(d.substring(d.lastIndexOf(",")+1),c,"image/png",!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==
|
||||
typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d){if(window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(c),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",
|
||||
!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else if(!this.isOffline()&&mxClient.IS_SF)a="undefined"===typeof pako?"\x26xml\x3d"+encodeURIComponent(a):"\x26data\x3d"+encodeURIComponent(this.editor.graph.compress(a)),(new mxXmlRequest(SAVE_URL,"mime\x3d"+c+"\x26filename\x3d"+encodeURIComponent(b)+
|
||||
a)).simulate(document,"_blank");else{var e=document.createElement("a");e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));e.download=b;document.body.appendChild(e);mxClient.IS_SF&&e.setAttribute("target","_blank");try{e.click(),window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.parentNode.removeChild(e)}catch(f){}}};EditorUi.prototype.saveLocalFile=function(a,b,c,d){if(this.isOfflineApp()||this.isOffline())this.doSaveLocalFile(a,b,c,d);else{var e=!mxClient.IS_IOS||
|
||||
!navigator.standalone,f="function"===typeof window.DriveClient||"function"===typeof window.DropboxClient||"function"===typeof window.OneDriveClient;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f="undefined"===typeof pako?"\x26xml\x3d"+encodeURIComponent(a):"\x26data\x3d"+encodeURIComponent(this.editor.graph.compress(a));(new mxXmlRequest(SAVE_URL,"mime\x3d"+c+f)).simulate(document,"_blank")}else window.open("data:"+
|
||||
c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a)));else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(g){this.handleError(g)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e);this.showDialog(b.container,380,f?280:160,!0,!0);b.init()}};EditorUi.prototype.saveData=function(a,b,c,d){this.isLocalFileSave()?this.saveLocalFile(c,
|
||||
a,d):this.saveRequest(c,a,b,mxUtils.bind(this,function(a,d){var e="undefined"===typeof pako?"\x26xml\x3d"+encodeURIComponent(c):"\x26data\x3d"+encodeURIComponent(this.editor.graph.compress(c));return new mxXmlRequest(SAVE_URL,"format\x3d"+b+(null!=a?"\x26filename\x3d"+encodeURIComponent(a):"")+e)}))};EditorUi.prototype.saveRequest=function(a,b,c,d){a=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if("_blank"==b||null!=a&&0<a.length){var e=d("_blank"==
|
||||
b?null:a,b==App.MODE_DEVICE||null==b||"_blank"==b?"0":"1");b==App.MODE_DEVICE||"_blank"==b?e.simulate(document,"_blank"):this.pickFolder(b,mxUtils.bind(this,function(d){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200>e.getStatus()||299<e.getStatus())this.handleError({message:mxResources.get("errorSavingFile")});else try{var f="pdf"==c?"application/pdf":"image/"+c;this.exportFile(e.getText(),a,f,!0,b,d)}catch(g){this.handleError(g)}}),
|
||||
function(a){this.spinner.stop();this.handleError(a)})}))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,a);this.showDialog(b.container,380,270,!0,!0);b.init()};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&!1==b&&(g="#ffffff");var q=this.editor.graph.getSvg(g,
|
||||
a,null,null,null,c);d&&this.editor.addSvgShadow(q);a=this.getCurrentFile();var u=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=u.lastIndexOf(".");0<a&&(u=u.substring(0,a));u+=".svg";if(this.spinner.spin(document.body,mxResources.get("export"))){var t=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c));var b='\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+
|
||||
mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,q,!1,mxUtils.bind(this,function(){f?this.convertImages(q,t):t(q)}))}};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=this.editor.graph,e=document.createElement("div");e.style.padding="6px";var f=document.createElement("input");
|
||||
f.style.marginRight="8px";f.setAttribute("type","checkbox");d.isSelectionEmpty()&&f.setAttribute("disabled","disabled");e.appendChild(f);mxUtils.write(e,mxResources.get("selectionOnly"));mxUtils.br(e);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";e.appendChild(g);mxUtils.write(e,mxResources.get("includeCopyOfMyDiagram"));a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!f.checked,
|
||||
g.checked)}),null,a,b);this.showDialog(a.container,300,120,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d){var e=this.editor.graph,f=document.createElement("div");f.style.paddingTop="20px";f.style.paddingRight="8px";var g=document.createElement("input");g.style.marginRight="8px";g.setAttribute("type","checkbox");if(e.background==mxConstants.NONE||null==e.background)g.setAttribute("checked","checked"),g.defaultChecked=!0;f.appendChild(g);mxUtils.write(f,mxResources.get("transparentBackground"));
|
||||
mxUtils.br(f);var q=document.createElement("input");q.style.marginTop="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");e.isSelectionEmpty()&&q.setAttribute("disabled","disabled");f.appendChild(q);mxUtils.write(f,mxResources.get("selectionOnly"));mxUtils.br(f);var u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");f.appendChild(u);mxUtils.write(f,mxResources.get("shadow"));mxUtils.br(f);e.shadowVisible&&(u.setAttribute("checked",
|
||||
"checked"),u.defaultChecked=!0);var t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&t.setAttribute("disabled","disabled");a&&(f.appendChild(t),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f));var v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");v.style.marginBottom="8px";v.setAttribute("checked","checked");
|
||||
v.defaultChecked=!0;f.appendChild(v);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,!q.checked,u.checked,v.checked,t.checked)}),mxResources.get("zoom")+" (%)",null,f,!this.isOffline()?c:null);this.showDialog(b.container,320,a?266:240,!0,!0);b.init()};EditorUi.prototype.uploadToGithub=function(a,b,c){var d=this.spinner.pause();c=document.createElement("div");c.style.paddingTop="20px";c.style.paddingRight="8px";
|
||||
var e=document.createElement("table"),f=document.createElement("tbody"),g=document.createElement("tr"),q=document.createElement("td"),u=document.createElement("input");u.setAttribute("type","text");mxUtils.write(q,"Username:");g.appendChild(q);q=q.cloneNode(!1);q.appendChild(u);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),t=document.createElement("input");t.setAttribute("type","password");mxUtils.write(q,"Password:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(t);
|
||||
g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),v=document.createElement("input");v.setAttribute("type","text");mxUtils.write(q,"Organisation:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(v);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),z=document.createElement("input");z.setAttribute("type","text");mxUtils.write(q,"Repository:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(z);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),x=
|
||||
document.createElement("input");x.setAttribute("type","text");mxUtils.write(q,"Path:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(x);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var y=a.lastIndexOf(".");0<y&&(a=a.substring(0,y));x.value=a+".png";var C=document.createElement("input");C.setAttribute("type","text");mxUtils.write(q,"Branch/Tag:");C.value="master";g=g.cloneNode(!1);g.appendChild(q);
|
||||
q=q.cloneNode(!1);q.appendChild(C);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),A=document.createElement("input");A.setAttribute("type","text");mxUtils.write(q,"Message:");A.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(A);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);e.appendChild(f);c.appendChild(e);c=new FilenameDialog(this,null,mxResources.get("publish"),mxUtils.bind(this,function(){var a="https://api.github.com/repos/"+v.value+"/"+
|
||||
z.value+"/contents/"+x.value+"?ref\x3d"+encodeURIComponent(C.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());var e={path:x.value,message:A.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+v.value+"/"+z.value+"/blob/"+C.value+"/"+x.value;var b=
|
||||
new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(u.value+
|
||||
":"+t.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c,d){var e=this.spinner.pause(),f=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
|
||||
b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){e();var f=null!=a.getTitle()?a.getTitle():this.defaultFilename,g=f.lastIndexOf("."),u=f;0<g&&(u=f=u.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:u+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),t=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
|
||||
try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText()),e="https://www.draw.io/i/"+b.data.id;try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(g){}var k=mxUtils.bind(this,function(){this.spinner.stop();
|
||||
var a="https://imgur.com/"+b.data.id,f="https://www.draw.io/imgur?delete\x3d"+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),(c?mxResources.get("viewUrl",['\x3ca href\x3d"'+e+'" target\x3d"_blank"\x3e'+e+"\x3c/a\x3e"])+"\x3cbr\x3e":"")+mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[f]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),
|
||||
function(){d(b.data.id,c)},!1);this.showDialog(a.container,340,180,!0,!1);a.init()});if(c){var l=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:mxResources.get("viewUrl",[e])}),"POST");l.send(mxUtils.bind(this,function(){200==l.getStatus()?k():t(l)}),mxUtils.bind(this,function(){t(l)}))}else k()}catch(p){this.handleError(p)}else t(a)}),mxUtils.bind(this,function(a){t(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,
|
||||
b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e,f,g,q){d=parseInt(d);if(!isNaN(d)&&0<d){d/=100;var u=this.editor.graph.isSelectionEmpty();f=null!=f?f:u;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=q?this.getFileData(!0,null,null,null,f):null,g=this.createPngDataUri(d,
|
||||
e);a(c,g.substring(g.lastIndexOf(",")+1),q,b)}catch(m){this.handleError(m)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(t){this.handleError(t)}}})):this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*
|
||||
f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var q=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));q.send(mxUtils.bind(this,function(){200==q.getStatus()?a(c,q.getText(),e,b):this.handleError(q)}))}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);
|
||||
if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&
|
||||
(g=null));b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':
|
||||
"")+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e){if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c):null)}catch(b){"Invalid image"==b.message?this.downloadFile("png"):this.handleError(b)}}),null,null,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),
|
||||
null,c,a||1,b,d)}catch(g){this.spinner.stop(),this.handleError(g)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,u,t,v,z){f=null!=f?f:!0;z=null!=z?z:this.editor.graph;var x=u?null:z.background;x==mxConstants.NONE&&(x=null);null==x&&(x=d);null==x&&!1==u&&(x="#ffffff");this.convertImages(z.getSvg(x,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),
|
||||
n=parseInt(c.getAttribute("height"));q=null!=q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*n),b/g)));e.setAttribute("width",Math.ceil(q*g));e.setAttribute("height",Math.ceil(q*n));g=e.getContext("2d");g.scale(q,q);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.addSvgShadow(c),this.convertMath(z,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=
|
||||
new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var n=a.getElementsByTagName(c),
|
||||
t=0;t<n.length;t++)mxUtils.bind(this,function(c){var n=d.convert(c.getAttribute(g));if(null!=n&&"data:"!=n.substring(0,5)){var t=f[n];null==t?(e++,this.convertImageToDataUri(n,function(d){null!=d&&(f[n]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,t)}})(n[t])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});
|
||||
else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),u=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=u&&"mxfile"==u.nodeName&&null!=this.pages){var t=u.getElementsByTagName("diagram");
|
||||
if(1==t.length)u=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(t[0]))).documentElement;else if(1<t.length){g.model.beginUpdate();try{for(var v=0;v<t.length;v++){var z=this.updatePageRoot(new DiagramPage(t[v])),x=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[x+1]));g.model.execute(new ChangePage(this,z,z,x))}}finally{g.model.endUpdate()}}}if(null!=u&&"mxGraphModel"===u.nodeName){var y=new mxGraphModel;(new mxCodec(u.ownerDocument)).decode(u,y);var C=y.getChildCount(y.getRoot());
|
||||
a)).simulate(document,"_blank");else{var e=document.createElement("a");e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));e.download=b;document.body.appendChild(e);mxClient.IS_SF&&e.setAttribute("target","_blank");try{e.click(),window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.parentNode.removeChild(e)}catch(f){}}};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var q=1024*g,u=
|
||||
Math.min(q+1024,d),t=Array(u-q),v=0;q<u;++v,++q)t[v]=c[q].charCodeAt(0);f[g]=new Uint8Array(t)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d){if(this.isOfflineApp()||this.isOffline())this.doSaveLocalFile(a,b,c,d);else{var e=!mxClient.IS_IOS||!navigator.standalone,f="function"===typeof window.DriveClient||"function"===typeof window.DropboxClient||"function"===typeof window.OneDriveClient;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(mxClient.IS_EDGE||
|
||||
11==document.documentMode||10==document.documentMode){var f="undefined"===typeof pako?"\x26xml\x3d"+encodeURIComponent(a):"\x26data\x3d"+encodeURIComponent(this.editor.graph.compress(a));(new mxXmlRequest(SAVE_URL,"mime\x3d"+c+f)).simulate(document,"_blank")}else window.open("data:"+c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a)));else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(g){this.handleError(g)}}),
|
||||
mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e);this.showDialog(b.container,380,f?280:160,!0,!0);b.init()}};EditorUi.prototype.saveData=function(a,b,c,d){this.isLocalFileSave()?this.saveLocalFile(c,a,d):this.saveRequest(c,a,b,mxUtils.bind(this,function(a,d){var e="undefined"===typeof pako?"\x26xml\x3d"+encodeURIComponent(c):"\x26data\x3d"+encodeURIComponent(this.editor.graph.compress(c));return new mxXmlRequest(SAVE_URL,"format\x3d"+
|
||||
b+(null!=a?"\x26filename\x3d"+encodeURIComponent(a):"")+e)}))};EditorUi.prototype.saveRequest=function(a,b,c,d){a=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if("_blank"==b||null!=a&&0<a.length){var e=d("_blank"==b?null:a,b==App.MODE_DEVICE||null==b||"_blank"==b?"0":"1");b==App.MODE_DEVICE||"_blank"==b?e.simulate(document,"_blank"):this.pickFolder(b,mxUtils.bind(this,function(d){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,
|
||||
function(){this.spinner.stop();if(200>e.getStatus()||299<e.getStatus())this.handleError({message:mxResources.get("errorSavingFile")});else try{var f="pdf"==c?"application/pdf":"image/"+c;this.exportFile(e.getText(),a,f,!0,b,d)}catch(g){this.handleError(g)}}),function(a){this.spinner.stop();this.handleError(a)})}))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,a);this.showDialog(b.container,380,270,!0,!0);b.init()};EditorUi.prototype.exportFile=
|
||||
function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&!1==b&&(g="#ffffff");var q=this.editor.graph.getSvg(g,a,null,null,null,c);d&&this.editor.addSvgShadow(q);a=this.getCurrentFile();var u=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=u.lastIndexOf(".");0<a&&(u=u.substring(0,
|
||||
a));u+=".svg";if(this.spinner.spin(document.body,mxResources.get("export"))){var t=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c));var b='\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
|
||||
mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,q,!1,mxUtils.bind(this,function(){f?this.convertImages(q,t):t(q)}))}};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=this.editor.graph,e=document.createElement("div");e.style.padding="6px";var f=document.createElement("input");f.style.marginRight="8px";f.setAttribute("type","checkbox");d.isSelectionEmpty()&&f.setAttribute("disabled","disabled");e.appendChild(f);mxUtils.write(e,mxResources.get("selectionOnly"));
|
||||
mxUtils.br(e);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";e.appendChild(g);mxUtils.write(e,mxResources.get("includeCopyOfMyDiagram"));a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,120,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d){var e=this.editor.graph,f=document.createElement("div");
|
||||
f.style.paddingTop="20px";f.style.paddingRight="8px";var g=document.createElement("input");g.style.marginRight="8px";g.setAttribute("type","checkbox");if(e.background==mxConstants.NONE||null==e.background)g.setAttribute("checked","checked"),g.defaultChecked=!0;f.appendChild(g);mxUtils.write(f,mxResources.get("transparentBackground"));mxUtils.br(f);var q=document.createElement("input");q.style.marginTop="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");e.isSelectionEmpty()&&q.setAttribute("disabled",
|
||||
"disabled");f.appendChild(q);mxUtils.write(f,mxResources.get("selectionOnly"));mxUtils.br(f);var u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");f.appendChild(u);mxUtils.write(f,mxResources.get("shadow"));mxUtils.br(f);e.shadowVisible&&(u.setAttribute("checked","checked"),u.defaultChecked=!0);var t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");(this.isOffline()||
|
||||
!this.canvasSupported)&&t.setAttribute("disabled","disabled");a&&(f.appendChild(t),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f));var v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");v.style.marginBottom="8px";v.setAttribute("checked","checked");v.defaultChecked=!0;f.appendChild(v);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,
|
||||
!q.checked,u.checked,v.checked,t.checked)}),mxResources.get("zoom")+" (%)",null,f,!this.isOffline()?c:null);this.showDialog(b.container,320,a?266:240,!0,!0);b.init()};EditorUi.prototype.uploadToGithub=function(a,b,c){var d=this.spinner.pause();c=document.createElement("div");c.style.paddingTop="20px";c.style.paddingRight="8px";var e=document.createElement("table"),f=document.createElement("tbody"),g=document.createElement("tr"),q=document.createElement("td"),u=document.createElement("input");u.setAttribute("type",
|
||||
"text");mxUtils.write(q,"Username:");g.appendChild(q);q=q.cloneNode(!1);q.appendChild(u);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),t=document.createElement("input");t.setAttribute("type","password");mxUtils.write(q,"Password:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(t);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),v=document.createElement("input");v.setAttribute("type","text");mxUtils.write(q,"Organisation:");g=g.cloneNode(!1);g.appendChild(q);q=
|
||||
q.cloneNode(!1);q.appendChild(v);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),z=document.createElement("input");z.setAttribute("type","text");mxUtils.write(q,"Repository:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(z);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),x=document.createElement("input");x.setAttribute("type","text");mxUtils.write(q,"Path:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(x);g.appendChild(q);f.appendChild(g);
|
||||
q=q.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var y=a.lastIndexOf(".");0<y&&(a=a.substring(0,y));x.value=a+".png";var C=document.createElement("input");C.setAttribute("type","text");mxUtils.write(q,"Branch/Tag:");C.value="master";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(C);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),A=document.createElement("input");A.setAttribute("type","text");mxUtils.write(q,"Message:");
|
||||
A.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(A);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);e.appendChild(f);c.appendChild(e);c=new FilenameDialog(this,null,mxResources.get("publish"),mxUtils.bind(this,function(){var a="https://api.github.com/repos/"+v.value+"/"+z.value+"/contents/"+x.value+"?ref\x3d"+encodeURIComponent(C.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());
|
||||
var e={path:x.value,message:A.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+v.value+"/"+z.value+"/blob/"+C.value+"/"+x.value;var b=new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,
|
||||
function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(u.value+":"+t.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();
|
||||
this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c,d){var e=this.spinner.pause(),f=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,
|
||||
function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){e();var f=null!=a.getTitle()?a.getTitle():this.defaultFilename,g=f.lastIndexOf("."),u=f;0<g&&(u=f=u.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:u+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),t=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});
|
||||
g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText()),e="https://www.draw.io/i/"+b.data.id;try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(g){}var k=mxUtils.bind(this,function(){this.spinner.stop();var a="https://imgur.com/"+b.data.id,f="https://www.draw.io/imgur?delete\x3d"+b.data.deletehash,
|
||||
a=new ErrorDialog(this,mxResources.get("published"),(c?mxResources.get("viewUrl",['\x3ca href\x3d"'+e+'" target\x3d"_blank"\x3e'+e+"\x3c/a\x3e"])+"\x3cbr\x3e":"")+mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[f]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),function(){d(b.data.id,c)},!1);this.showDialog(a.container,340,180,!0,!1);a.init()});if(c){var l=
|
||||
new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:mxResources.get("viewUrl",[e])}),"POST");l.send(mxUtils.bind(this,function(){200==l.getStatus()?k():t(l)}),mxUtils.bind(this,function(){t(l)}))}else k()}catch(p){this.handleError(p)}else t(a)}),mxUtils.bind(this,function(a){t(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,
|
||||
mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e,f,g,q){d=parseInt(d);if(!isNaN(d)&&0<d){d/=100;var u=this.editor.graph.isSelectionEmpty();f=null!=f?f:u;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=q?this.getFileData(!0,null,null,null,f):null,g=this.createPngDataUri(d,e);a(c,g.substring(g.lastIndexOf(",")+1),q,b)}catch(m){this.handleError(m)}}),
|
||||
null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(t){this.handleError(t)}}})):this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var q=new mxXmlRequest(EXPORT_URL,
|
||||
"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));q.send(mxUtils.bind(this,function(){200==q.getStatus()?a(c,q.getText(),e,b):this.handleError(q)}))}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+
|
||||
" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",
|
||||
encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};
|
||||
EditorUi.prototype.exportImage=function(a,b,c,d,e){if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c):null)}catch(b){"Invalid image"==b.message?this.downloadFile("png"):this.handleError(b)}}),null,null,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,
|
||||
d)}catch(g){this.spinner.stop(),this.handleError(g)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,u,t,v,z){f=null!=f?f:!0;z=null!=z?z:this.editor.graph;var x=u?null:z.background;x==mxConstants.NONE&&(x=null);null==x&&(x=d);null==x&&!1==u&&(x="#ffffff");this.convertImages(z.getSvg(x,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));
|
||||
q=null!=q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*n),b/g)));e.setAttribute("width",Math.ceil(q*g));e.setAttribute("height",Math.ceil(q*n));g=e.getContext("2d");g.scale(q,q);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.addSvgShadow(c),this.convertMath(z,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();
|
||||
var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var n=a.getElementsByTagName(c),t=0;t<n.length;t++)mxUtils.bind(this,
|
||||
function(c){var n=d.convert(c.getAttribute(g));if(null!=n&&"data:"!=n.substring(0,5)){var t=f[n];null==t?(e++,this.convertImageToDataUri(n,function(d){null!=d&&(f[n]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,t)}})(n[t])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=
|
||||
document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),u=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=u&&"mxfile"==u.nodeName&&null!=this.pages){var t=u.getElementsByTagName("diagram");if(1==t.length)u=
|
||||
mxUtils.parseXml(g.decompress(mxUtils.getTextContent(t[0]))).documentElement;else if(1<t.length){g.model.beginUpdate();try{for(var v=0;v<t.length;v++){var z=this.updatePageRoot(new DiagramPage(t[v])),x=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[x+1]));g.model.execute(new ChangePage(this,z,z,x))}}finally{g.model.endUpdate()}}}if(null!=u&&"mxGraphModel"===u.nodeName){var y=new mxGraphModel;(new mxCodec(u.ownerDocument)).decode(u,y);var C=y.getChildCount(y.getRoot());
|
||||
g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<C;v++){var A=y.getChildAt(y.getRoot(),v);if(1==C&&!g.isCellLocked(g.getDefaultParent()))var B=y.getChildren(A),f=f.concat(g.importCells(B,b,c,g.getDefaultParent(),null,a));else A=g.importCells([A],0,0,g.model.getRoot(),null,a)[0],B=g.model.getChildren(A),g.moveCells(B,b,c),f=f.concat(B)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var E=g.getBoundingBoxFromGeometry(f,!0);null!=E&&g.moveCells(f,b-E.x,c-E.y)}}finally{g.model.endUpdate()}}}}catch(G){throw e||
|
||||
this.handleError(G,mxResources.get("invalidOrMissingFile")),G;}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200==a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if(!this.isOffline()&&
|
||||
(e||"data:"==a.substring(0,5)||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var q=this.extractGraphModelFromPng(a),u=this.importXml(q,b,c,f,!0);if(0<u.length)return u}if("data:image/svg+xml;"==a.substring(0,19))try{if(q=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),u=this.importXml(q,
|
||||
|
@ -7528,15 +7542,15 @@ function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&2
|
|||
16&255,(u^4294967295)>>8&255,(u^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+u);d=f(a,u);f(a,4)}while(u);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),
|
||||
"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=
|
||||
c);d.src=a};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);var a=this.editor.graph,c=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);"undefined"!==typeof ExportDialog&&this.isLocalFileSave()&&(c=this,ExportDialog.saveLocalFile=function(a,b,d){var e="text/xml";"svg"===d&&(e="image/svg+xml");c.saveLocalFile(a,b,e)},ExportDialog.saveRequest=function(a,b,d,e){c.saveRequest(a,b,d,e)});this.defaultFilename=mxResources.get("untitledDiagram");
|
||||
var d=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==a?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:d.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=c.defaultFilename,b=c.getCurrentFile();null!=b&&(a=null!=b.getTitle()?b.getTitle():a);return a};var e=this.actions.get("print");e.setEnabled(!mxClient.IS_IOS||!navigator.standalone);e.visible=e.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
|
||||
!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===
|
||||
c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),!1);var f=document.createElement("div");
|
||||
f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,0);f.style.width="1px";f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&
|
||||
null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!g)f.style.left=a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();
|
||||
document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&(null==this.dialog&&null!=a.container)&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&
|
||||
(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML="\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=
|
||||
this.createSpinner(document.body.clientWidth/2-2,e,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();
|
||||
a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
|
||||
var d=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==a?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:d.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=c.defaultFilename,b=c.getCurrentFile();null!=b&&(a=null!=b.getTitle()?b.getTitle():a);return a};var e=this.actions.get("print");e.setEnabled(!mxClient.IS_IOS||!navigator.standalone);e.visible=e.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(70,
|
||||
!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,
|
||||
d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),
|
||||
!1);var f=document.createElement("div");f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,0);f.style.width="1px";f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&
|
||||
a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!g)f.style.left=a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML=
|
||||
"\x26nbsp;";f.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&(null==this.dialog&&null!=a.container)&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,
|
||||
function(b){a.isEnabled()&&(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML="\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||
|
||||
0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,e,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);
|
||||
a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
|
||||
/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,
|
||||
"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){e=document.getElementById("geFooter");null!=e&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity=
|
||||
"0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),e.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility=
|
||||
|
@ -7616,7 +7630,7 @@ function(a,b){var c,d,e;return d=a.indexOf("#"),-1!==d&&(a=a.substring(0,d)),e=a
|
|||
document.title,b.substring(0,a))):window.location.hash=""},a}(),m.AuthDriver.Redirect=function(a){function b(a){b.__super__.constructor.call(this,a);this.receiverUrl=this.baseUrl(a)}return s(b,a),b.prototype.baseUrl=function(a){var b,c;if(c=m.AuthDriver.BrowserBase.currentLocation(),a){if(a.redirectUrl)return a.redirectUrl;if(a.redirectFile)return this.replaceUrlBasename(c,a.redirectFile)}return b=c.indexOf("#"),-1!==b&&(c=c.substring(0,b)),c},b.prototype.url=function(){return this.receiverUrl},b.prototype.doAuthorize=
|
||||
function(a,b,c){return this.storeCredentials(c.credentials(),function(){return window.location.assign(a)})},b.prototype.resumeAuthorize=function(a,b,c){var d;return this.locationStateParam()===a?(d=m.AuthDriver.BrowserBase.currentLocation(),m.AuthDriver.BrowserBase.cleanupLocation(),c(m.Util.Oauth.queryParamsFromUrl(d))):this.forgetCredentials(function(){return c({error:"Authorization error"})})},b}(m.AuthDriver.BrowserBase),m.AuthDriver.Popup=function(a){function b(a){b.__super__.constructor.call(this,
|
||||
a);this.receiverUrl=this.baseUrl(a)}return s(b,a),b.prototype.url=function(){return this.receiverUrl},b.prototype.doAuthorize=function(a,b,c,d){return this.listenForMessage(b,d),this.openWindow(a)},b.prototype.baseUrl=function(a){var b;if(b=m.AuthDriver.BrowserBase.currentLocation(),a){if(a.receiverUrl)return a.receiverUrl;if(a.receiverFile)return this.replaceUrlBasename(b,a.receiverFile)}return b},b.prototype.openWindow=function(a){return window.open(a,"_dropboxOauthSigninWindow",this.popupWindowSpec(980,
|
||||
700))},b.prototype.popupWindowSpec=function(a,b){var c,d,e,f,g,k,l,n,m,p;return g=null!=(l=window.screenX)?l:window.screenLeft,k=null!=(n=window.screenY)?n:window.screenTop,f=null!=(m=window.outerWidth)?m:document.documentElement.clientWidth,c=null!=(p=window.outerHeight)?p:document.documentElement.clientHeight,d=Math.round(g+(f-a)/2),e=Math.round(k+(c-b)/2.5),g>d&&(d=g),k>e&&(e=k),"width\x3d"+a+",height\x3d"+b+","+("left\x3d"+d+",top\x3d"+e)+"dialog\x3dyes,dependent\x3dyes,scrollbars\x3dyes,location\x3dyes"},
|
||||
700))},b.prototype.popupWindowSpec=function(a,b){var c,d,e,f,g,k,l,m,n,p;return g=null!=(l=window.screenX)?l:window.screenLeft,k=null!=(m=window.screenY)?m:window.screenTop,f=null!=(n=window.outerWidth)?n:document.documentElement.clientWidth,c=null!=(p=window.outerHeight)?p:document.documentElement.clientHeight,d=Math.round(g+(f-a)/2),e=Math.round(k+(c-b)/2.5),g>d&&(d=g),k>e&&(e=k),"width\x3d"+a+",height\x3d"+b+","+("left\x3d"+d+",top\x3d"+e)+"dialog\x3dyes,dependent\x3dyes,scrollbars\x3dyes,location\x3dyes"},
|
||||
b.prototype.listenForMessage=function(a,b){var c;return c=function(d){return function(e){var f;e=e.data?e.data:e;try{f=JSON.parse(e)._dropboxjs_oauth_info}catch(g){return}if(f)return d.locationStateParam(f)===a?(a=!1,window.removeEventListener("message",c),m.AuthDriver.Popup.onMessage.removeListener(c),b(m.Util.Oauth.queryParamsFromUrl(e))):void 0}}(this),window.addEventListener("message",c,!1),m.AuthDriver.Popup.onMessage.addListener(c)},b.locationOrigin=function(a){var b;return(b=/^(file:\/\/[^\?\#]*)(\?|\#|$)/.exec(a))?
|
||||
b[1]:(b=/^([^\:]+\:\/\/[^\/\?\#]*)(\/|\?|\#|$)/.exec(a),b?b[1]:a)},b.oauthReceiver=function(){window.addEventListener("load",function(){var a,b,c,d;if(d=window.location.href,a=JSON.stringify({_dropboxjs_oauth_info:d}),m.AuthDriver.BrowserBase.cleanupLocation(),b=window.opener,window.parent!==window.top&&(b||(b=window.parent)),b){try{c=window.location.origin||locationOrigin(d),b.postMessage(a,c),window.close()}catch(e){}try{return b.Dropbox.AuthDriver.Popup.onMessage.dispatch(a),window.close()}catch(f){}}})},
|
||||
b.onMessage=new m.Util.EventSource,b}(m.AuthDriver.BrowserBase),m.AuthDriver.ChromeBase=function(a){function b(a){b.__super__.constructor.call(this,a);this.storageKey="dropbox_js_"+this.scope+"_credentials"}return s(b,a),b.prototype.onAuthStepChange=function(a,b){switch(a.authStep){case m.Client.RESET:return this.loadCredentials(function(c){return c&&a.setCredentials(c),b()});case m.Client.DONE:return this.storeCredentials(a.credentials(),b);case m.Client.SIGNED_OUT:return this.forgetCredentials(b);
|
||||
|
@ -7958,8 +7972,7 @@ ChatWindow.prototype.collaboratorListener=function(a){var c=null;if(!a.collabora
|
|||
ChatWindow.prototype.htmlEscape=function(a){return a.replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;").replace(/"/g,"\x26quot;").replace(/'/g,"\x26#039;")};App=function(a,c,f){EditorUi.call(this,a,c,null!=f?f:"1"==urlParams.lightbox);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII\x3d":
|
||||
(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,c,d){var f=window.open(a);null==f||void 0===f?this.showDialog((new PopupDialog(this,a,c,d)).container,320,140,!0,!0):null!=c&&c()});this.updateUi();a=document.createElement("canvas");this.canvasSupported=!(!a.getContext||!a.getContext("2d"));window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.isOffline()||(EditDataDialog.placeholderHelpLink=
|
||||
"https://support.draw.io/questions/9338941");ColorDialog.recentColors=mxSettings.getRecentColors(ColorDialog.recentColors);this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[a])}window.Draw.loadPlugin=function(a){a(this)}}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";
|
||||
App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.DROPBOX_APPKEY="libwls2fa9szdji";
|
||||
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js",tags:"/plugins/tags.js",sql:"/plugins/sql.js",find:"/plugins/find.js"};
|
||||
App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.DROPBOX_APPKEY="libwls2fa9szdji";App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js"};
|
||||
App.getStoredMode=function(){var a=null;if("undefined"!=typeof Storage)for(var c=document.cookie.split(";"),f=0;f<c.length;f++){var d=mxUtils.trim(c[f]);if("MODE\x3d"==d.substring(0,5)){a=d.substring(5);break}}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&&("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&&(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("https://www.dropbox.com/static/api/1/dropins.js",null,"dropboxjs",App.DROPBOX_APPKEY):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=
|
||||
|
@ -8072,9 +8085,7 @@ App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){va
|
|||
"0px",this.shareButton.style.cssFloat="right",a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),
|
||||
this.shareButton=null)}};
|
||||
App.prototype.save=function(a,c){var f=this.getCurrentFile(),d=mxResources.get("saving");null!=f&&f.constructor==DriveFile&&(d=mxResources.get("createRevision"));if(null!=f&&this.spinner.spin(document.body,d)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(a){this.spinner.stop();this.getCurrentFile()==f&&(f.isModified()?f.isAutosave()||f.addUnsavedStatus():this.editor.setStatus(mxResources.get("allChangesSaved")));null!=c&&
|
||||
c()}),b=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==f.getTitle()?f.save(!0,d,b):f.saveAs(a,d,b)}};App.prototype.base64ToBlob=function(a,c){c=c||"";for(var f=atob(a),d=f.length,b=Math.ceil(d/1024),e=Array(b),g=0;g<b;++g){for(var k=1024*g,l=Math.min(k+1024,d),n=Array(l-k),m=0;k<l;++m,++k)n[m]=f[k].charCodeAt(0);e[g]=new Uint8Array(n)}return new Blob(e,{type:c})};
|
||||
App.prototype.saveRequest=function(a,c,f,d){a=!mxClient.IS_IOS||!navigator.standalone;c=new CreateDialog(this,c,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var g=d("_blank"==c?null:a,c==App.MODE_DEVICE||null==c||"_blank"==c?"0":"1");c==App.MODE_DEVICE||"_blank"==c?g.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();if(200>g.getStatus()||
|
||||
299<g.getStatus())this.handleError({message:mxResources.get("errorSavingFile")});else try{var l="pdf"==f?"application/pdf":"image/"+f;this.exportFile(g.getText(),a,l,!0,c,d)}catch(n){this.handleError(n)}}),function(a){this.spinner.stop();this.handleError(a)})}))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,a);this.showDialog(c.container,380,270,!0,!0);c.init()};
|
||||
c()}),b=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==f.getTitle()?f.save(!0,d,b):f.saveAs(a,d,b)}};
|
||||
App.prototype.pickFolder=function(a,c,f){(f=null!=f?f:!0)&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){if(a.action==google.picker.Action.PICKED){var b=null;null!=a.docs&&(0<a.docs.length&&"folder"==a.docs[0].type)&&(b=a.docs[0].id);c(b)}})):f&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){var b=null;null!=a&&(null!=a.data&&null!=a.data.folders&&0<a.data.folders.length)&&(b=a.data.folders[0].id,b=b.substring(b.lastIndexOf(".")+
|
||||
1),c(b))})):EditorUi.prototype.pickFolder.apply(this,arguments)};
|
||||
App.prototype.exportFile=function(a,c,f,d,b,e){b==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(c,d?this.base64ToBlob(a,f):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):b==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(c,a,e,mxUtils.bind(this,function(a){this.spinner.stop()}),
|
||||
|
@ -8129,14 +8140,16 @@ a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionC
|
|||
a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),g=0;g<m.length;g++){var k=m[g],l=a.copiedStyle[k];e.style[k]!=l&&d.setCellStyles(k,l,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,"Ctrl+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,320,
|
||||
170,!0,!0);b.init()}}));l=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return d.shadowVisible});a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){a.showDialog((new AboutDialog(a)).container,220,300,!0,!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){window.open("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});
|
||||
a.actions.addAction("support...",function(){window.open("https://support.draw.io/display/DO/draw.io+Online+Support")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP?window.open("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?window.open("shortcuts.svg"):window.open("https://www.draw.io/?chrome\x3d0\x26url\x3dhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});
|
||||
a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){window.open("https://www.youtube.com/watch?v\x3d8OaMWa4R1SE\x26t\x3d1")});if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],g=null;""!=e&&(g=b.addItem(e,null,
|
||||
mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(g,Editor.checkmarkImage));return g});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var p=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=p.apply(this,arguments);if(null!=
|
||||
b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='\x3cdiv class\x3d"geIcon geSprite geSprite-globe"/\x3e',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,
|
||||
c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var e=b.addItem("Search",null,null,c,null,null,!1),g=document.createElement("div");g.style.display="inline";g.innerHTML=':\x3cform style\x3d"display:inline;margin-left:8px;" id\x3d"rw_search_form"target\x3d"_blank" method\x3d"get" action\x3d"https://support.draw.io/dosearchsite.action"\x3e\x3cinput id\x3d"rw_search_query" type\x3d"text" name\x3d"queryString" size\x3d"25"\x3e\x3c/form\x3e';e.firstChild.nextSibling.appendChild(g);
|
||||
e.style.backgroundColor="whiteSmoke";e.style.cursor="default";var k=g.getElementsByTagName("form")[0],l=g.getElementsByTagName("input")[0];null!=l&&null!=k&&(mxEvent.addListener(k,"submit",function(){a.enableLogging&&((new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dhelpsearch:"+encodeURIComponent(l.value)+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION));window.setTimeout(function(){a.menubar.hideMenu()},0)}),mxEvent.addGestureListeners(e,
|
||||
function(a){document.activeElement!=l&&l.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)}),window.setTimeout(function(){l.focus()},0));this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support","-","about"])}"1"==urlParams.test&&(mxResources.parse("showBoundingBox\x3dShow bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,
|
||||
function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor\x3dnone;strokeColor\x3dred;")})),this.addMenuItems(b,["-","showBoundingBox"],c),mxResources.parse("testXmlImageExport\x3dXML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);
|
||||
e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var g=0,k=e.save;e.save=function(){g++;k.apply(this,arguments)};var l=e.restore;e.restore=function(){g--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);m.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),e);Math.ceil(1*b.width/c+2);Math.ceil(1*b.height/c+2);mxLog.show();mxLog.debug(mxUtils.getXml(f));
|
||||
a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){window.open("https://www.youtube.com/watch?v\x3d8OaMWa4R1SE\x26t\x3d1")});l=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,280,120),this.tagsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",
|
||||
function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));l=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,204,116),
|
||||
this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));if(mxClient.IS_CHROMEAPP||
|
||||
isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],g=null;""!=e&&(g=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(g,
|
||||
Editor.checkmarkImage));return g});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var p=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=p.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='\x3cdiv class\x3d"geIcon geSprite geSprite-globe"/\x3e',c.style.zIndex=
|
||||
"1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var e=b.addItem("Search",null,null,c,null,null,!1),g=document.createElement("div");g.style.display="inline";g.innerHTML=':\x3cform style\x3d"display:inline;margin-left:8px;" id\x3d"rw_search_form"target\x3d"_blank" method\x3d"get" action\x3d"https://support.draw.io/dosearchsite.action"\x3e\x3cinput id\x3d"rw_search_query" type\x3d"text" name\x3d"queryString" size\x3d"25"\x3e\x3c/form\x3e';
|
||||
e.firstChild.nextSibling.appendChild(g);e.style.backgroundColor="whiteSmoke";e.style.cursor="default";var k=g.getElementsByTagName("form")[0],l=g.getElementsByTagName("input")[0];null!=l&&null!=k&&(mxEvent.addListener(k,"submit",function(){a.enableLogging&&((new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dhelpsearch:"+encodeURIComponent(l.value)+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION));window.setTimeout(function(){a.menubar.hideMenu()},
|
||||
0)}),mxEvent.addGestureListeners(e,function(a){document.activeElement!=l&&l.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)}),window.setTimeout(function(){l.focus()},0));this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support","-","about"])}"1"==urlParams.test&&(mxResources.parse("showBoundingBox\x3dShow bounding box"),this.editorUi.actions.addAction("showBoundingBox",
|
||||
mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor\x3dnone;strokeColor\x3dred;")})),this.addMenuItems(b,["-","showBoundingBox"],c),mxResources.parse("testXmlImageExport\x3dXML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");
|
||||
e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var g=0,k=e.save;e.save=function(){g++;k.apply(this,arguments)};var l=e.restore;e.restore=function(){g--;l.apply(this,arguments)};var m=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);m.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),e);Math.ceil(1*b.width/c+2);Math.ceil(1*b.height/c+2);mxLog.show();mxLog.debug(mxUtils.getXml(f));
|
||||
mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],c),mxResources.parse("animation\x3dAnimation"),this.editorUi.actions.addAction("animation",mxUtils.bind(this,function(){null==this.animationWindow?(this.animationWindow=new AnimationWindow(this.editorUi,(document.body.offsetWidth-480)/2,120,640,480),this.animationWindow.window.setVisible(!0)):this.animationWindow.window.setVisible(!this.animationWindow.window.isVisible())})),this.addMenuItems(b,["animation"],c),mxResources.parse("testShowRtModel\x3dShow RT model"),
|
||||
mxResources.parse("testDebugRtModel\x3dDebug RT model"),mxResources.parse("testDownloadRtModel\x3dDownload RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),this.editorUi.actions.addAction("testDebugRtModel",
|
||||
mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&(null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export")))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;
|
||||
|
@ -8183,13 +8196,14 @@ null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):k
|
|||
this.put("openLibraryFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?
|
||||
b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),
|
||||
b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&(0<b.length&&a.spinner.spin(document.body,mxResources.get("loading")))&&mxUtils.get(PROXY_URL+"?url\x3d"+encodeURIComponent(b),function(c){if(200==c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(d){a.handleError(d,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},
|
||||
function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP)&&this.addLinkToItem(d,
|
||||
"https://support.draw.io/questions/10420280")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,
|
||||
["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/solution/articles/16000032875-how-to-use-mathematical-typesetting-")}this.addMenuItems(b,["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&"1"!=urlParams.embed?this.addMenuItems(b,["plugins","-","offline"],c):b.addSeparator(c);
|
||||
!a.isOffline()&&(!navigator.standalone&&"1"!=urlParams.embed)&&this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,
|
||||
["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?
|
||||
this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",
|
||||
b,c);this.addSubmenu("openLibraryFrom",b,c);null!=d&&(d.constructor==DriveFile||d.constructor==DropboxFile)&&this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);(!mxClient.IS_IOS||!navigator.standalone)&&this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=f}
|
||||
function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,
|
||||
(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);(!a.isOffline()||mxClient.IS_CHROMEAPP)&&this.addLinkToItem(d,"https://desk.draw.io/solution/articles/16000042367-how-to-use-the-scratchpad-")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&
|
||||
this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/solution/articles/16000032875-how-to-use-mathematical-typesetting-")}this.addMenuItems(b,
|
||||
["autosave","-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);!a.isOfflineApp()&&"1"!=urlParams.embed?(this.addMenuItems(b,["plugins","-"],c),d=this.addMenuItem(b,"tags",c),(!a.isOffline()||mxClient.IS_CHROMEAPP)&&this.addLinkToItem(d,"https://desk.draw.io/solution/articles/16000046966-how-to-use-tags"),this.addMenuItems(b,["-","offline"],c)):b.addSeparator(c);!a.isOffline()&&(!navigator.standalone&&"1"!=urlParams.embed)&&
|
||||
this.addMenuItems(b,["chromeApp"],c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],
|
||||
c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename",
|
||||
"makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",
|
||||
b,c);null!=d&&(d.constructor==DriveFile||d.constructor==DropboxFile)&&this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);(!mxClient.IS_IOS||!navigator.standalone)&&this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))}})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,c,f){this.ui=a;this.page=c;this.previous=f}
|
||||
RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,c,f){this.ui=a;this.oldIndex=c;this.newIndex=f}
|
||||
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,c){this.ui=a;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c))}
|
||||
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,c=this.ui.editor,f=c.graph,d=c.graph.compress(f.zapGremlins(mxUtils.getXml(c.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=f.getViewState();a.root=f.model.root;f.view.clear(a.root,!0);f.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;f.model.rootChanged(a.root);f.setViewState(a.viewState);
|
||||
|
|
169
war/js/atlas-viewer.min.js
vendored
169
war/js/atlas-viewer.min.js
vendored
File diff suppressed because one or more lines are too long
904
war/js/atlas.min.js
vendored
904
war/js/atlas.min.js
vendored
File diff suppressed because it is too large
Load diff
|
@ -151,7 +151,7 @@ App.pluginRegistry = {'4xAKTrabTpTzahoLthkwPNUn': '/plugins/explore.js',
|
|||
'acj': '/plugins/connectJira.js', 'voice': '/plugins/voice.js',
|
||||
'tips': '/plugins/tooltips.js', 'svgdata': '/plugins/svgdata.js',
|
||||
'doors': '/plugins/doors.js', 'electron': 'plugins/electron.js',
|
||||
'tags': '/plugins/tags.js', 'sql': '/plugins/sql.js', 'find': '/plugins/find.js'};
|
||||
'number': '/plugins/number.js', 'sql': '/plugins/sql.js'};
|
||||
|
||||
/**
|
||||
* Function: authorize
|
||||
|
@ -3518,105 +3518,6 @@ App.prototype.save = function(name, done)
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Translates this point by the given vector.
|
||||
*
|
||||
* @param {number} dx X-coordinate of the translation.
|
||||
* @param {number} dy Y-coordinate of the translation.
|
||||
*/
|
||||
App.prototype.base64ToBlob = function(base64Data, contentType)
|
||||
{
|
||||
contentType = contentType || '';
|
||||
var sliceSize = 1024;
|
||||
var byteCharacters = atob(base64Data);
|
||||
var bytesLength = byteCharacters.length;
|
||||
var slicesCount = Math.ceil(bytesLength / sliceSize);
|
||||
var byteArrays = new Array(slicesCount);
|
||||
|
||||
for (var sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex)
|
||||
{
|
||||
var begin = sliceIndex * sliceSize;
|
||||
var end = Math.min(begin + sliceSize, bytesLength);
|
||||
|
||||
var bytes = new Array(end - begin);
|
||||
|
||||
for (var offset = begin, i = 0 ; offset < end; ++i, ++offset)
|
||||
{
|
||||
bytes[i] = byteCharacters[offset].charCodeAt(0);
|
||||
}
|
||||
|
||||
byteArrays[sliceIndex] = new Uint8Array(bytes);
|
||||
}
|
||||
|
||||
return new Blob(byteArrays, {type: contentType});
|
||||
};
|
||||
|
||||
/**
|
||||
* Translates this point by the given vector.
|
||||
*
|
||||
* @param {number} dx X-coordinate of the translation.
|
||||
* @param {number} dy Y-coordinate of the translation.
|
||||
*/
|
||||
App.prototype.saveRequest = function(data, filename, format, fn)
|
||||
{
|
||||
var allowTab = !mxClient.IS_IOS || !navigator.standalone;
|
||||
|
||||
var dlg = new CreateDialog(this, filename, mxUtils.bind(this, function(newTitle, mode)
|
||||
{
|
||||
if (mode == '_blank' || newTitle != null && newTitle.length > 0)
|
||||
{
|
||||
var base64 = (mode == App.MODE_DEVICE || mode == null || mode == '_blank') ? '0' : '1';
|
||||
var xhr = fn((mode == '_blank') ? null : newTitle, base64);
|
||||
|
||||
if (mode == App.MODE_DEVICE || mode == '_blank')
|
||||
{
|
||||
xhr.simulate(document, '_blank');
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pickFolder(mode, mxUtils.bind(this, function(folderId)
|
||||
{
|
||||
if (this.spinner.spin(document.body, mxResources.get('saving')))
|
||||
{
|
||||
// LATER: Catch possible mixed content error
|
||||
// see http://stackoverflow.com/questions/30646417/catching-mixed-content-error
|
||||
xhr.send(mxUtils.bind(this, function()
|
||||
{
|
||||
this.spinner.stop();
|
||||
|
||||
if (xhr.getStatus() < 200 || xhr.getStatus() > 299)
|
||||
{
|
||||
this.handleError({message: mxResources.get('errorSavingFile')});
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
var mimeType = (format == 'pdf') ? 'application/pdf' : 'image/' + format;
|
||||
this.exportFile(xhr.getText(), newTitle, mimeType, true, mode, folderId);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
this.handleError(e);
|
||||
}
|
||||
}
|
||||
}), function(resp)
|
||||
{
|
||||
this.spinner.stop();
|
||||
this.handleError(resp);
|
||||
});
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}), mxUtils.bind(this, function()
|
||||
{
|
||||
this.hideDialog();
|
||||
}), mxResources.get('saveAs'), mxResources.get('download'), false, false, allowTab);
|
||||
this.showDialog(dlg.container, 380, 270, true, true);
|
||||
dlg.init();
|
||||
};
|
||||
|
||||
/**
|
||||
* Invokes callback with null if mode does not support folder or not null
|
||||
* if a valid folder was chosen for a mode that supports it. No callback
|
||||
|
|
|
@ -849,8 +849,8 @@ var EmbedHtmlDialog = function(editorUi)
|
|||
editCheckBox.setAttribute('checked', 'checked');
|
||||
editCheckBox.defaultChecked = true;
|
||||
editCheckBox.style.marginLeft = '10px';
|
||||
//options.appendChild(editCheckBox);
|
||||
//mxUtils.write(options, mxResources.get('edit'));
|
||||
options.appendChild(editCheckBox);
|
||||
mxUtils.write(options, mxResources.get('edit'));
|
||||
|
||||
var layersCheckBox = document.createElement('input');
|
||||
layersCheckBox.setAttribute('type', 'checkbox');
|
||||
|
@ -1021,7 +1021,7 @@ var EmbedHtmlDialog = function(editorUi)
|
|||
{
|
||||
var helpBtn = mxUtils.button(mxResources.get('help'), function()
|
||||
{
|
||||
window.open('https://support.draw.io/pages/viewpage.action?pageId=12878123');
|
||||
window.open('https://desk.draw.io/solution/articles/16000042542-how-to-embed-html-');
|
||||
});
|
||||
|
||||
helpBtn.className = 'geBtn';
|
||||
|
@ -1171,7 +1171,7 @@ var EmbedSvgDialog = function(editorUi, isImage)
|
|||
|
||||
var shadowCheckBox = document.createElement('input');
|
||||
shadowCheckBox.setAttribute('type', 'checkbox');
|
||||
shadowCheckBox.style.marginLeft = '30px';
|
||||
shadowCheckBox.style.marginLeft = '10px';
|
||||
|
||||
if (graph.shadowVisible)
|
||||
{
|
||||
|
@ -1187,7 +1187,7 @@ var EmbedSvgDialog = function(editorUi, isImage)
|
|||
|
||||
var imageCheckBox = document.createElement('input');
|
||||
imageCheckBox.setAttribute('type', 'checkbox');
|
||||
imageCheckBox.style.marginLeft = '30px';
|
||||
imageCheckBox.style.marginLeft = '10px';
|
||||
|
||||
if (!isImage)
|
||||
{
|
||||
|
@ -1197,7 +1197,7 @@ var EmbedSvgDialog = function(editorUi, isImage)
|
|||
|
||||
var retinaCheckBox = document.createElement('input');
|
||||
retinaCheckBox.setAttribute('type', 'checkbox');
|
||||
retinaCheckBox.style.marginLeft = '30px';
|
||||
retinaCheckBox.style.marginLeft = '10px';
|
||||
|
||||
if (isImage)
|
||||
{
|
||||
|
@ -1209,13 +1209,21 @@ var EmbedSvgDialog = function(editorUi, isImage)
|
|||
lightboxCheckBox.setAttribute('type', 'checkbox');
|
||||
lightboxCheckBox.setAttribute('checked', 'checked');
|
||||
lightboxCheckBox.defaultChecked = true;
|
||||
lightboxCheckBox.style.marginLeft = '30px';
|
||||
lightboxCheckBox.style.marginLeft = '10px';
|
||||
options.appendChild(lightboxCheckBox);
|
||||
mxUtils.write(options, mxResources.get('lightbox'));
|
||||
|
||||
var editCheckBox = document.createElement('input');
|
||||
editCheckBox.setAttribute('type', 'checkbox');
|
||||
editCheckBox.setAttribute('checked', 'checked');
|
||||
editCheckBox.defaultChecked = true;
|
||||
editCheckBox.style.marginLeft = '10px';
|
||||
options.appendChild(editCheckBox);
|
||||
mxUtils.write(options, mxResources.get('edit'));
|
||||
|
||||
var layersCheckBox = document.createElement('input');
|
||||
layersCheckBox.setAttribute('type', 'checkbox');
|
||||
layersCheckBox.style.marginLeft = '30px';
|
||||
layersCheckBox.style.marginLeft = '10px';
|
||||
|
||||
var model = editorUi.editor.graph.getModel();
|
||||
|
||||
|
@ -1250,7 +1258,8 @@ var EmbedSvgDialog = function(editorUi, isImage)
|
|||
{
|
||||
// KNOWN: Message passing does not seem to work in IE11
|
||||
onclick = " onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(" +
|
||||
"img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1&chrome=0&edit=_blank" +
|
||||
"img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1&chrome=0" +
|
||||
((editCheckBox.checked) ? "&edit=_blank" : "") +
|
||||
((layersCheckBox.checked) ? '&layers=1' : '') + "');}})(this);\"";
|
||||
css += 'cursor:pointer;';
|
||||
}
|
||||
|
@ -1388,7 +1397,8 @@ var EmbedSvgDialog = function(editorUi, isImage)
|
|||
{
|
||||
// KNOWN: Message passing does not seem to work in IE11
|
||||
onclick = "onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(" +
|
||||
"img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1&chrome=0&edit=_blank" +
|
||||
"img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1&chrome=0" +
|
||||
((editCheckBox.checked) ? "&edit=_blank" : "") +
|
||||
((layersCheckBox.checked) ? '&layers=1' : '') + "');}})(this);\"";
|
||||
css += 'cursor:pointer;';
|
||||
}
|
||||
|
@ -1423,7 +1433,8 @@ var EmbedSvgDialog = function(editorUi, isImage)
|
|||
"svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};" +
|
||||
"window.addEventListener('message',r);" +
|
||||
// Opens lightbox window
|
||||
"svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1&chrome=0&edit=_blank" +
|
||||
"svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1&chrome=0" +
|
||||
((editCheckBox.checked) ? "&edit=_blank" : "") +
|
||||
((layersCheckBox.checked) ? '&layers=1' : '') + "');}}})(this);";
|
||||
svgRoot.setAttribute('onclick', js);
|
||||
css += 'cursor:pointer;';
|
||||
|
@ -1470,6 +1481,7 @@ var EmbedSvgDialog = function(editorUi, isImage)
|
|||
mxEvent.addListener(shadowCheckBox, 'change', update);
|
||||
mxEvent.addListener(fitCheckBox, 'change', update);
|
||||
mxEvent.addListener(lightboxCheckBox, 'change', update);
|
||||
mxEvent.addListener(editCheckBox, 'change', update);
|
||||
mxEvent.addListener(layersCheckBox, 'change', update);
|
||||
|
||||
var buttons = document.createElement('div');
|
||||
|
@ -1480,7 +1492,7 @@ var EmbedSvgDialog = function(editorUi, isImage)
|
|||
{
|
||||
var helpBtn = mxUtils.button(mxResources.get('help'), function()
|
||||
{
|
||||
window.open('https://support.draw.io/pages/viewpage.action?pageId=12222606');
|
||||
window.open('https://desk.draw.io/solution/articles/16000042548-how-to-embed-svg-');
|
||||
});
|
||||
|
||||
helpBtn.className = 'geBtn';
|
||||
|
@ -6321,6 +6333,388 @@ var DraftDialog = function(editorUi, title, xml, editFn, discardFn, editLabel, d
|
|||
this.container = div;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
var FindWindow = function(ui, x, y, w, h)
|
||||
{
|
||||
var action = ui.actions.get('find');
|
||||
var graph = ui.editor.graph;
|
||||
var lastSearch = null;
|
||||
var lastFound = null;
|
||||
|
||||
var div = document.createElement('div');
|
||||
div.style.userSelect = 'none';
|
||||
div.style.overflow = 'hidden';
|
||||
div.style.padding = '10px';
|
||||
div.style.height = '100%';
|
||||
|
||||
var searchInput = document.createElement('input');
|
||||
searchInput.setAttribute('placeholder', mxResources.get('find'));
|
||||
searchInput.setAttribute('type', 'text');
|
||||
searchInput.style.marginTop = '4px';
|
||||
searchInput.style.width = '170px';
|
||||
searchInput.style.fontSize = '12px';
|
||||
searchInput.style.borderRadius = '4px';
|
||||
searchInput.style.padding = '6px';
|
||||
div.appendChild(searchInput);
|
||||
|
||||
var tmp = document.createElement('div');
|
||||
|
||||
function testMeta(re, cell)
|
||||
{
|
||||
if (typeof cell.value === 'object' && cell.value.attributes != null)
|
||||
{
|
||||
var attrs = cell.value.attributes;
|
||||
|
||||
for (var i = 0; i < attrs.length; i++)
|
||||
{
|
||||
if (attrs[i].nodeName != 'label' && re.test(attrs[i].nodeValue.toLowerCase()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
function search()
|
||||
{
|
||||
var cells = graph.model.getDescendants(graph.model.getRoot());
|
||||
var search = searchInput.value.toLowerCase();
|
||||
var re = new RegExp(search);
|
||||
var firstMatch = null;
|
||||
|
||||
if (lastSearch != search)
|
||||
{
|
||||
lastSearch = search;
|
||||
lastFound = null;
|
||||
}
|
||||
|
||||
var active = lastFound == null;
|
||||
|
||||
if (graph.isEnabled() && search.length > 0)
|
||||
{
|
||||
for (var i = 0; i < cells.length; i++)
|
||||
{
|
||||
var state = graph.view.getState(cells[i]);
|
||||
|
||||
if (state != null && state.cell.value != null && (active || firstMatch == null) &&
|
||||
(graph.model.isVertex(state.cell) || graph.model.isEdge(state.cell)))
|
||||
{
|
||||
if (graph.isHtmlLabel(state.cell))
|
||||
{
|
||||
tmp.innerHTML = graph.getLabel(state.cell);
|
||||
label = mxUtils.extractTextWithWhitespace([tmp]);
|
||||
}
|
||||
else
|
||||
{
|
||||
label = graph.getLabel(state.cell);
|
||||
}
|
||||
|
||||
label = mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g, ' ')).toLowerCase();
|
||||
|
||||
if (re.test(label) || testMeta(re, state.cell))
|
||||
{
|
||||
if (active)
|
||||
{
|
||||
firstMatch = state;
|
||||
|
||||
break;
|
||||
}
|
||||
else if (firstMatch == null)
|
||||
{
|
||||
firstMatch = state;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
active = active || state == lastFound;
|
||||
}
|
||||
}
|
||||
|
||||
if (firstMatch != null)
|
||||
{
|
||||
lastFound = firstMatch;
|
||||
graph.setSelectionCell(lastFound.cell);
|
||||
graph.scrollCellToVisible(lastFound.cell);
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.clearSelection();
|
||||
}
|
||||
|
||||
return !graph.isEnabled() || search.length == 0 || firstMatch != null;
|
||||
};
|
||||
|
||||
mxUtils.br(div);
|
||||
|
||||
var resetBtn = mxUtils.button(mxResources.get('reset'), function()
|
||||
{
|
||||
searchInput.value = '';
|
||||
searchInput.style.backgroundColor = '';
|
||||
lastFound = null;
|
||||
lastSearch = null;
|
||||
searchInput.focus();
|
||||
});
|
||||
|
||||
resetBtn.setAttribute('title', mxResources.get('reset'));
|
||||
resetBtn.style.marginTop = '8px';
|
||||
resetBtn.style.marginRight = '4px';
|
||||
resetBtn.style.backgroundColor = '#f5f5f5';
|
||||
resetBtn.style.backgroundImage = 'none';
|
||||
resetBtn.className = 'geBtn';
|
||||
|
||||
div.appendChild(resetBtn);
|
||||
|
||||
var btn = mxUtils.button(mxResources.get('find'), function()
|
||||
{
|
||||
searchInput.style.backgroundColor = search() ? '' : '#ffcfcf';
|
||||
});
|
||||
|
||||
btn.setAttribute('title', mxResources.get('find') + ' (Enter)');
|
||||
btn.style.marginTop = '8px';
|
||||
btn.style.backgroundColor = '#4d90fe';
|
||||
btn.style.backgroundImage = 'none';
|
||||
btn.className = 'geBtn gePrimaryBtn';
|
||||
|
||||
div.appendChild(btn);
|
||||
|
||||
mxEvent.addListener(searchInput, 'keyup', function(evt)
|
||||
{
|
||||
// Ctrl or Cmd keys
|
||||
if (evt.keyCode == 91 || evt.keyCode == 17)
|
||||
{
|
||||
// Workaround for lost focus on show
|
||||
mxEvent.consume(evt);
|
||||
}
|
||||
else if (evt.keyCode == 27)
|
||||
{
|
||||
action.funct();
|
||||
}
|
||||
else if (lastSearch != searchInput.value.toLowerCase() || evt.keyCode == 13)
|
||||
{
|
||||
searchInput.style.backgroundColor = search() ? '' : '#ffcfcf';
|
||||
}
|
||||
});
|
||||
|
||||
mxEvent.addListener(div, 'keydown', function(evt)
|
||||
{
|
||||
if (evt.keyCode == 70 && ui.keyHandler.isControlDown(evt) && !mxEvent.isShiftDown(evt))
|
||||
{
|
||||
action.funct();
|
||||
mxEvent.consume(evt);
|
||||
}
|
||||
});
|
||||
|
||||
this.window = new mxWindow(mxResources.get('find'), div, x, y, w, h, true, true);
|
||||
this.window.destroyOnClose = false;
|
||||
this.window.setMaximizable(false);
|
||||
this.window.setResizable(false);
|
||||
this.window.setClosable(true);
|
||||
|
||||
this.window.addListener('show', mxUtils.bind(this, function()
|
||||
{
|
||||
if (this.window.isVisible())
|
||||
{
|
||||
searchInput.focus();
|
||||
|
||||
if (mxClient.IS_FF || document.documentMode >= 5 || mxClient.IS_QUIRKS)
|
||||
{
|
||||
searchInput.select();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.execCommand('selectAll', false, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.container.focus();
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
var TagsWindow = function(editorUi, x, y, w, h)
|
||||
{
|
||||
var graph = editorUi.editor.graph;
|
||||
var propertyName = 'tags';
|
||||
|
||||
var div = document.createElement('div');
|
||||
div.style.userSelect = 'none';
|
||||
div.style.overflow = 'hidden';
|
||||
div.style.padding = '10px';
|
||||
div.style.height = '100%';
|
||||
|
||||
var searchInput = document.createElement('input');
|
||||
searchInput.setAttribute('placeholder', mxResources.get('allTags'));
|
||||
searchInput.setAttribute('type', 'text');
|
||||
searchInput.style.marginTop = '4px';
|
||||
searchInput.style.width = '240px';
|
||||
searchInput.style.fontSize = '12px';
|
||||
searchInput.style.borderRadius = '4px';
|
||||
searchInput.style.padding = '6px';
|
||||
div.appendChild(searchInput);
|
||||
|
||||
mxEvent.addListener(searchInput, 'dblclick', function()
|
||||
{
|
||||
var dlg = new FilenameDialog(editorUi, propertyName, mxResources.get('ok'), mxUtils.bind(this, function(name)
|
||||
{
|
||||
if (name != null && name.length > 0)
|
||||
{
|
||||
propertyName = name;
|
||||
}
|
||||
}), mxResources.get('enterPropertyName'));
|
||||
editorUi.showDialog(dlg.container, 300, 80, true, true);
|
||||
dlg.init();
|
||||
});
|
||||
|
||||
searchInput.setAttribute('title', mxResources.get('doubleClickChangeProperty'));
|
||||
|
||||
function searchCells(cells)
|
||||
{
|
||||
cells = (cells != null) ? cells : graph.model.getDescendants(graph.model.getRoot());
|
||||
var tagList = searchInput.value.split(' ');
|
||||
var result = [];
|
||||
|
||||
for (var i = 0; i < cells.length; i++)
|
||||
{
|
||||
if (graph.model.isVertex(cells[i]) || graph.model.isEdge(cells[i]))
|
||||
{
|
||||
var tags = (cells[i].value != null && typeof(cells[i].value) == 'object') ?
|
||||
mxUtils.trim(cells[i].value.getAttribute(propertyName) || '') : '';
|
||||
var match = true;
|
||||
|
||||
if (tags.length > 0)
|
||||
{
|
||||
var tmp = tags.toLowerCase().split(' ');
|
||||
|
||||
for (var j = 0; j < tagList.length && match; j++)
|
||||
{
|
||||
var tag = mxUtils.trim(tagList[j]).toLowerCase();
|
||||
|
||||
match = match && (tag.length == 0 || mxUtils.indexOf(tmp, tag) >= 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
match = mxUtils.trim(searchInput.value).length == 0;
|
||||
}
|
||||
|
||||
if (match)
|
||||
{
|
||||
result.push(cells[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
function setCellsVisible(cells, visible)
|
||||
{
|
||||
graph.model.beginUpdate();
|
||||
try
|
||||
{
|
||||
for (var i = 0; i < cells.length; i++)
|
||||
{
|
||||
graph.model.setVisible(cells[i], visible);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
graph.model.endUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
mxUtils.br(div);
|
||||
|
||||
var hideBtn = mxUtils.button(mxResources.get('hide'), function()
|
||||
{
|
||||
setCellsVisible(searchCells(), false);
|
||||
});
|
||||
|
||||
hideBtn.setAttribute('title', mxResources.get('hide'));
|
||||
hideBtn.style.marginTop = '8px';
|
||||
hideBtn.style.marginRight = '4px';
|
||||
hideBtn.style.backgroundColor = '#f5f5f5';
|
||||
hideBtn.style.backgroundImage = 'none';
|
||||
hideBtn.className = 'geBtn';
|
||||
|
||||
div.appendChild(hideBtn);
|
||||
|
||||
var showBtn = mxUtils.button(mxResources.get('show'), function()
|
||||
{
|
||||
var cells = searchCells();
|
||||
setCellsVisible(cells, true);
|
||||
graph.setSelectionCells(cells);
|
||||
});
|
||||
|
||||
showBtn.setAttribute('title', mxResources.get('show'));
|
||||
showBtn.style.marginTop = '8px';
|
||||
showBtn.style.marginRight = '4px';
|
||||
showBtn.style.backgroundColor = '#f5f5f5';
|
||||
showBtn.style.backgroundImage = 'none';
|
||||
showBtn.className = 'geBtn';
|
||||
|
||||
div.appendChild(showBtn);
|
||||
|
||||
var action = editorUi.actions.get('tags');
|
||||
|
||||
var btn = mxUtils.button(mxResources.get('close'), function()
|
||||
{
|
||||
action.funct();
|
||||
});
|
||||
|
||||
btn.setAttribute('title', mxResources.get('close') + ' (Enter/Esc)');
|
||||
btn.style.marginTop = '8px';
|
||||
btn.style.backgroundColor = '#4d90fe';
|
||||
btn.style.backgroundImage = 'none';
|
||||
btn.className = 'geBtn gePrimaryBtn';
|
||||
|
||||
div.appendChild(btn);
|
||||
|
||||
mxEvent.addListener(searchInput, 'keyup', function(evt)
|
||||
{
|
||||
// Ctrl or Cmd keys
|
||||
if (evt.keyCode == 13 || evt.keyCode == 27)
|
||||
{
|
||||
action.funct();
|
||||
}
|
||||
});
|
||||
|
||||
this.window = new mxWindow(mxResources.get('tags'), div, x, y, w, h, true, true);
|
||||
this.window.destroyOnClose = false;
|
||||
this.window.setMaximizable(false);
|
||||
this.window.setResizable(false);
|
||||
this.window.setClosable(true);
|
||||
|
||||
this.window.addListener('show', mxUtils.bind(this, function()
|
||||
{
|
||||
if (this.window.isVisible())
|
||||
{
|
||||
searchInput.focus();
|
||||
|
||||
if (mxClient.IS_FF || document.documentMode >= 5 || mxClient.IS_QUIRKS)
|
||||
{
|
||||
searchInput.select();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.execCommand('selectAll', false, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.container.focus();
|
||||
}
|
||||
}));
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -2431,6 +2431,39 @@
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Translates this point by the given vector.
|
||||
*
|
||||
* @param {number} dx X-coordinate of the translation.
|
||||
* @param {number} dy Y-coordinate of the translation.
|
||||
*/
|
||||
EditorUi.prototype.base64ToBlob = function(base64Data, contentType)
|
||||
{
|
||||
contentType = contentType || '';
|
||||
var sliceSize = 1024;
|
||||
var byteCharacters = atob(base64Data);
|
||||
var bytesLength = byteCharacters.length;
|
||||
var slicesCount = Math.ceil(bytesLength / sliceSize);
|
||||
var byteArrays = new Array(slicesCount);
|
||||
|
||||
for (var sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex)
|
||||
{
|
||||
var begin = sliceIndex * sliceSize;
|
||||
var end = Math.min(begin + sliceSize, bytesLength);
|
||||
|
||||
var bytes = new Array(end - begin);
|
||||
|
||||
for (var offset = begin, i = 0 ; offset < end; ++i, ++offset)
|
||||
{
|
||||
bytes[i] = byteCharacters[offset].charCodeAt(0);
|
||||
}
|
||||
|
||||
byteArrays[sliceIndex] = new Uint8Array(bytes);
|
||||
}
|
||||
|
||||
return new Blob(byteArrays, {type: contentType});
|
||||
};
|
||||
|
||||
/**
|
||||
* Translates this point by the given vector.
|
||||
*
|
||||
|
@ -2547,7 +2580,6 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
// TODO: Move to App
|
||||
this.pickFolder(mode, mxUtils.bind(this, function(folderId)
|
||||
{
|
||||
if (this.spinner.spin(document.body, mxResources.get('saving')))
|
||||
|
@ -2590,6 +2622,14 @@
|
|||
this.showDialog(dlg.container, 380, 270, true, true);
|
||||
dlg.init();
|
||||
};
|
||||
|
||||
/**
|
||||
* Hook for subclassers.
|
||||
*/
|
||||
EditorUi.prototype.exportFile = function(data, filename, mimeType, base64Encoded, mode, folderId)
|
||||
{
|
||||
// do nothing
|
||||
};
|
||||
|
||||
/**
|
||||
* Hook for subclassers.
|
||||
|
@ -4908,6 +4948,7 @@
|
|||
if (!this.editor.chromeless)
|
||||
{
|
||||
// Defines additional hotkeys
|
||||
this.keyHandler.bindAction(70, true, 'find'); // Ctrl+F
|
||||
this.keyHandler.bindAction(67, true, 'copyStyle', true); // Ctrl+Shift+C
|
||||
this.keyHandler.bindAction(86, true, 'pasteStyle', true); // Ctrl+Shift+V
|
||||
this.keyHandler.bindAction(77, true, 'editGeometry', true); // Ctrl+Shift+M
|
||||
|
|
|
@ -80,7 +80,8 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
|
|||
this.layersEnabled = mxUtils.indexOf(this.toolbarItems, 'layers') >= 0;
|
||||
this.lightboxEnabled = mxUtils.indexOf(this.toolbarItems, 'lightbox') >= 0;
|
||||
this.lightboxClickEnabled = this.graphConfig.lightbox != false;
|
||||
this.widthIsEmpty = (container != null) ? container.style.width == '' : true;
|
||||
this.initialWidth = (container != null) ? container.style.width : null;
|
||||
this.widthIsEmpty = (this.initialWidth != null) ? this.initialWidth == '' : true;
|
||||
this.editor = null;
|
||||
|
||||
if (xmlNode != null)
|
||||
|
@ -213,23 +214,30 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
|
|||
container.setAttribute('title', this.graphConfig.title);
|
||||
}
|
||||
});
|
||||
|
||||
var MutObs = window.MutationObserver ||
|
||||
window.WebKitMutationObserver ||
|
||||
window.MozMutationObserver;
|
||||
|
||||
if (this.checkVisibleState && container.offsetWidth == 0)
|
||||
if (this.checkVisibleState && container.offsetWidth == 0 && typeof MutObs !== 'undefined')
|
||||
{
|
||||
// Finds first parent with valid offset width or uses the document body
|
||||
// LATER: In some cases a closer ancestor may result in better performance
|
||||
// KNOWN: Possible side-effect of setting relative position on body
|
||||
var resizeSensor = new ResizeSensor(this.getVisibleParent(container), function()
|
||||
// Delayed rendering if inside hidden container and event available
|
||||
var par = this.getObservableParent(container);
|
||||
|
||||
var observer = new MutObs(mxUtils.bind(this, function(mutation)
|
||||
{
|
||||
if (container.offsetWidth > 0)
|
||||
{
|
||||
resizeSensor.detach();
|
||||
observer.disconnect();
|
||||
render();
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
observer.observe(par, {attributes: true});
|
||||
}
|
||||
else
|
||||
{
|
||||
// Immediate rendering in all other cases
|
||||
render();
|
||||
}
|
||||
}
|
||||
|
@ -239,11 +247,12 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
|
|||
/**
|
||||
*
|
||||
*/
|
||||
GraphViewer.prototype.getVisibleParent = function(container)
|
||||
GraphViewer.prototype.getObservableParent = function(container)
|
||||
{
|
||||
var node = container;
|
||||
var node = container.parentNode;
|
||||
|
||||
while (node != document.body && node.parentNode != null && node.offsetWidth == 0)
|
||||
while (node != document.body && node.parentNode != null &&
|
||||
mxUtils.getCurrentStyle(node).display !== 'none')
|
||||
{
|
||||
node = node.parentNode;
|
||||
}
|
||||
|
@ -270,6 +279,19 @@ GraphViewer.prototype.getImageUrl = function(url)
|
|||
return url;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GraphViewer.prototype.setXmlNode = function(xmlNode)
|
||||
{
|
||||
this.xmlDocument = xmlNode.ownerDocument;
|
||||
this.xml = mxUtils.getXml(xmlNode);
|
||||
this.xmlNode = xmlNode;
|
||||
|
||||
this.updateGraphXml(xmlNode);
|
||||
this.fireEvent(new mxEventObject('xmlNodeChanged'));
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -282,71 +304,47 @@ GraphViewer.prototype.setFileNode = function(xmlNode)
|
|||
this.xmlNode = xmlNode;
|
||||
}
|
||||
|
||||
if (this.graph != null)
|
||||
{
|
||||
this.graph.view.translate = new mxPoint();
|
||||
this.graph.view.scale = 1;
|
||||
this.graph.getModel().clear();
|
||||
|
||||
// Restores initial CSS state
|
||||
if (this.widthIsEmpty)
|
||||
{
|
||||
this.graph.container.style.width = '';
|
||||
this.graph.container.style.height = '';
|
||||
}
|
||||
|
||||
this.editor.setGraphXml(xmlNode);
|
||||
this.positionGraph();
|
||||
|
||||
this.graph.initialViewState = {
|
||||
translate: this.graph.view.translate.clone(),
|
||||
scale: this.graph.view.scale
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GraphViewer.prototype.setXmlNode = function(xmlNode)
|
||||
{
|
||||
this.xmlDocument = xmlNode.ownerDocument;
|
||||
this.xml = mxUtils.getXml(xmlNode);
|
||||
this.xmlNode = xmlNode;
|
||||
|
||||
this.updateGraphXml(xmlNode);
|
||||
|
||||
this.fireEvent(new mxEventObject('xmlNodeChanged'));
|
||||
this.setGraphXml(xmlNode);
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GraphViewer.prototype.updateGraphXml = function(xmlNode)
|
||||
{
|
||||
this.setGraphXml(xmlNode);
|
||||
this.fireEvent(new mxEventObject('graphChanged'));
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GraphViewer.prototype.setGraphXml = function(xmlNode)
|
||||
{
|
||||
if (this.graph != null)
|
||||
{
|
||||
this.graph.view.translate = new mxPoint();
|
||||
this.graph.view.scale = 1;
|
||||
this.graph.getModel().clear();
|
||||
|
||||
this.editor.setGraphXml(xmlNode);
|
||||
|
||||
// Restores initial CSS state
|
||||
if (this.widthIsEmpty)
|
||||
{
|
||||
this.graph.container.style.width = '';
|
||||
this.graph.container.style.height = '';
|
||||
}
|
||||
|
||||
this.editor.setGraphXml(xmlNode);
|
||||
this.positionGraph();
|
||||
else
|
||||
{
|
||||
this.graph.container.style.width = this.initialWidth;
|
||||
}
|
||||
|
||||
this.positionGraph();
|
||||
this.graph.initialViewState = {
|
||||
translate: this.graph.view.translate.clone(),
|
||||
scale: this.graph.view.scale
|
||||
};
|
||||
}
|
||||
|
||||
this.fireEvent(new mxEventObject('graphChanged'));
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -514,9 +512,10 @@ GraphViewer.prototype.addSizeHandler = function()
|
|||
{
|
||||
container.style.minWidth = '100%';
|
||||
}
|
||||
|
||||
if (bounds.width + 2 * this.graph.border > container.offsetWidth ||
|
||||
bounds.height + 2 * this.graph.border > this.graphConfig['max-height'])
|
||||
|
||||
if (container.offsetWidth > 0 &&
|
||||
(bounds.width + 2 * this.graph.border > container.offsetWidth ||
|
||||
bounds.height + 2 * this.graph.border > this.graphConfig['max-height']))
|
||||
{
|
||||
var maxScale = null;
|
||||
|
||||
|
@ -886,7 +885,6 @@ GraphViewer.prototype.addToolbar = function()
|
|||
if (this.xmlNode != lastXmlNode)
|
||||
{
|
||||
diagrams = this.xmlNode.getElementsByTagName('diagram');
|
||||
this.currentPage = 0;
|
||||
pageInfo.innerHTML = '';
|
||||
mxUtils.write(pageInfo, (this.currentPage + 1) + ' / ' + diagrams.length);
|
||||
lastXmlNode = this.xmlNode;
|
||||
|
@ -897,8 +895,6 @@ GraphViewer.prototype.addToolbar = function()
|
|||
nextButton.style.display = pageInfo.style.display;
|
||||
});
|
||||
|
||||
var model = this.graph.getModel();
|
||||
|
||||
// LATER: Add event for setGraphXml
|
||||
this.addListener('xmlNodeChanged', update);
|
||||
update();
|
||||
|
|
|
@ -441,6 +441,54 @@
|
|||
window.open('https://www.youtube.com/watch?v=8OaMWa4R1SE&t=1');
|
||||
});
|
||||
|
||||
action = editorUi.actions.addAction('tags...', mxUtils.bind(this, function()
|
||||
{
|
||||
if (this.tagsWindow == null)
|
||||
{
|
||||
this.tagsWindow = new TagsWindow(editorUi, document.body.offsetWidth - 380, 230, 280, 120);
|
||||
this.tagsWindow.window.addListener('show', function()
|
||||
{
|
||||
editorUi.fireEvent(new mxEventObject('tags'));
|
||||
});
|
||||
this.tagsWindow.window.addListener('hide', function()
|
||||
{
|
||||
editorUi.fireEvent(new mxEventObject('tags'));
|
||||
});
|
||||
this.tagsWindow.window.setVisible(true);
|
||||
editorUi.fireEvent(new mxEventObject('tags'));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible());
|
||||
}
|
||||
}));
|
||||
action.setToggleAction(true);
|
||||
action.setSelectedCallback(mxUtils.bind(this, function() { return this.tagsWindow != null && this.tagsWindow.window.isVisible(); }));
|
||||
|
||||
action = editorUi.actions.addAction('find...', mxUtils.bind(this, function()
|
||||
{
|
||||
if (this.findWindow == null)
|
||||
{
|
||||
this.findWindow = new FindWindow(editorUi, document.body.offsetWidth - 300, 110, 204, 116);
|
||||
this.findWindow.window.addListener('show', function()
|
||||
{
|
||||
editorUi.fireEvent(new mxEventObject('find'));
|
||||
});
|
||||
this.findWindow.window.addListener('hide', function()
|
||||
{
|
||||
editorUi.fireEvent(new mxEventObject('find'));
|
||||
});
|
||||
this.findWindow.window.setVisible(true);
|
||||
editorUi.fireEvent(new mxEventObject('find'));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.findWindow.window.setVisible(!this.findWindow.window.isVisible());
|
||||
}
|
||||
}));
|
||||
action.setToggleAction(true);
|
||||
action.setSelectedCallback(mxUtils.bind(this, function() { return this.findWindow != null && this.findWindow.window.isVisible(); }));
|
||||
|
||||
// Adds language menu to options only if localStorage is available for
|
||||
// storing the choice. We do not want to use cookies for older browsers.
|
||||
// Note that the URL param lang=XX is available for setting the language
|
||||
|
@ -1653,6 +1701,8 @@
|
|||
}
|
||||
}, null, null, 'Ctrl+Shift+X').isEnabled = isGraphEnabled;
|
||||
|
||||
|
||||
|
||||
editorUi.actions.addAction('insertRectangle', function()
|
||||
{
|
||||
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
|
||||
|
@ -2004,6 +2054,15 @@
|
|||
}
|
||||
}));
|
||||
|
||||
// Overrides edit menu to add find
|
||||
this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent)
|
||||
{
|
||||
this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste', 'delete', '-', 'duplicate', '-',
|
||||
'find', '-',
|
||||
'editData', 'editTooltip', 'editStyle', '-', 'edit', '-', 'editLink', 'openLink', '-',
|
||||
'selectVertices', 'selectEdges', 'selectAll', 'selectNone', '-', 'lockUnlock']);
|
||||
})));
|
||||
|
||||
// Overrides view menu to add search and scratchpad
|
||||
this.put('view', new Menu(mxUtils.bind(this, function(menu, parent)
|
||||
{
|
||||
|
@ -2017,7 +2076,7 @@
|
|||
|
||||
if (!editorUi.isOffline() || mxClient.IS_CHROMEAPP)
|
||||
{
|
||||
this.addLinkToItem(item, 'https://support.draw.io/questions/10420280');
|
||||
this.addLinkToItem(item, 'https://desk.draw.io/solution/articles/16000042367-how-to-use-the-scratchpad-');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2061,7 +2120,16 @@
|
|||
|
||||
if (!editorUi.isOfflineApp() && urlParams['embed'] != '1')
|
||||
{
|
||||
this.addMenuItems(menu, ['plugins', '-', 'offline'], parent);
|
||||
this.addMenuItems(menu, ['plugins', '-'], parent);
|
||||
|
||||
var item = this.addMenuItem(menu, 'tags', parent);
|
||||
|
||||
if (!editorUi.isOffline() || mxClient.IS_CHROMEAPP)
|
||||
{
|
||||
this.addLinkToItem(item, 'https://desk.draw.io/solution/articles/16000046966-how-to-use-tags');
|
||||
}
|
||||
|
||||
this.addMenuItems(menu, ['-', 'offline'], parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -975,7 +975,7 @@
|
|||
this.createVertexTemplateEntry(s + 'domain_controller;',
|
||||
w * 45, h * 55, '', 'Domain Controller', null, null, this.getTagsForStencil(gn, 'domain controller', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(s + 'excahnge_client_access_server_role;',
|
||||
w * 52, h * 59, '', 'Excahnge Client Access Server Role', null, null, this.getTagsForStencil(gn, 'excahnge client access server role', dt).join(' ')),
|
||||
w * 52, h * 59, '', 'Exchange Client Access Server Role', null, null, this.getTagsForStencil(gn, 'excahnge client access server role', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(s + 'exchange_edge_transport_server_role;',
|
||||
w * 52, h * 55, '', 'Exchange Edge Transport Server Role', null, null, this.getTagsForStencil(gn, 'exchange edge transport server role', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(s + 'exchange_hub_transport_server_role;',
|
||||
|
|
39
war/js/embed-static.min.js
vendored
39
war/js/embed-static.min.js
vendored
|
@ -184,13 +184,13 @@ f)+"\n"+u+"}":"{"+v.join(",")+"}";f=u;return r}}"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||1E8;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.0.1.8",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.0.2.1",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/")||
|
||||
0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_WIN:0<navigator.appVersion.indexOf("Win"),
|
||||
IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('\x3clink rel\x3d"'+a+'" href\x3d"'+b+'" charset\x3d"ISO-8859-1" type\x3d"text/css"/\x3e');else{var d=c.createElement("link");d.setAttribute("rel",
|
||||
a);d.setAttribute("href",b);d.setAttribute("charset","ISO-8859-1");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
|
||||
IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('\x3clink rel\x3d"'+a+'" href\x3d"'+b+'" charset\x3d"UTF-8" type\x3d"text/css"/\x3e');else{var d=c.createElement("link");d.setAttribute("rel",
|
||||
a);d.setAttribute("href",b);d.setAttribute("charset","UTF-8");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
|
||||
"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);"undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";
|
||||
"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;
|
||||
mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
|
||||
|
@ -529,26 +529,27 @@ a.lineTo(w+z*f,t-v*f),a.quadTo(F,P,D,C),function(b,c){E.push(function(){a.lineTo
|
|||
a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);n&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),h&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,r,m,d,f,l,!0),a.stroke(),a.end()),k&&!g&&(a.begin(),this.paintMarker(a,p.x,p.y,-v,-z,c,e,f,l,!0),a.stroke(),a.end()))}};
|
||||
mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,h,k,l){g=h/g;var m=h*e/2;h=-h*d/2;var n=(k+f)*d;f=(k+f)*e;l?a.moveTo(b-m+n,c-h+f):a.lineTo(b-m+n,c-h+f);a.lineTo(b-m/g+n,c-h/g+f);a.lineTo(b+k*d,c+k*e);a.lineTo(b+m/g+n,c+h/g+f);a.lineTo(b+m+n,c+h+f)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
|
||||
mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
|
||||
function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,r,q,u,v,t,y,z,w){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(n||
|
||||
0);this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=r?r:!0;this.background=q;this.border=u;this.wrap=null!=v?v:!1;this.clipped=null!=t?t:!1;this.overflow=null!=y?y:"visible";this.labelPadding=null!=z?z:0;this.textDirection=w;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
|
||||
mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
|
||||
function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,r,q,u,v,t,y,z,w){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);
|
||||
this.spacingBottom=this.spacing+parseInt(n||0);this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=r?r:!0;this.background=q;this.border=u;this.wrap=null!=v?v:!1;this.clipped=null!=t?t:!1;this.overflow=null!=y?y:"visible";this.labelPadding=null!=z?z:0;this.textDirection=w;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
|
||||
mxText.prototype.replaceLinefeeds=!0;mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
|
||||
mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
|
||||
mxText.prototype.paint=function(a,b){var c=this.scale,d=this.bounds.x/c,e=this.bounds.y/c,f=this.bounds.width/c,c=this.bounds.height/c;this.updateTransform(a,d,e,f,c);this.configureCanvas(a,d,e,f,c);if(b){var g=null!=this.state?this.state.unscaledWidth:null;null!=this.node.firstChild&&this.lastUnscaledWidth!=g&&a.invalidateCachedOffsetSize(this.node);a.updateText(d,e,f,c,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node)}else{var h=(g=mxUtils.isNode(this.value)||
|
||||
this.dialect==mxConstants.DIALECT_STRICTHTML)||a instanceof mxVmlCanvas2D?"html":"",k=this.value;!g&&"html"==h&&(k=mxUtils.htmlEntities(k,!1));"html"==h&&!mxUtils.isNode(this.value)&&(k=mxUtils.replaceTrailingNewlines(k,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));var k=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==h?k.replace(/\n/g,"\x3cbr/\x3e"):k,l=this.textDirection;l==mxConstants.TEXT_DIRECTION_AUTO&&!g&&(l=this.getAutoDirection());l!=mxConstants.TEXT_DIRECTION_LTR&&l!=mxConstants.TEXT_DIRECTION_RTL&&
|
||||
(l=null);a.text(d,e,f,c,k,this.align,this.valign,this.wrap,h,this.overflow,this.clipped,this.getTextRotation(),l)}this.lastUnscaledWidth=null!=this.state?this.state.unscaledWidth:null};
|
||||
mxText.prototype.redraw=function(){if(this.visible&&this.checkBounds()&&this.cacheEnabled&&this.lastValue==this.value&&(mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML))if("DIV"==this.node.nodeName&&(this.isHtmlAllowed()||!mxClient.IS_VML))this.updateSize(this.node,null==this.state||null==this.state.view.textDiv),mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform(),this.updateBoundingBox();else{var a=this.createCanvas();
|
||||
null!=a&&null!=a.updateText&&null!=a.invalidateCachedOffsetSize?(this.paint(a,!0),this.destroyCanvas(a),this.updateBoundingBox()):mxShape.prototype.redraw.apply(this,arguments)}else mxShape.prototype.redraw.apply(this,arguments),mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML?this.lastValue=this.value:this.lastValue=null};
|
||||
mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.valign=this.align="";this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacing=2;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=0;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;delete this.margin};
|
||||
mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.align=mxConstants.ALIGN_CENTER;this.valign=mxConstants.ALIGN_MIDDLE;this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacing=2;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=0;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;
|
||||
delete this.margin};
|
||||
mxText.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign=
|
||||
mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing),this.spacingTop=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop)+this.spacing,this.spacingRight=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight)+this.spacing,this.spacingBottom=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom)+this.spacing,this.spacingLeft=mxUtils.getValue(this.style,
|
||||
mxConstants.STYLE_SPACING_LEFT,this.spacingLeft)+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.updateMargin());this.flipH=this.flipV=
|
||||
null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0<a.length&&"z"<a[0]?mxConstants.TEXT_DIRECTION_RTL:mxConstants.TEXT_DIRECTION_LTR};
|
||||
mxConstants.STYLE_SPACING_LEFT,this.spacingLeft)+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_OPACITY,
|
||||
100),this.updateMargin());this.flipH=this.flipV=null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0<a.length&&"z"<a[0]?mxConstants.TEXT_DIRECTION_RTL:mxConstants.TEXT_DIRECTION_LTR};
|
||||
mxText.prototype.updateBoundingBox=function(){var a=this.node;this.boundingBox=this.bounds.clone();var b=this.getTextRotation(),c=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER):null,d=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE):null;if(!this.ignoreStringSize&&null!=a&&"fill"!=this.overflow&&(!this.clipped||!this.ignoreClippedStringSize||c!=mxConstants.ALIGN_CENTER||d!=mxConstants.ALIGN_MIDDLE)){d=
|
||||
c=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,c=parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();if("string"==typeof this.value&&0==mxUtils.trim(this.value)){this.boundingBox=null;return}if(0==e.width&&0==e.height){this.boundingBox=null;return}this.boundingBox=new mxRectangle(e.x,e.y,e.width,e.height);b=0}catch(f){}else c=
|
||||
null!=this.state?this.state.view.textDiv:null,null!=this.offsetWidth&&null!=this.offsetHeight||(null!=c&&(this.updateFont(c),this.updateSize(c,!1),this.updateInnerHtml(c),a=c),e=a,8==document.documentMode&&!mxClient.IS_EM?(d=Math.round(this.bounds.width/this.scale),this.wrap&&0<d?(a.style.wordWrap=mxConstants.WORD_WRAP,a.style.whiteSpace="normal","break-word"!=a.style.wordWrap&&(a=e.getElementsByTagName("div"),0<a.length&&(e=a[a.length-1]),c=e.offsetWidth+2,a=this.node.getElementsByTagName("div"),
|
||||
this.clipped&&(c=Math.min(d,c)),1<a.length&&(a[a.length-2].style.width=c+"px"))):a.style.whiteSpace="nowrap"):null!=e.firstChild&&"DIV"==e.firstChild.nodeName&&(e=e.firstChild),this.offsetWidth=e.offsetWidth+this.textWidthPadding,this.offsetHeight=e.offsetHeight),c=this.offsetWidth*this.scale,d=this.offsetHeight*this.scale;null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x+this.margin.x*c,this.bounds.y+this.margin.y*d,c,d))}else this.boundingBox.x+=this.margin.x*this.boundingBox.width,
|
||||
this.boundingBox.y+=this.margin.y*this.boundingBox.height;null!=this.boundingBox&&(0!=b?(this.unrotatedBoundingBox=mxRectangle.fromRectangle(this.boundingBox),b=mxUtils.getBoundingBox(this.boundingBox,b),this.boundingBox.x=b.x,this.boundingBox.y=b.y,mxClient.IS_QUIRKS||(this.boundingBox.width=b.width,this.boundingBox.height=b.height)):this.unrotatedBoundingBox=null)};mxText.prototype.getShapeRotation=function(){return 0};
|
||||
mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
|
||||
c=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,c=parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();"string"==typeof this.value&&0==mxUtils.trim(this.value)?this.boundingBox=null:this.boundingBox=0==e.width&&0==e.height?null:new mxRectangle(e.x,e.y,e.width,e.height);return}catch(f){}else c=null!=this.state?this.state.view.textDiv:
|
||||
null,null!=this.offsetWidth&&null!=this.offsetHeight||(null!=c&&(this.updateFont(c),this.updateSize(c,!1),this.updateInnerHtml(c),a=c),e=a,8==document.documentMode&&!mxClient.IS_EM?(d=Math.round(this.bounds.width/this.scale),this.wrap&&0<d?(a.style.wordWrap=mxConstants.WORD_WRAP,a.style.whiteSpace="normal","break-word"!=a.style.wordWrap&&(a=e.getElementsByTagName("div"),0<a.length&&(e=a[a.length-1]),c=e.offsetWidth+2,a=this.node.getElementsByTagName("div"),this.clipped&&(c=Math.min(d,c)),1<a.length&&
|
||||
(a[a.length-2].style.width=c+"px"))):a.style.whiteSpace="nowrap"):null!=e.firstChild&&"DIV"==e.firstChild.nodeName&&(e=e.firstChild),this.offsetWidth=e.offsetWidth+this.textWidthPadding,this.offsetHeight=e.offsetHeight),c=this.offsetWidth*this.scale,d=this.offsetHeight*this.scale;null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x,this.bounds.y,c,d))}null!=this.boundingBox&&(0!=b?(b=mxUtils.getBoundingBox(new mxRectangle(this.margin.x*this.boundingBox.width,this.margin.y*this.boundingBox.height,
|
||||
this.boundingBox.width,this.boundingBox.height),b,new mxPoint(0,0)),this.unrotatedBoundingBox=mxRectangle.fromRectangle(this.boundingBox),this.unrotatedBoundingBox.x+=this.margin.x*this.unrotatedBoundingBox.width,this.unrotatedBoundingBox.y+=this.margin.y*this.unrotatedBoundingBox.height,this.boundingBox.x+=b.x,this.boundingBox.y+=b.y,this.boundingBox.width=b.width,this.boundingBox.height=b.height):(this.boundingBox.x+=this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height,
|
||||
this.unrotatedBoundingBox=null))};mxText.prototype.getShapeRotation=function(){return 0};mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
|
||||
mxText.prototype.configureCanvas=function(a,b,c,d,e){mxShape.prototype.configureCanvas.apply(this,arguments);a.setFontColor(this.color);a.setFontBackgroundColor(this.background);a.setFontBorderColor(this.border);a.setFontFamily(this.family);a.setFontSize(this.size);a.setFontStyle(this.fontStyle)};
|
||||
mxText.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width="1px";this.node.style.height="1px";this.node.style.overflow="visible"};
|
||||
mxText.prototype.redrawHtmlShape=function(){var a=this.node.style;a.whiteSpace="normal";a.overflow="";a.width="";a.height="";this.updateValue();this.updateFont(this.node);this.updateSize(this.node,null==this.state||null==this.state.view.textDiv);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()};
|
||||
|
@ -848,7 +849,7 @@ mxCell.prototype.isCollapsed=function(){return 0!=this.collapsed};mxCell.prototy
|
|||
mxCell.prototype.getIndex=function(a){return mxUtils.indexOf(this.children,a)};mxCell.prototype.getChildAt=function(a){return null==this.children?null:this.children[a]};mxCell.prototype.insert=function(a,b){null!=a&&(null==b&&(b=this.getChildCount(),a.getParent()==this&&b--),a.removeFromParent(),a.setParent(this),null==this.children?(this.children=[],this.children.push(a)):this.children.splice(b,0,a));return a};
|
||||
mxCell.prototype.remove=function(a){var b=null;null!=this.children&&0<=a&&(b=this.getChildAt(a),null!=b&&(this.children.splice(a,1),b.setParent(null)));return b};mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var a=this.parent.getIndex(this);this.parent.remove(a)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(a){return mxUtils.indexOf(this.edges,a)};
|
||||
mxCell.prototype.getEdgeAt=function(a){return null==this.edges?null:this.edges[a]};mxCell.prototype.insertEdge=function(a,b){if(null!=a&&(a.removeFromTerminal(b),a.setTerminal(this,b),null==this.edges||a.getTerminal(!b)!=this||0>mxUtils.indexOf(this.edges,a)))null==this.edges&&(this.edges=[]),this.edges.push(a);return a};mxCell.prototype.removeEdge=function(a,b){if(null!=a){if(a.getTerminal(!b)!=this&&null!=this.edges){var c=this.getEdgeIndex(a);0<=c&&this.edges.splice(c,1)}a.setTerminal(null,b)}return a};
|
||||
mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var b=this.getValue();return null!=b&&b.nodeType==mxConstants.NODETYPE_ELEMENT?b.hasAttribute(a):!1};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};
|
||||
mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var b=this.getValue();return null!=b&&b.nodeType==mxConstants.NODETYPE_ELEMENT&&b.hasAttribute?b.hasAttribute(a):null!=b.getAttribute(a)};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};
|
||||
mxCell.prototype.setAttribute=function(a,b){var c=this.getValue();null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.setAttribute(a,b)};mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(){var a=this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,b,c,d){mxRectangle.call(this,a,b,c,d)}mxGeometry.prototype=new mxRectangle;
|
||||
mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1;
|
||||
mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,b){b?this.sourcePoint=a:this.targetPoint=a;return a};
|
||||
|
@ -956,9 +957,9 @@ e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a));mxEvent.consume(b)},f
|
|||
mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0};
|
||||
mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(c){var e=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(c).nodeName||mxClient.IS_TOUCH)e=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b.container,e,c),e=b.view.getState(b.getCellAt(c.x,c.y));return e};mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c,a))}),mxUtils.bind(this,
|
||||
function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d,c(d)))}),mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d,c(d)))}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&(b.dblClick(c,a.cell),mxEvent.consume(c))}))};
|
||||
mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph;b&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),a.text.opacity=mxUtils.getValue(a.style,mxConstants.STYLE_TEXT_OPACITY,100));var e=this.getLabelBounds(a),f=
|
||||
d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,h=a.style[mxConstants.STYLE_OVERFLOW]||"visible";if(b||a.text.value!=c||a.text.isWrapping!=f||a.text.overflow!=h||a.text.isClipping!=d||a.text.scale!=this.getTextScale(a)||a.text.dialect!=g||!a.text.bounds.equals(e))a.text.dialect=g,a.text.value=c,a.text.bounds=e,a.text.scale=this.getTextScale(a),a.text.wrap=f,a.text.clipped=d,a.text.overflow=
|
||||
h,c=a.text.node.style.visibility,this.redrawLabelShape(a.text),a.text.node.style.visibility=c}};
|
||||
mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph;b&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),a.text.valign=d.getVerticalAlign(a));var e=this.getLabelBounds(a),f=d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),
|
||||
g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,h=a.style[mxConstants.STYLE_OVERFLOW]||"visible";if(b||a.text.value!=c||a.text.isWrapping!=f||a.text.overflow!=h||a.text.isClipping!=d||a.text.scale!=this.getTextScale(a)||a.text.dialect!=g||!a.text.bounds.equals(e))a.text.dialect=g,a.text.value=c,a.text.bounds=e,a.text.scale=this.getTextScale(a),a.text.wrap=f,a.text.clipped=d,a.text.overflow=h,c=a.text.node.style.visibility,this.redrawLabelShape(a.text),
|
||||
a.text.node.style.visibility=c}};
|
||||
mxCellRenderer.prototype.isTextShapeInvalid=function(a,b){function c(c,e,f){return b[c]!=(a.style[e]||f)}return c("fontStyle",mxConstants.STYLE_FONTSTYLE,mxConstants.DEFAULT_FONTSTYLE)||c("family",mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY)||c("size",mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)||c("color",mxConstants.STYLE_FONTCOLOR,"black")||c("align",mxConstants.STYLE_ALIGN,"")||c("valign",mxConstants.STYLE_VERTICAL_ALIGN,"")||c("spacing",mxConstants.STYLE_SPACING,2)||
|
||||
c("spacingTop",mxConstants.STYLE_SPACING_TOP,2)||c("spacingRight",mxConstants.STYLE_SPACING_RIGHT,2)||c("spacingBottom",mxConstants.STYLE_SPACING_BOTTOM,2)||c("spacingLeft",mxConstants.STYLE_SPACING_LEFT,2)||c("horizontal",mxConstants.STYLE_HORIZONTAL,!0)||c("background",mxConstants.STYLE_LABEL_BACKGROUNDCOLOR)||c("border",mxConstants.STYLE_LABEL_BORDERCOLOR)||c("opacity",mxConstants.STYLE_TEXT_OPACITY,100)||c("textDirection",mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION)};
|
||||
mxCellRenderer.prototype.redrawLabelShape=function(a){a.redraw()};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};
|
||||
|
@ -1098,7 +1099,7 @@ mxGraph.prototype.resetEdgesOnResize=!1;mxGraph.prototype.resetEdgesOnMove=!1;mx
|
|||
mxGraph.prototype.swimlaneNesting=!0;mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=0.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
|
||||
mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
|
||||
mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(a){return this.isEditing()||!this.isMouseDown&&!mxEvent.isShiftDown(a)})));8==document.documentMode&&
|
||||
a.insertAdjacentHTML("beforeend",'\x3cv:group style\x3d"DISPLAY: none;"\x3e\x3c/v:group\x3e')};
|
||||
a.insertAdjacentHTML("beforeend","\x3c"+mxClient.VML_PREFIX+':group style\x3d"DISPLAY: none;"\x3e\x3c/'+mxClient.VML_PREFIX+":group\x3e")};
|
||||
mxGraph.prototype.createHandlers=function(){this.tooltipHandler=this.createTooltipHandler();this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=this.createSelectionCellsHandler();this.connectionHandler=this.createConnectionHandler();this.connectionHandler.setEnabled(!1);this.graphHandler=this.createGraphHandler();this.panningHandler=this.createPanningHandler();this.panningHandler.panningEnabled=!1;this.popupMenuHandler=this.createPopupMenuHandler()};
|
||||
mxGraph.prototype.createTooltipHandler=function(){return new mxTooltipHandler(this)};mxGraph.prototype.createSelectionCellsHandler=function(){return new mxSelectionCellsHandler(this)};mxGraph.prototype.createConnectionHandler=function(){return new mxConnectionHandler(this)};mxGraph.prototype.createGraphHandler=function(){return new mxGraphHandler(this)};mxGraph.prototype.createPanningHandler=function(){return new mxPanningHandler(this)};mxGraph.prototype.createPopupMenuHandler=function(){return new mxPopupMenuHandler(this)};
|
||||
mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
|
||||
|
|
|
@ -2184,6 +2184,12 @@ TextFormatPanel.prototype.addFont = function(container)
|
|||
fontMenu.style.width = '192px';
|
||||
fontMenu.style.height = '15px';
|
||||
|
||||
// Workaround for offset in FF
|
||||
if (mxClient.IS_FF)
|
||||
{
|
||||
fontMenu.getElementsByTagName('div')[0].style.marginTop = '-18px';
|
||||
}
|
||||
|
||||
var stylePanel2 = stylePanel.cloneNode(false);
|
||||
stylePanel2.style.marginLeft = '-3px';
|
||||
var fontStyleItems = this.editorUi.toolbar.addItems(['bold', 'italic', 'underline'], stylePanel2, true);
|
||||
|
|
39
war/js/reader.min.js
vendored
39
war/js/reader.min.js
vendored
|
@ -184,13 +184,13 @@ f)+"\n"+u+"}":"{"+v.join(",")+"}";f=u;return r}}"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||1E8;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.0.1.8",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.0.2.1",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/")||
|
||||
0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_WIN:0<navigator.appVersion.indexOf("Win"),
|
||||
IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('\x3clink rel\x3d"'+a+'" href\x3d"'+b+'" charset\x3d"ISO-8859-1" type\x3d"text/css"/\x3e');else{var d=c.createElement("link");d.setAttribute("rel",
|
||||
a);d.setAttribute("href",b);d.setAttribute("charset","ISO-8859-1");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
|
||||
IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('\x3clink rel\x3d"'+a+'" href\x3d"'+b+'" charset\x3d"UTF-8" type\x3d"text/css"/\x3e');else{var d=c.createElement("link");d.setAttribute("rel",
|
||||
a);d.setAttribute("href",b);d.setAttribute("charset","UTF-8");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
|
||||
"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);"undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";
|
||||
"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;
|
||||
mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
|
||||
|
@ -529,26 +529,27 @@ a.lineTo(w+z*f,t-v*f),a.quadTo(F,P,D,C),function(b,c){E.push(function(){a.lineTo
|
|||
a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);n&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),h&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,r,m,d,f,l,!0),a.stroke(),a.end()),k&&!g&&(a.begin(),this.paintMarker(a,p.x,p.y,-v,-z,c,e,f,l,!0),a.stroke(),a.end()))}};
|
||||
mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,h,k,l){g=h/g;var m=h*e/2;h=-h*d/2;var n=(k+f)*d;f=(k+f)*e;l?a.moveTo(b-m+n,c-h+f):a.lineTo(b-m+n,c-h+f);a.lineTo(b-m/g+n,c-h/g+f);a.lineTo(b+k*d,c+k*e);a.lineTo(b+m/g+n,c+h/g+f);a.lineTo(b+m+n,c+h+f)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
|
||||
mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
|
||||
function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,r,q,u,v,t,y,z,w){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(n||
|
||||
0);this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=r?r:!0;this.background=q;this.border=u;this.wrap=null!=v?v:!1;this.clipped=null!=t?t:!1;this.overflow=null!=y?y:"visible";this.labelPadding=null!=z?z:0;this.textDirection=w;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
|
||||
mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
|
||||
function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,r,q,u,v,t,y,z,w){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);
|
||||
this.spacingBottom=this.spacing+parseInt(n||0);this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=r?r:!0;this.background=q;this.border=u;this.wrap=null!=v?v:!1;this.clipped=null!=t?t:!1;this.overflow=null!=y?y:"visible";this.labelPadding=null!=z?z:0;this.textDirection=w;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
|
||||
mxText.prototype.replaceLinefeeds=!0;mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
|
||||
mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
|
||||
mxText.prototype.paint=function(a,b){var c=this.scale,d=this.bounds.x/c,e=this.bounds.y/c,f=this.bounds.width/c,c=this.bounds.height/c;this.updateTransform(a,d,e,f,c);this.configureCanvas(a,d,e,f,c);if(b){var g=null!=this.state?this.state.unscaledWidth:null;null!=this.node.firstChild&&this.lastUnscaledWidth!=g&&a.invalidateCachedOffsetSize(this.node);a.updateText(d,e,f,c,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node)}else{var h=(g=mxUtils.isNode(this.value)||
|
||||
this.dialect==mxConstants.DIALECT_STRICTHTML)||a instanceof mxVmlCanvas2D?"html":"",k=this.value;!g&&"html"==h&&(k=mxUtils.htmlEntities(k,!1));"html"==h&&!mxUtils.isNode(this.value)&&(k=mxUtils.replaceTrailingNewlines(k,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));var k=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==h?k.replace(/\n/g,"\x3cbr/\x3e"):k,l=this.textDirection;l==mxConstants.TEXT_DIRECTION_AUTO&&!g&&(l=this.getAutoDirection());l!=mxConstants.TEXT_DIRECTION_LTR&&l!=mxConstants.TEXT_DIRECTION_RTL&&
|
||||
(l=null);a.text(d,e,f,c,k,this.align,this.valign,this.wrap,h,this.overflow,this.clipped,this.getTextRotation(),l)}this.lastUnscaledWidth=null!=this.state?this.state.unscaledWidth:null};
|
||||
mxText.prototype.redraw=function(){if(this.visible&&this.checkBounds()&&this.cacheEnabled&&this.lastValue==this.value&&(mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML))if("DIV"==this.node.nodeName&&(this.isHtmlAllowed()||!mxClient.IS_VML))this.updateSize(this.node,null==this.state||null==this.state.view.textDiv),mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform(),this.updateBoundingBox();else{var a=this.createCanvas();
|
||||
null!=a&&null!=a.updateText&&null!=a.invalidateCachedOffsetSize?(this.paint(a,!0),this.destroyCanvas(a),this.updateBoundingBox()):mxShape.prototype.redraw.apply(this,arguments)}else mxShape.prototype.redraw.apply(this,arguments),mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML?this.lastValue=this.value:this.lastValue=null};
|
||||
mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.valign=this.align="";this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacing=2;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=0;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;delete this.margin};
|
||||
mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.align=mxConstants.ALIGN_CENTER;this.valign=mxConstants.ALIGN_MIDDLE;this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacing=2;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=0;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;
|
||||
delete this.margin};
|
||||
mxText.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign=
|
||||
mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing),this.spacingTop=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop)+this.spacing,this.spacingRight=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight)+this.spacing,this.spacingBottom=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom)+this.spacing,this.spacingLeft=mxUtils.getValue(this.style,
|
||||
mxConstants.STYLE_SPACING_LEFT,this.spacingLeft)+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.updateMargin());this.flipH=this.flipV=
|
||||
null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0<a.length&&"z"<a[0]?mxConstants.TEXT_DIRECTION_RTL:mxConstants.TEXT_DIRECTION_LTR};
|
||||
mxConstants.STYLE_SPACING_LEFT,this.spacingLeft)+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_OPACITY,
|
||||
100),this.updateMargin());this.flipH=this.flipV=null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0<a.length&&"z"<a[0]?mxConstants.TEXT_DIRECTION_RTL:mxConstants.TEXT_DIRECTION_LTR};
|
||||
mxText.prototype.updateBoundingBox=function(){var a=this.node;this.boundingBox=this.bounds.clone();var b=this.getTextRotation(),c=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER):null,d=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE):null;if(!this.ignoreStringSize&&null!=a&&"fill"!=this.overflow&&(!this.clipped||!this.ignoreClippedStringSize||c!=mxConstants.ALIGN_CENTER||d!=mxConstants.ALIGN_MIDDLE)){d=
|
||||
c=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,c=parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();if("string"==typeof this.value&&0==mxUtils.trim(this.value)){this.boundingBox=null;return}if(0==e.width&&0==e.height){this.boundingBox=null;return}this.boundingBox=new mxRectangle(e.x,e.y,e.width,e.height);b=0}catch(f){}else c=
|
||||
null!=this.state?this.state.view.textDiv:null,null!=this.offsetWidth&&null!=this.offsetHeight||(null!=c&&(this.updateFont(c),this.updateSize(c,!1),this.updateInnerHtml(c),a=c),e=a,8==document.documentMode&&!mxClient.IS_EM?(d=Math.round(this.bounds.width/this.scale),this.wrap&&0<d?(a.style.wordWrap=mxConstants.WORD_WRAP,a.style.whiteSpace="normal","break-word"!=a.style.wordWrap&&(a=e.getElementsByTagName("div"),0<a.length&&(e=a[a.length-1]),c=e.offsetWidth+2,a=this.node.getElementsByTagName("div"),
|
||||
this.clipped&&(c=Math.min(d,c)),1<a.length&&(a[a.length-2].style.width=c+"px"))):a.style.whiteSpace="nowrap"):null!=e.firstChild&&"DIV"==e.firstChild.nodeName&&(e=e.firstChild),this.offsetWidth=e.offsetWidth+this.textWidthPadding,this.offsetHeight=e.offsetHeight),c=this.offsetWidth*this.scale,d=this.offsetHeight*this.scale;null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x+this.margin.x*c,this.bounds.y+this.margin.y*d,c,d))}else this.boundingBox.x+=this.margin.x*this.boundingBox.width,
|
||||
this.boundingBox.y+=this.margin.y*this.boundingBox.height;null!=this.boundingBox&&(0!=b?(this.unrotatedBoundingBox=mxRectangle.fromRectangle(this.boundingBox),b=mxUtils.getBoundingBox(this.boundingBox,b),this.boundingBox.x=b.x,this.boundingBox.y=b.y,mxClient.IS_QUIRKS||(this.boundingBox.width=b.width,this.boundingBox.height=b.height)):this.unrotatedBoundingBox=null)};mxText.prototype.getShapeRotation=function(){return 0};
|
||||
mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
|
||||
c=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,c=parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();"string"==typeof this.value&&0==mxUtils.trim(this.value)?this.boundingBox=null:this.boundingBox=0==e.width&&0==e.height?null:new mxRectangle(e.x,e.y,e.width,e.height);return}catch(f){}else c=null!=this.state?this.state.view.textDiv:
|
||||
null,null!=this.offsetWidth&&null!=this.offsetHeight||(null!=c&&(this.updateFont(c),this.updateSize(c,!1),this.updateInnerHtml(c),a=c),e=a,8==document.documentMode&&!mxClient.IS_EM?(d=Math.round(this.bounds.width/this.scale),this.wrap&&0<d?(a.style.wordWrap=mxConstants.WORD_WRAP,a.style.whiteSpace="normal","break-word"!=a.style.wordWrap&&(a=e.getElementsByTagName("div"),0<a.length&&(e=a[a.length-1]),c=e.offsetWidth+2,a=this.node.getElementsByTagName("div"),this.clipped&&(c=Math.min(d,c)),1<a.length&&
|
||||
(a[a.length-2].style.width=c+"px"))):a.style.whiteSpace="nowrap"):null!=e.firstChild&&"DIV"==e.firstChild.nodeName&&(e=e.firstChild),this.offsetWidth=e.offsetWidth+this.textWidthPadding,this.offsetHeight=e.offsetHeight),c=this.offsetWidth*this.scale,d=this.offsetHeight*this.scale;null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x,this.bounds.y,c,d))}null!=this.boundingBox&&(0!=b?(b=mxUtils.getBoundingBox(new mxRectangle(this.margin.x*this.boundingBox.width,this.margin.y*this.boundingBox.height,
|
||||
this.boundingBox.width,this.boundingBox.height),b,new mxPoint(0,0)),this.unrotatedBoundingBox=mxRectangle.fromRectangle(this.boundingBox),this.unrotatedBoundingBox.x+=this.margin.x*this.unrotatedBoundingBox.width,this.unrotatedBoundingBox.y+=this.margin.y*this.unrotatedBoundingBox.height,this.boundingBox.x+=b.x,this.boundingBox.y+=b.y,this.boundingBox.width=b.width,this.boundingBox.height=b.height):(this.boundingBox.x+=this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height,
|
||||
this.unrotatedBoundingBox=null))};mxText.prototype.getShapeRotation=function(){return 0};mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
|
||||
mxText.prototype.configureCanvas=function(a,b,c,d,e){mxShape.prototype.configureCanvas.apply(this,arguments);a.setFontColor(this.color);a.setFontBackgroundColor(this.background);a.setFontBorderColor(this.border);a.setFontFamily(this.family);a.setFontSize(this.size);a.setFontStyle(this.fontStyle)};
|
||||
mxText.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width="1px";this.node.style.height="1px";this.node.style.overflow="visible"};
|
||||
mxText.prototype.redrawHtmlShape=function(){var a=this.node.style;a.whiteSpace="normal";a.overflow="";a.width="";a.height="";this.updateValue();this.updateFont(this.node);this.updateSize(this.node,null==this.state||null==this.state.view.textDiv);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()};
|
||||
|
@ -848,7 +849,7 @@ mxCell.prototype.isCollapsed=function(){return 0!=this.collapsed};mxCell.prototy
|
|||
mxCell.prototype.getIndex=function(a){return mxUtils.indexOf(this.children,a)};mxCell.prototype.getChildAt=function(a){return null==this.children?null:this.children[a]};mxCell.prototype.insert=function(a,b){null!=a&&(null==b&&(b=this.getChildCount(),a.getParent()==this&&b--),a.removeFromParent(),a.setParent(this),null==this.children?(this.children=[],this.children.push(a)):this.children.splice(b,0,a));return a};
|
||||
mxCell.prototype.remove=function(a){var b=null;null!=this.children&&0<=a&&(b=this.getChildAt(a),null!=b&&(this.children.splice(a,1),b.setParent(null)));return b};mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var a=this.parent.getIndex(this);this.parent.remove(a)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(a){return mxUtils.indexOf(this.edges,a)};
|
||||
mxCell.prototype.getEdgeAt=function(a){return null==this.edges?null:this.edges[a]};mxCell.prototype.insertEdge=function(a,b){if(null!=a&&(a.removeFromTerminal(b),a.setTerminal(this,b),null==this.edges||a.getTerminal(!b)!=this||0>mxUtils.indexOf(this.edges,a)))null==this.edges&&(this.edges=[]),this.edges.push(a);return a};mxCell.prototype.removeEdge=function(a,b){if(null!=a){if(a.getTerminal(!b)!=this&&null!=this.edges){var c=this.getEdgeIndex(a);0<=c&&this.edges.splice(c,1)}a.setTerminal(null,b)}return a};
|
||||
mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var b=this.getValue();return null!=b&&b.nodeType==mxConstants.NODETYPE_ELEMENT?b.hasAttribute(a):!1};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};
|
||||
mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var b=this.getValue();return null!=b&&b.nodeType==mxConstants.NODETYPE_ELEMENT&&b.hasAttribute?b.hasAttribute(a):null!=b.getAttribute(a)};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};
|
||||
mxCell.prototype.setAttribute=function(a,b){var c=this.getValue();null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.setAttribute(a,b)};mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(){var a=this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,b,c,d){mxRectangle.call(this,a,b,c,d)}mxGeometry.prototype=new mxRectangle;
|
||||
mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1;
|
||||
mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,b){b?this.sourcePoint=a:this.targetPoint=a;return a};
|
||||
|
@ -956,9 +957,9 @@ e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a));mxEvent.consume(b)},f
|
|||
mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0};
|
||||
mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(c){var e=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(c).nodeName||mxClient.IS_TOUCH)e=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b.container,e,c),e=b.view.getState(b.getCellAt(c.x,c.y));return e};mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c,a))}),mxUtils.bind(this,
|
||||
function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d,c(d)))}),mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d,c(d)))}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&(b.dblClick(c,a.cell),mxEvent.consume(c))}))};
|
||||
mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph;b&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),a.text.opacity=mxUtils.getValue(a.style,mxConstants.STYLE_TEXT_OPACITY,100));var e=this.getLabelBounds(a),f=
|
||||
d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,h=a.style[mxConstants.STYLE_OVERFLOW]||"visible";if(b||a.text.value!=c||a.text.isWrapping!=f||a.text.overflow!=h||a.text.isClipping!=d||a.text.scale!=this.getTextScale(a)||a.text.dialect!=g||!a.text.bounds.equals(e))a.text.dialect=g,a.text.value=c,a.text.bounds=e,a.text.scale=this.getTextScale(a),a.text.wrap=f,a.text.clipped=d,a.text.overflow=
|
||||
h,c=a.text.node.style.visibility,this.redrawLabelShape(a.text),a.text.node.style.visibility=c}};
|
||||
mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph;b&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),a.text.valign=d.getVerticalAlign(a));var e=this.getLabelBounds(a),f=d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),
|
||||
g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,h=a.style[mxConstants.STYLE_OVERFLOW]||"visible";if(b||a.text.value!=c||a.text.isWrapping!=f||a.text.overflow!=h||a.text.isClipping!=d||a.text.scale!=this.getTextScale(a)||a.text.dialect!=g||!a.text.bounds.equals(e))a.text.dialect=g,a.text.value=c,a.text.bounds=e,a.text.scale=this.getTextScale(a),a.text.wrap=f,a.text.clipped=d,a.text.overflow=h,c=a.text.node.style.visibility,this.redrawLabelShape(a.text),
|
||||
a.text.node.style.visibility=c}};
|
||||
mxCellRenderer.prototype.isTextShapeInvalid=function(a,b){function c(c,e,f){return b[c]!=(a.style[e]||f)}return c("fontStyle",mxConstants.STYLE_FONTSTYLE,mxConstants.DEFAULT_FONTSTYLE)||c("family",mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY)||c("size",mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)||c("color",mxConstants.STYLE_FONTCOLOR,"black")||c("align",mxConstants.STYLE_ALIGN,"")||c("valign",mxConstants.STYLE_VERTICAL_ALIGN,"")||c("spacing",mxConstants.STYLE_SPACING,2)||
|
||||
c("spacingTop",mxConstants.STYLE_SPACING_TOP,2)||c("spacingRight",mxConstants.STYLE_SPACING_RIGHT,2)||c("spacingBottom",mxConstants.STYLE_SPACING_BOTTOM,2)||c("spacingLeft",mxConstants.STYLE_SPACING_LEFT,2)||c("horizontal",mxConstants.STYLE_HORIZONTAL,!0)||c("background",mxConstants.STYLE_LABEL_BACKGROUNDCOLOR)||c("border",mxConstants.STYLE_LABEL_BORDERCOLOR)||c("opacity",mxConstants.STYLE_TEXT_OPACITY,100)||c("textDirection",mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION)};
|
||||
mxCellRenderer.prototype.redrawLabelShape=function(a){a.redraw()};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};
|
||||
|
@ -1098,7 +1099,7 @@ mxGraph.prototype.resetEdgesOnResize=!1;mxGraph.prototype.resetEdgesOnMove=!1;mx
|
|||
mxGraph.prototype.swimlaneNesting=!0;mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=0.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
|
||||
mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
|
||||
mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(a){return this.isEditing()||!this.isMouseDown&&!mxEvent.isShiftDown(a)})));8==document.documentMode&&
|
||||
a.insertAdjacentHTML("beforeend",'\x3cv:group style\x3d"DISPLAY: none;"\x3e\x3c/v:group\x3e')};
|
||||
a.insertAdjacentHTML("beforeend","\x3c"+mxClient.VML_PREFIX+':group style\x3d"DISPLAY: none;"\x3e\x3c/'+mxClient.VML_PREFIX+":group\x3e")};
|
||||
mxGraph.prototype.createHandlers=function(){this.tooltipHandler=this.createTooltipHandler();this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=this.createSelectionCellsHandler();this.connectionHandler=this.createConnectionHandler();this.connectionHandler.setEnabled(!1);this.graphHandler=this.createGraphHandler();this.panningHandler=this.createPanningHandler();this.panningHandler.panningEnabled=!1;this.popupMenuHandler=this.createPopupMenuHandler()};
|
||||
mxGraph.prototype.createTooltipHandler=function(){return new mxTooltipHandler(this)};mxGraph.prototype.createSelectionCellsHandler=function(){return new mxSelectionCellsHandler(this)};mxGraph.prototype.createConnectionHandler=function(){return new mxConnectionHandler(this)};mxGraph.prototype.createGraphHandler=function(){return new mxGraphHandler(this)};mxGraph.prototype.createPanningHandler=function(){return new mxPanningHandler(this)};mxGraph.prototype.createPopupMenuHandler=function(){return new mxPopupMenuHandler(this)};
|
||||
mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
|
||||
|
|
169
war/js/viewer.min.js
vendored
169
war/js/viewer.min.js
vendored
|
@ -203,8 +203,8 @@ var mxClient={VERSION:"3.7.0.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_
|
|||
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/")||
|
||||
0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_WIN:0<navigator.appVersion.indexOf("Win"),
|
||||
IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('\x3clink rel\x3d"'+a+'" href\x3d"'+b+'" charset\x3d"ISO-8859-1" type\x3d"text/css"/\x3e');else{var d=c.createElement("link");d.setAttribute("rel",
|
||||
a);d.setAttribute("href",b);d.setAttribute("charset","ISO-8859-1");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
|
||||
IS_MAC:0<navigator.appVersion.indexOf("Mac"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('\x3clink rel\x3d"'+a+'" href\x3d"'+b+'" charset\x3d"UTF-8" type\x3d"text/css"/\x3e');else{var d=c.createElement("link");d.setAttribute("rel",
|
||||
a);d.setAttribute("href",b);d.setAttribute("charset","UTF-8");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
|
||||
"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);"undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";
|
||||
"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;
|
||||
mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
|
||||
|
@ -669,26 +669,27 @@ a.lineTo(y+z*f,v-u*f),a.quadTo(H,N,D,G),function(b,c){E.push(function(){a.lineTo
|
|||
a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,s,m,d,f,n,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-u,-z,c,e,f,n,!0),a.stroke(),a.end()))}};
|
||||
mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,k,l,n){g=k/g;var m=k*e/2;k=-k*d/2;var p=(l+f)*d;f=(l+f)*e;n?a.moveTo(b-m+p,c-k+f):a.lineTo(b-m+p,c-k+f);a.lineTo(b-m/g+p,c-k/g+f);a.lineTo(b+l*d,c+l*e);a.lineTo(b+m/g+p,c+k/g+f);a.lineTo(b+m+p,c+k+f)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
|
||||
mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
|
||||
function mxText(a,b,c,d,e,f,g,k,l,n,m,p,r,s,q,t,u,v,x,z,y){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(n||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(p||
|
||||
0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=s?s:!0;this.background=q;this.border=t;this.wrap=null!=u?u:!1;this.clipped=null!=v?v:!1;this.overflow=null!=x?x:"visible";this.labelPadding=null!=z?z:0;this.textDirection=y;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
|
||||
mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
|
||||
function mxText(a,b,c,d,e,f,g,k,l,n,m,p,r,s,q,t,u,v,x,z,y){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(n||0);this.spacingRight=this.spacing+parseInt(m||0);
|
||||
this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=s?s:!0;this.background=q;this.border=t;this.wrap=null!=u?u:!1;this.clipped=null!=v?v:!1;this.overflow=null!=x?x:"visible";this.labelPadding=null!=z?z:0;this.textDirection=y;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
|
||||
mxText.prototype.replaceLinefeeds=!0;mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
|
||||
mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
|
||||
mxText.prototype.paint=function(a,b){var c=this.scale,d=this.bounds.x/c,e=this.bounds.y/c,f=this.bounds.width/c,c=this.bounds.height/c;this.updateTransform(a,d,e,f,c);this.configureCanvas(a,d,e,f,c);if(b){var g=null!=this.state?this.state.unscaledWidth:null;null!=this.node.firstChild&&this.lastUnscaledWidth!=g&&a.invalidateCachedOffsetSize(this.node);a.updateText(d,e,f,c,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node)}else{var k=(g=mxUtils.isNode(this.value)||
|
||||
this.dialect==mxConstants.DIALECT_STRICTHTML)||a instanceof mxVmlCanvas2D?"html":"",l=this.value;!g&&"html"==k&&(l=mxUtils.htmlEntities(l,!1));"html"==k&&!mxUtils.isNode(this.value)&&(l=mxUtils.replaceTrailingNewlines(l,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));var l=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==k?l.replace(/\n/g,"\x3cbr/\x3e"):l,n=this.textDirection;n==mxConstants.TEXT_DIRECTION_AUTO&&!g&&(n=this.getAutoDirection());n!=mxConstants.TEXT_DIRECTION_LTR&&n!=mxConstants.TEXT_DIRECTION_RTL&&
|
||||
(n=null);a.text(d,e,f,c,l,this.align,this.valign,this.wrap,k,this.overflow,this.clipped,this.getTextRotation(),n)}this.lastUnscaledWidth=null!=this.state?this.state.unscaledWidth:null};
|
||||
mxText.prototype.redraw=function(){if(this.visible&&this.checkBounds()&&this.cacheEnabled&&this.lastValue==this.value&&(mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML))if("DIV"==this.node.nodeName&&(this.isHtmlAllowed()||!mxClient.IS_VML))this.updateSize(this.node,null==this.state||null==this.state.view.textDiv),mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform(),this.updateBoundingBox();else{var a=this.createCanvas();
|
||||
null!=a&&null!=a.updateText&&null!=a.invalidateCachedOffsetSize?(this.paint(a,!0),this.destroyCanvas(a),this.updateBoundingBox()):mxShape.prototype.redraw.apply(this,arguments)}else mxShape.prototype.redraw.apply(this,arguments),mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML?this.lastValue=this.value:this.lastValue=null};
|
||||
mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.valign=this.align="";this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacing=2;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=0;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;delete this.margin};
|
||||
mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.align=mxConstants.ALIGN_CENTER;this.valign=mxConstants.ALIGN_MIDDLE;this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacing=2;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=0;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;
|
||||
delete this.margin};
|
||||
mxText.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign=
|
||||
mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing),this.spacingTop=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop)+this.spacing,this.spacingRight=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight)+this.spacing,this.spacingBottom=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom)+this.spacing,this.spacingLeft=mxUtils.getValue(this.style,
|
||||
mxConstants.STYLE_SPACING_LEFT,this.spacingLeft)+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.updateMargin());this.flipH=this.flipV=
|
||||
null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0<a.length&&"z"<a[0]?mxConstants.TEXT_DIRECTION_RTL:mxConstants.TEXT_DIRECTION_LTR};
|
||||
mxConstants.STYLE_SPACING_LEFT,this.spacingLeft)+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_OPACITY,
|
||||
100),this.updateMargin());this.flipH=this.flipV=null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0<a.length&&"z"<a[0]?mxConstants.TEXT_DIRECTION_RTL:mxConstants.TEXT_DIRECTION_LTR};
|
||||
mxText.prototype.updateBoundingBox=function(){var a=this.node;this.boundingBox=this.bounds.clone();var b=this.getTextRotation(),c=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER):null,d=null!=this.style?mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE):null;if(!this.ignoreStringSize&&null!=a&&"fill"!=this.overflow&&(!this.clipped||!this.ignoreClippedStringSize||c!=mxConstants.ALIGN_CENTER||d!=mxConstants.ALIGN_MIDDLE)){d=
|
||||
c=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,c=parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();if("string"==typeof this.value&&0==mxUtils.trim(this.value)){this.boundingBox=null;return}if(0==e.width&&0==e.height){this.boundingBox=null;return}this.boundingBox=new mxRectangle(e.x,e.y,e.width,e.height);b=0}catch(f){}else c=
|
||||
null!=this.state?this.state.view.textDiv:null,null!=this.offsetWidth&&null!=this.offsetHeight||(null!=c&&(this.updateFont(c),this.updateSize(c,!1),this.updateInnerHtml(c),a=c),e=a,8==document.documentMode&&!mxClient.IS_EM?(d=Math.round(this.bounds.width/this.scale),this.wrap&&0<d?(a.style.wordWrap=mxConstants.WORD_WRAP,a.style.whiteSpace="normal","break-word"!=a.style.wordWrap&&(a=e.getElementsByTagName("div"),0<a.length&&(e=a[a.length-1]),c=e.offsetWidth+2,a=this.node.getElementsByTagName("div"),
|
||||
this.clipped&&(c=Math.min(d,c)),1<a.length&&(a[a.length-2].style.width=c+"px"))):a.style.whiteSpace="nowrap"):null!=e.firstChild&&"DIV"==e.firstChild.nodeName&&(e=e.firstChild),this.offsetWidth=e.offsetWidth+this.textWidthPadding,this.offsetHeight=e.offsetHeight),c=this.offsetWidth*this.scale,d=this.offsetHeight*this.scale;null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x+this.margin.x*c,this.bounds.y+this.margin.y*d,c,d))}else this.boundingBox.x+=this.margin.x*this.boundingBox.width,
|
||||
this.boundingBox.y+=this.margin.y*this.boundingBox.height;null!=this.boundingBox&&(0!=b?(this.unrotatedBoundingBox=mxRectangle.fromRectangle(this.boundingBox),b=mxUtils.getBoundingBox(this.boundingBox,b),this.boundingBox.x=b.x,this.boundingBox.y=b.y,mxClient.IS_QUIRKS||(this.boundingBox.width=b.width,this.boundingBox.height=b.height)):this.unrotatedBoundingBox=null)};mxText.prototype.getShapeRotation=function(){return 0};
|
||||
mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
|
||||
c=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,c=parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();"string"==typeof this.value&&0==mxUtils.trim(this.value)?this.boundingBox=null:this.boundingBox=0==e.width&&0==e.height?null:new mxRectangle(e.x,e.y,e.width,e.height);return}catch(f){}else c=null!=this.state?this.state.view.textDiv:
|
||||
null,null!=this.offsetWidth&&null!=this.offsetHeight||(null!=c&&(this.updateFont(c),this.updateSize(c,!1),this.updateInnerHtml(c),a=c),e=a,8==document.documentMode&&!mxClient.IS_EM?(d=Math.round(this.bounds.width/this.scale),this.wrap&&0<d?(a.style.wordWrap=mxConstants.WORD_WRAP,a.style.whiteSpace="normal","break-word"!=a.style.wordWrap&&(a=e.getElementsByTagName("div"),0<a.length&&(e=a[a.length-1]),c=e.offsetWidth+2,a=this.node.getElementsByTagName("div"),this.clipped&&(c=Math.min(d,c)),1<a.length&&
|
||||
(a[a.length-2].style.width=c+"px"))):a.style.whiteSpace="nowrap"):null!=e.firstChild&&"DIV"==e.firstChild.nodeName&&(e=e.firstChild),this.offsetWidth=e.offsetWidth+this.textWidthPadding,this.offsetHeight=e.offsetHeight),c=this.offsetWidth*this.scale,d=this.offsetHeight*this.scale;null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x,this.bounds.y,c,d))}null!=this.boundingBox&&(0!=b?(b=mxUtils.getBoundingBox(new mxRectangle(this.margin.x*this.boundingBox.width,this.margin.y*this.boundingBox.height,
|
||||
this.boundingBox.width,this.boundingBox.height),b,new mxPoint(0,0)),this.unrotatedBoundingBox=mxRectangle.fromRectangle(this.boundingBox),this.unrotatedBoundingBox.x+=this.margin.x*this.unrotatedBoundingBox.width,this.unrotatedBoundingBox.y+=this.margin.y*this.unrotatedBoundingBox.height,this.boundingBox.x+=b.x,this.boundingBox.y+=b.y,this.boundingBox.width=b.width,this.boundingBox.height=b.height):(this.boundingBox.x+=this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height,
|
||||
this.unrotatedBoundingBox=null))};mxText.prototype.getShapeRotation=function(){return 0};mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
|
||||
mxText.prototype.configureCanvas=function(a,b,c,d,e){mxShape.prototype.configureCanvas.apply(this,arguments);a.setFontColor(this.color);a.setFontBackgroundColor(this.background);a.setFontBorderColor(this.border);a.setFontFamily(this.family);a.setFontSize(this.size);a.setFontStyle(this.fontStyle)};
|
||||
mxText.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width="1px";this.node.style.height="1px";this.node.style.overflow="visible"};
|
||||
mxText.prototype.redrawHtmlShape=function(){var a=this.node.style;a.whiteSpace="normal";a.overflow="";a.width="";a.height="";this.updateValue();this.updateFont(this.node);this.updateSize(this.node,null==this.state||null==this.state.view.textDiv);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()};
|
||||
|
@ -988,7 +989,7 @@ mxCell.prototype.isCollapsed=function(){return 0!=this.collapsed};mxCell.prototy
|
|||
mxCell.prototype.getIndex=function(a){return mxUtils.indexOf(this.children,a)};mxCell.prototype.getChildAt=function(a){return null==this.children?null:this.children[a]};mxCell.prototype.insert=function(a,b){null!=a&&(null==b&&(b=this.getChildCount(),a.getParent()==this&&b--),a.removeFromParent(),a.setParent(this),null==this.children?(this.children=[],this.children.push(a)):this.children.splice(b,0,a));return a};
|
||||
mxCell.prototype.remove=function(a){var b=null;null!=this.children&&0<=a&&(b=this.getChildAt(a),null!=b&&(this.children.splice(a,1),b.setParent(null)));return b};mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var a=this.parent.getIndex(this);this.parent.remove(a)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(a){return mxUtils.indexOf(this.edges,a)};
|
||||
mxCell.prototype.getEdgeAt=function(a){return null==this.edges?null:this.edges[a]};mxCell.prototype.insertEdge=function(a,b){if(null!=a&&(a.removeFromTerminal(b),a.setTerminal(this,b),null==this.edges||a.getTerminal(!b)!=this||0>mxUtils.indexOf(this.edges,a)))null==this.edges&&(this.edges=[]),this.edges.push(a);return a};mxCell.prototype.removeEdge=function(a,b){if(null!=a){if(a.getTerminal(!b)!=this&&null!=this.edges){var c=this.getEdgeIndex(a);0<=c&&this.edges.splice(c,1)}a.setTerminal(null,b)}return a};
|
||||
mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var b=this.getValue();return null!=b&&b.nodeType==mxConstants.NODETYPE_ELEMENT?b.hasAttribute(a):!1};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};
|
||||
mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.hasAttribute=function(a){var b=this.getValue();return null!=b&&b.nodeType==mxConstants.NODETYPE_ELEMENT&&b.hasAttribute?b.hasAttribute(a):null!=b.getAttribute(a)};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};
|
||||
mxCell.prototype.setAttribute=function(a,b){var c=this.getValue();null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.setAttribute(a,b)};mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(){var a=this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,b,c,d){mxRectangle.call(this,a,b,c,d)}mxGeometry.prototype=new mxRectangle;
|
||||
mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1;
|
||||
mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,b){b?this.sourcePoint=a:this.targetPoint=a;return a};
|
||||
|
@ -1027,7 +1028,7 @@ g.writeln(k);mxClient.IS_VML?g.writeln('\x3chtml xmlns:v\x3d"urn:schemas-microso
|
|||
(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var r=this.pageFormat.width-2*this.border,s=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=m;l.height/=m;var q=Math.max(1,Math.ceil((l.width+this.x0)/r)),t=Math.max(1,Math.ceil((l.height+this.y0)/s));this.pageCount=q*t;var u=mxUtils.bind(this,function(){if(this.pageSelector&&(1<t||1<q)){var a=this.createPageSelector(t,q);g.body.appendChild(a);
|
||||
if(mxClient.IS_IE&&null==g.documentMode||5==g.documentMode||8==g.documentMode||7==g.documentMode){a.style.position="absolute";var b=function(){a.style.top=(g.body.scrollTop||g.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}}),v=mxUtils.bind(this,function(a,b){null!=this.borderColor&&(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background=this.backgroundColor;
|
||||
if(c||b)a.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),g.body.appendChild(a));(c||b)&&this.addPageBreak(g)}),x=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=x)for(var z=0;z<x.length;z++)v(x[z],!0);for(var y=this.getAppendices(this.pageFormat.width,this.pageFormat.height),z=0;z<t;z++){var A=z*s/this.scale-this.y0/this.scale+(l.y-p.y*n)/n;for(a=0;a<
|
||||
q;a++){if(null==this.wnd)return null;var D=a*r/this.scale-this.x0/this.scale+(l.x-p.x*n)/n,E=z*q+a+1,B=new mxRectangle(D,A,r,s),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-D,-A,this.scale,E,a,B);this.printBackgroundImage&&this.insertBackgroundImage(a,-D,-A)}),E);f.setAttribute("id","mxPage-"+E);v(f,null!=y||z<t-1||a<q-1)}}if(null!=y)for(z=0;z<y.length;z++)v(y[z],z<y.length);b&&!d&&(this.closeDocument(),u());this.wnd.focus()}catch(F){null!=
|
||||
q;a++){if(null==this.wnd)return null;var D=a*r/this.scale-this.x0/this.scale+(l.x-p.x*n)/n,E=z*q+a+1,B=new mxRectangle(D,A,r,s),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-D,-A,this.scale,E,a,B);this.printBackgroundImage&&this.insertBackgroundImage(a,-D,-A)}),E);f.setAttribute("id","mxPage-"+E);v(f,null!=y||z<t-1||a<q-1)}}if(null!=y)for(z=0;z<y.length;z++)v(y[z],z<y.length-1);b&&!d&&(this.closeDocument(),u());this.wnd.focus()}catch(F){null!=
|
||||
f&&null!=f.parentNode&&f.parentNode.removeChild(f)}finally{this.graph.cellRenderer.initializeOverlay=e}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var b=a.createElement("hr");b.className="mxPageBreak";a.body.appendChild(b)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close();mxEvent.release(a.body)}};
|
||||
mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("\x3ctitle\x3e"+this.title+"\x3c/title\x3e");mxClient.IS_VML&&a.writeln('\x3cstyle type\x3d"text/css"\x3ev\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}\x3c/style\x3e');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('\x3cstyle type\x3d"text/css"\x3e');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");
|
||||
a.writeln("}");a.writeln("@media screen {");a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("\x3c/style\x3e")};mxPrintPreview.prototype.writePostfix=function(a){};
|
||||
|
@ -1121,9 +1122,9 @@ e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a));mxEvent.consume(b)},f
|
|||
mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0};
|
||||
mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(c){var e=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(c).nodeName||mxClient.IS_TOUCH)e=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b.container,e,c),e=b.view.getState(b.getCellAt(c.x,c.y));return e};mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c,a))}),mxUtils.bind(this,
|
||||
function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d,c(d)))}),mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d,c(d)))}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&(b.dblClick(c,a.cell),mxEvent.consume(c))}))};
|
||||
mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph;b&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),a.text.opacity=mxUtils.getValue(a.style,mxConstants.STYLE_TEXT_OPACITY,100));var e=this.getLabelBounds(a),f=
|
||||
d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,k=a.style[mxConstants.STYLE_OVERFLOW]||"visible";if(b||a.text.value!=c||a.text.isWrapping!=f||a.text.overflow!=k||a.text.isClipping!=d||a.text.scale!=this.getTextScale(a)||a.text.dialect!=g||!a.text.bounds.equals(e))a.text.dialect=g,a.text.value=c,a.text.bounds=e,a.text.scale=this.getTextScale(a),a.text.wrap=f,a.text.clipped=d,a.text.overflow=
|
||||
k,c=a.text.node.style.visibility,this.redrawLabelShape(a.text),a.text.node.style.visibility=c}};
|
||||
mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph;b&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),a.text.valign=d.getVerticalAlign(a));var e=this.getLabelBounds(a),f=d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),
|
||||
g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,k=a.style[mxConstants.STYLE_OVERFLOW]||"visible";if(b||a.text.value!=c||a.text.isWrapping!=f||a.text.overflow!=k||a.text.isClipping!=d||a.text.scale!=this.getTextScale(a)||a.text.dialect!=g||!a.text.bounds.equals(e))a.text.dialect=g,a.text.value=c,a.text.bounds=e,a.text.scale=this.getTextScale(a),a.text.wrap=f,a.text.clipped=d,a.text.overflow=k,c=a.text.node.style.visibility,this.redrawLabelShape(a.text),
|
||||
a.text.node.style.visibility=c}};
|
||||
mxCellRenderer.prototype.isTextShapeInvalid=function(a,b){function c(c,e,f){return b[c]!=(a.style[e]||f)}return c("fontStyle",mxConstants.STYLE_FONTSTYLE,mxConstants.DEFAULT_FONTSTYLE)||c("family",mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY)||c("size",mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)||c("color",mxConstants.STYLE_FONTCOLOR,"black")||c("align",mxConstants.STYLE_ALIGN,"")||c("valign",mxConstants.STYLE_VERTICAL_ALIGN,"")||c("spacing",mxConstants.STYLE_SPACING,2)||
|
||||
c("spacingTop",mxConstants.STYLE_SPACING_TOP,2)||c("spacingRight",mxConstants.STYLE_SPACING_RIGHT,2)||c("spacingBottom",mxConstants.STYLE_SPACING_BOTTOM,2)||c("spacingLeft",mxConstants.STYLE_SPACING_LEFT,2)||c("horizontal",mxConstants.STYLE_HORIZONTAL,!0)||c("background",mxConstants.STYLE_LABEL_BACKGROUNDCOLOR)||c("border",mxConstants.STYLE_LABEL_BORDERCOLOR)||c("opacity",mxConstants.STYLE_TEXT_OPACITY,100)||c("textDirection",mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION)};
|
||||
mxCellRenderer.prototype.redrawLabelShape=function(a){a.redraw()};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};
|
||||
|
@ -1263,7 +1264,7 @@ mxGraph.prototype.resetEdgesOnResize=!1;mxGraph.prototype.resetEdgesOnMove=!1;mx
|
|||
mxGraph.prototype.swimlaneNesting=!0;mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=0.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
|
||||
mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
|
||||
mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(a){return this.isEditing()||!this.isMouseDown&&!mxEvent.isShiftDown(a)})));8==document.documentMode&&
|
||||
a.insertAdjacentHTML("beforeend",'\x3cv:group style\x3d"DISPLAY: none;"\x3e\x3c/v:group\x3e')};
|
||||
a.insertAdjacentHTML("beforeend","\x3c"+mxClient.VML_PREFIX+':group style\x3d"DISPLAY: none;"\x3e\x3c/'+mxClient.VML_PREFIX+":group\x3e")};
|
||||
mxGraph.prototype.createHandlers=function(){this.tooltipHandler=this.createTooltipHandler();this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=this.createSelectionCellsHandler();this.connectionHandler=this.createConnectionHandler();this.connectionHandler.setEnabled(!1);this.graphHandler=this.createGraphHandler();this.panningHandler=this.createPanningHandler();this.panningHandler.panningEnabled=!1;this.popupMenuHandler=this.createPopupMenuHandler()};
|
||||
mxGraph.prototype.createTooltipHandler=function(){return new mxTooltipHandler(this)};mxGraph.prototype.createSelectionCellsHandler=function(){return new mxSelectionCellsHandler(this)};mxGraph.prototype.createConnectionHandler=function(){return new mxConnectionHandler(this)};mxGraph.prototype.createGraphHandler=function(){return new mxGraphHandler(this)};mxGraph.prototype.createPanningHandler=function(){return new mxPanningHandler(this)};mxGraph.prototype.createPopupMenuHandler=function(){return new mxPopupMenuHandler(this)};
|
||||
mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
|
||||
|
@ -1557,7 +1558,7 @@ mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=b.sourc
|
|||
mxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()){var c=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var d=b.getCell();if(this.connectOnDrop&&null==this.target&&null!=d&&c.getModel().isVertex(d)&&c.isCellConnectable(d)&&c.isEdgeValid(null,this.cell,d))c.connectionHandler.connect(this.cell,d,b.getEvent());else{var d=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),e=c.getView().scale,f=this.roundLength(this.currentDx/
|
||||
e),e=this.roundLength(this.currentDy/e),g=this.target;c.isSplitEnabled()&&c.isSplitTarget(g,this.cells,b.getEvent())?c.splitEdge(g,this.cells,null,f,e):this.moveCells(this.cells,f,e,d,this.target,b.getEvent())}}else this.isSelectEnabled()&&this.delayedSelection&&null!=this.cell&&this.selectDelayed(b)}this.cellWasClicked&&b.consume();this.reset()};
|
||||
mxGraphHandler.prototype.selectDelayed=function(a){(!this.graph.isCellSelected(this.cell)||!this.graph.popupMenuHandler.isPopupTrigger(a))&&this.graph.selectCellForEvent(this.cell,a.getEvent())};mxGraphHandler.prototype.reset=function(){this.destroyShapes();this.removeHint();this.delayedSelection=this.cellWasClicked=!1;this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null};
|
||||
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)){a=this.graph.getView().getState(a);c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return null!=a&&!mxUtils.contains(a,c.x,c.y)}return!1};
|
||||
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)&&(a=this.graph.getView().getState(a),null!=a)){c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return!mxUtils.contains(a,c.x,c.y)}return!1};
|
||||
mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));null==e&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),a,f)&&(e=this.graph.getDefaultParent());a=this.graph.moveCells(a,b-this.graph.panDx/this.graph.view.scale,c-this.graph.panDy/this.graph.view.scale,d,e,f);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0]);d&&this.graph.setSelectionCells(a)};
|
||||
mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null);this.destroyShapes();this.removeHint()};
|
||||
function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");d==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(e)&&(this.start(e),this.active=!0,this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",e)),e.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler),this.gestureHandler=mxUtils.bind(this,function(a,c){if(this.isPinchEnabled()){var d=
|
||||
|
@ -1938,7 +1939,7 @@ a),null!=b&&(this.graph.constrainChild(b),this.fireEvent(new mxEventObject(mxEve
|
|||
mxEditor.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tasks&&this.tasks.destroy(),null!=this.outline&&this.outline.destroy(),null!=this.properties&&this.properties.destroy(),null!=this.keyHandler&&this.keyHandler.destroy(),null!=this.rubberband&&this.rubberband.destroy(),null!=this.toolbar&&this.toolbar.destroy(),null!=this.graph&&this.graph.destroy(),this.templates=this.status=null)};
|
||||
var mxCodecRegistry={codecs:[],aliases:[],register:function(a){if(null!=a){var b=a.getName();mxCodecRegistry.codecs[b]=a;var c=mxUtils.getFunctionName(a.template.constructor);c!=b&&mxCodecRegistry.addAlias(c,b)}return a},addAlias:function(a,b){mxCodecRegistry.aliases[a]=b},getCodec:function(a){var b=null;if(null!=a){var b=mxUtils.getFunctionName(a),c=mxCodecRegistry.aliases[b];null!=c&&(b=c);b=mxCodecRegistry.codecs[b];if(null==b)try{b=new mxObjectCodec(new a),mxCodecRegistry.register(b)}catch(d){}}return b}};
|
||||
function mxCodec(a){this.document=a||mxUtils.createXmlDocument();this.objects=[]}mxCodec.prototype.document=null;mxCodec.prototype.objects=null;mxCodec.prototype.elements=null;mxCodec.prototype.encodeDefaults=!1;mxCodec.prototype.putObject=function(a,b){return this.objects[a]=b};mxCodec.prototype.getObject=function(a){var b=null;null!=a&&(b=this.objects[a],null==b&&(b=this.lookup(a),null==b&&(a=this.getElementById(a),null!=a&&(b=this.decode(a)))));return b};mxCodec.prototype.lookup=function(a){return null};
|
||||
mxCodec.prototype.getElementById=function(a){null==this.elements&&(this.elements={},this.addElement(this.document.documentElement));return this.elements[a]};mxCodec.prototype.addElement=function(a){if(a.nodeType==mxConstants.NODETYPE_ELEMENT){var b=a.getAttribute("id");null!=b&&null==this.elements[b]&&(this.elements[b]=a)}for(a=a.firstChild;null!=a;)this.addElement(a),a=a.nextSibling};
|
||||
mxCodec.prototype.getElementById=function(a){if(null==this.elements){if(null==this.document.documentElement)throw Error("mxCodec constructor needs document parameter");this.elements={};this.addElement(this.document.documentElement)}return this.elements[a]};mxCodec.prototype.addElement=function(a){if(a.nodeType==mxConstants.NODETYPE_ELEMENT){var b=a.getAttribute("id");null!=b&&null==this.elements[b]&&(this.elements[b]=a)}for(a=a.firstChild;null!=a;)this.addElement(a),a=a.nextSibling};
|
||||
mxCodec.prototype.getId=function(a){var b=null;null!=a&&(b=this.reference(a),null==b&&a instanceof mxCell&&(b=a.getId(),null==b&&(b=mxCellPath.create(a),0==b.length&&(b="root"))));return b};mxCodec.prototype.reference=function(a){return null};mxCodec.prototype.encode=function(a){var b=null;if(null!=a&&null!=a.constructor){var c=mxCodecRegistry.getCodec(a.constructor);null!=c?b=c.encode(this,a):mxUtils.isNode(a)?b=mxUtils.importNode(this.document,a,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(a.constructor))}return b};
|
||||
mxCodec.prototype.decode=function(a,b){var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=null;try{c=window[a.nodeName]}catch(d){}c=mxCodecRegistry.getCodec(c);null!=c?c=c.decode(this,a,b):(c=a.cloneNode(!0),c.removeAttribute("as"))}return c};mxCodec.prototype.encodeCell=function(a,b,c){b.appendChild(this.encode(a));if(null==c||c){c=a.getChildCount();for(var d=0;d<c;d++)this.encodeCell(a.getChildAt(d),b)}};
|
||||
mxCodec.prototype.isCellCodec=function(a){return null!=a&&"function"==typeof a.isCellCodec?a.isCellCodec():!1};mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=mxCodecRegistry.getCodec(a.nodeName);if(!this.isCellCodec(c))for(var d=a.firstChild;null!=d&&!this.isCellCodec(c);)c=mxCodecRegistry.getCodec(d.nodeName),d=d.nextSibling;this.isCellCodec(c)||(c=mxCodecRegistry.getCodec(mxCell));c=c.decode(this,a);b&&this.insertIntoGraph(c)}return c};
|
||||
|
@ -2684,42 +2685,43 @@ EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=t
|
|||
"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0<d&&(c=c.substring(0,d));c+=".png";d=this.createPngDataUri(a,b);this.saveLocalFile(d.substring(d.lastIndexOf(",")+1),c,"image/png",!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==
|
||||
typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d){if(window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(c),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",
|
||||
!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else if(!this.isOffline()&&mxClient.IS_SF)a="undefined"===typeof pako?"\x26xml\x3d"+encodeURIComponent(a):"\x26data\x3d"+encodeURIComponent(this.editor.graph.compress(a)),(new mxXmlRequest(SAVE_URL,"mime\x3d"+c+"\x26filename\x3d"+encodeURIComponent(b)+
|
||||
a)).simulate(document,"_blank");else{var e=document.createElement("a");e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));e.download=b;document.body.appendChild(e);mxClient.IS_SF&&e.setAttribute("target","_blank");try{e.click(),window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.parentNode.removeChild(e)}catch(f){}}};EditorUi.prototype.saveLocalFile=function(a,b,c,d){if(this.isOfflineApp()||this.isOffline())this.doSaveLocalFile(a,b,c,d);else{var e=!mxClient.IS_IOS||
|
||||
!navigator.standalone,f="function"===typeof window.DriveClient||"function"===typeof window.DropboxClient||"function"===typeof window.OneDriveClient;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f="undefined"===typeof pako?"\x26xml\x3d"+encodeURIComponent(a):"\x26data\x3d"+encodeURIComponent(this.editor.graph.compress(a));(new mxXmlRequest(SAVE_URL,"mime\x3d"+c+f)).simulate(document,"_blank")}else window.open("data:"+
|
||||
c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a)));else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(g){this.handleError(g)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e);this.showDialog(b.container,380,f?280:160,!0,!0);b.init()}};EditorUi.prototype.saveData=function(a,b,c,d){this.isLocalFileSave()?this.saveLocalFile(c,
|
||||
a,d):this.saveRequest(c,a,b,mxUtils.bind(this,function(a,d){var e="undefined"===typeof pako?"\x26xml\x3d"+encodeURIComponent(c):"\x26data\x3d"+encodeURIComponent(this.editor.graph.compress(c));return new mxXmlRequest(SAVE_URL,"format\x3d"+b+(null!=a?"\x26filename\x3d"+encodeURIComponent(a):"")+e)}))};EditorUi.prototype.saveRequest=function(a,b,c,d){a=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if("_blank"==b||null!=a&&0<a.length){var e=d("_blank"==
|
||||
b?null:a,b==App.MODE_DEVICE||null==b||"_blank"==b?"0":"1");b==App.MODE_DEVICE||"_blank"==b?e.simulate(document,"_blank"):this.pickFolder(b,mxUtils.bind(this,function(d){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200>e.getStatus()||299<e.getStatus())this.handleError({message:mxResources.get("errorSavingFile")});else try{var f="pdf"==c?"application/pdf":"image/"+c;this.exportFile(e.getText(),a,f,!0,b,d)}catch(g){this.handleError(g)}}),
|
||||
function(a){this.spinner.stop();this.handleError(a)})}))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,a);this.showDialog(b.container,380,270,!0,!0);b.init()};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&!1==b&&(g="#ffffff");var q=this.editor.graph.getSvg(g,
|
||||
a,null,null,null,c);d&&this.editor.addSvgShadow(q);a=this.getCurrentFile();var t=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=t.lastIndexOf(".");0<a&&(t=t.substring(0,a));t+=".svg";if(this.spinner.spin(document.body,mxResources.get("export"))){var u=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c));var b='\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+
|
||||
mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(t,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,q,!1,mxUtils.bind(this,function(){f?this.convertImages(q,u):u(q)}))}};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=this.editor.graph,e=document.createElement("div");e.style.padding="6px";var f=document.createElement("input");
|
||||
f.style.marginRight="8px";f.setAttribute("type","checkbox");d.isSelectionEmpty()&&f.setAttribute("disabled","disabled");e.appendChild(f);mxUtils.write(e,mxResources.get("selectionOnly"));mxUtils.br(e);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";e.appendChild(g);mxUtils.write(e,mxResources.get("includeCopyOfMyDiagram"));a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!f.checked,
|
||||
g.checked)}),null,a,b);this.showDialog(a.container,300,120,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d){var e=this.editor.graph,f=document.createElement("div");f.style.paddingTop="20px";f.style.paddingRight="8px";var g=document.createElement("input");g.style.marginRight="8px";g.setAttribute("type","checkbox");if(e.background==mxConstants.NONE||null==e.background)g.setAttribute("checked","checked"),g.defaultChecked=!0;f.appendChild(g);mxUtils.write(f,mxResources.get("transparentBackground"));
|
||||
mxUtils.br(f);var q=document.createElement("input");q.style.marginTop="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");e.isSelectionEmpty()&&q.setAttribute("disabled","disabled");f.appendChild(q);mxUtils.write(f,mxResources.get("selectionOnly"));mxUtils.br(f);var t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");f.appendChild(t);mxUtils.write(f,mxResources.get("shadow"));mxUtils.br(f);e.shadowVisible&&(t.setAttribute("checked",
|
||||
"checked"),t.defaultChecked=!0);var u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&u.setAttribute("disabled","disabled");a&&(f.appendChild(u),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f));var v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");v.style.marginBottom="8px";v.setAttribute("checked","checked");
|
||||
v.defaultChecked=!0;f.appendChild(v);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,!q.checked,t.checked,v.checked,u.checked)}),mxResources.get("zoom")+" (%)",null,f,!this.isOffline()?c:null);this.showDialog(b.container,320,a?266:240,!0,!0);b.init()};EditorUi.prototype.uploadToGithub=function(a,b,c){var d=this.spinner.pause();c=document.createElement("div");c.style.paddingTop="20px";c.style.paddingRight="8px";
|
||||
var e=document.createElement("table"),f=document.createElement("tbody"),g=document.createElement("tr"),q=document.createElement("td"),t=document.createElement("input");t.setAttribute("type","text");mxUtils.write(q,"Username:");g.appendChild(q);q=q.cloneNode(!1);q.appendChild(t);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),u=document.createElement("input");u.setAttribute("type","password");mxUtils.write(q,"Password:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(u);
|
||||
g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),v=document.createElement("input");v.setAttribute("type","text");mxUtils.write(q,"Organisation:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(v);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),x=document.createElement("input");x.setAttribute("type","text");mxUtils.write(q,"Repository:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(x);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),z=
|
||||
document.createElement("input");z.setAttribute("type","text");mxUtils.write(q,"Path:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(z);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var y=a.lastIndexOf(".");0<y&&(a=a.substring(0,y));z.value=a+".png";var A=document.createElement("input");A.setAttribute("type","text");mxUtils.write(q,"Branch/Tag:");A.value="master";g=g.cloneNode(!1);g.appendChild(q);
|
||||
q=q.cloneNode(!1);q.appendChild(A);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),D=document.createElement("input");D.setAttribute("type","text");mxUtils.write(q,"Message:");D.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(D);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);e.appendChild(f);c.appendChild(e);c=new FilenameDialog(this,null,mxResources.get("publish"),mxUtils.bind(this,function(){var a="https://api.github.com/repos/"+v.value+"/"+
|
||||
x.value+"/contents/"+z.value+"?ref\x3d"+encodeURIComponent(A.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());var e={path:z.value,message:D.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+v.value+"/"+x.value+"/blob/"+A.value+"/"+z.value;var b=
|
||||
new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(t.value+
|
||||
":"+u.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c,d){var e=this.spinner.pause(),f=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+
|
||||
b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){e();var f=null!=a.getTitle()?a.getTitle():this.defaultFilename,g=f.lastIndexOf("."),r=f;0<g&&(r=f=r.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:r+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),u=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};
|
||||
try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText()),e="https://www.draw.io/i/"+b.data.id;try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(g){}var k=mxUtils.bind(this,function(){this.spinner.stop();
|
||||
var a="https://imgur.com/"+b.data.id,f="https://www.draw.io/imgur?delete\x3d"+b.data.deletehash,a=new ErrorDialog(this,mxResources.get("published"),(c?mxResources.get("viewUrl",['\x3ca href\x3d"'+e+'" target\x3d"_blank"\x3e'+e+"\x3c/a\x3e"])+"\x3cbr\x3e":"")+mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[f]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),
|
||||
function(){d(b.data.id,c)},!1);this.showDialog(a.container,340,180,!0,!1);a.init()});if(c){var l=new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:mxResources.get("viewUrl",[e])}),"POST");l.send(mxUtils.bind(this,function(){200==l.getStatus()?k():u(l)}),mxUtils.bind(this,function(){u(l)}))}else k()}catch(p){this.handleError(p)}else u(a)}),mxUtils.bind(this,function(a){u(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,
|
||||
b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e,f,g,q){d=parseInt(d);if(!isNaN(d)&&0<d){d/=100;var t=this.editor.graph.isSelectionEmpty();f=null!=f?f:t;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=q?this.getFileData(!0,null,null,null,f):null,g=this.createPngDataUri(d,
|
||||
e);a(c,g.substring(g.lastIndexOf(",")+1),q,b)}catch(m){this.handleError(m)}}),null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(u){this.handleError(u)}}})):this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*
|
||||
f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var q=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));q.send(mxUtils.bind(this,function(){200==q.getStatus()?a(c,q.getText(),e,b):this.handleError(q)}))}catch(t){this.handleError(t)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);
|
||||
if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&
|
||||
(g=null));b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':
|
||||
"")+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e){if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c):null)}catch(b){"Invalid image"==b.message?this.downloadFile("png"):this.handleError(b)}}),null,null,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),
|
||||
null,c,a||1,b,d)}catch(g){this.spinner.stop(),this.handleError(g)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,t,u,v,x){f=null!=f?f:!0;x=null!=x?x:this.editor.graph;var z=t?null:x.background;z==mxConstants.NONE&&(z=null);null==z&&(z=d);null==z&&!1==t&&(z="#ffffff");this.convertImages(x.getSvg(z,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),
|
||||
m=parseInt(c.getAttribute("height"));q=null!=q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));e.setAttribute("width",Math.ceil(q*g));e.setAttribute("height",Math.ceil(q*m));g=e.getContext("2d");g.scale(q,q);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{u&&this.editor.addSvgShadow(c),this.convertMath(x,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=
|
||||
new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var n=a.getElementsByTagName(c),
|
||||
u=0;u<n.length;u++)mxUtils.bind(this,function(c){var n=d.convert(c.getAttribute(g));if(null!=n&&"data:"!=n.substring(0,5)){var s=f[n];null==s?(e++,this.convertImageToDataUri(n,function(d){null!=d&&(f[n]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,s)}})(n[u])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});
|
||||
else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),t=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=t&&"mxfile"==t.nodeName&&null!=this.pages){var u=t.getElementsByTagName("diagram");
|
||||
if(1==u.length)t=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(u[0]))).documentElement;else if(1<u.length){g.model.beginUpdate();try{for(var v=0;v<u.length;v++){var x=this.updatePageRoot(new DiagramPage(u[v])),z=this.pages.length;null==x.getName()&&x.setName(mxResources.get("pageWithNumber",[z+1]));g.model.execute(new ChangePage(this,x,x,z))}}finally{g.model.endUpdate()}}}if(null!=t&&"mxGraphModel"===t.nodeName){var y=new mxGraphModel;(new mxCodec(t.ownerDocument)).decode(t,y);var A=y.getChildCount(y.getRoot());
|
||||
a)).simulate(document,"_blank");else{var e=document.createElement("a");e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));e.download=b;document.body.appendChild(e);mxClient.IS_SF&&e.setAttribute("target","_blank");try{e.click(),window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.parentNode.removeChild(e)}catch(f){}}};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var q=1024*g,t=
|
||||
Math.min(q+1024,d),u=Array(t-q),v=0;q<t;++v,++q)u[v]=c[q].charCodeAt(0);f[g]=new Uint8Array(u)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d){if(this.isOfflineApp()||this.isOffline())this.doSaveLocalFile(a,b,c,d);else{var e=!mxClient.IS_IOS||!navigator.standalone,f="function"===typeof window.DriveClient||"function"===typeof window.DropboxClient||"function"===typeof window.OneDriveClient;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(mxClient.IS_EDGE||
|
||||
11==document.documentMode||10==document.documentMode){var f="undefined"===typeof pako?"\x26xml\x3d"+encodeURIComponent(a):"\x26data\x3d"+encodeURIComponent(this.editor.graph.compress(a));(new mxXmlRequest(SAVE_URL,"mime\x3d"+c+f)).simulate(document,"_blank")}else window.open("data:"+c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a)));else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(g){this.handleError(g)}}),
|
||||
mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e);this.showDialog(b.container,380,f?280:160,!0,!0);b.init()}};EditorUi.prototype.saveData=function(a,b,c,d){this.isLocalFileSave()?this.saveLocalFile(c,a,d):this.saveRequest(c,a,b,mxUtils.bind(this,function(a,d){var e="undefined"===typeof pako?"\x26xml\x3d"+encodeURIComponent(c):"\x26data\x3d"+encodeURIComponent(this.editor.graph.compress(c));return new mxXmlRequest(SAVE_URL,"format\x3d"+
|
||||
b+(null!=a?"\x26filename\x3d"+encodeURIComponent(a):"")+e)}))};EditorUi.prototype.saveRequest=function(a,b,c,d){a=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if("_blank"==b||null!=a&&0<a.length){var e=d("_blank"==b?null:a,b==App.MODE_DEVICE||null==b||"_blank"==b?"0":"1");b==App.MODE_DEVICE||"_blank"==b?e.simulate(document,"_blank"):this.pickFolder(b,mxUtils.bind(this,function(d){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,
|
||||
function(){this.spinner.stop();if(200>e.getStatus()||299<e.getStatus())this.handleError({message:mxResources.get("errorSavingFile")});else try{var f="pdf"==c?"application/pdf":"image/"+c;this.exportFile(e.getText(),a,f,!0,b,d)}catch(g){this.handleError(g)}}),function(a){this.spinner.stop();this.handleError(a)})}))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,a);this.showDialog(b.container,380,270,!0,!0);b.init()};EditorUi.prototype.exportFile=
|
||||
function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&!1==b&&(g="#ffffff");var q=this.editor.graph.getSvg(g,a,null,null,null,c);d&&this.editor.addSvgShadow(q);a=this.getCurrentFile();var t=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=t.lastIndexOf(".");0<a&&(t=t.substring(0,
|
||||
a));t+=".svg";if(this.spinner.spin(document.body,mxResources.get("export"))){var u=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c));var b='\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(t,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
|
||||
mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,q,!1,mxUtils.bind(this,function(){f?this.convertImages(q,u):u(q)}))}};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=this.editor.graph,e=document.createElement("div");e.style.padding="6px";var f=document.createElement("input");f.style.marginRight="8px";f.setAttribute("type","checkbox");d.isSelectionEmpty()&&f.setAttribute("disabled","disabled");e.appendChild(f);mxUtils.write(e,mxResources.get("selectionOnly"));
|
||||
mxUtils.br(e);var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";e.appendChild(g);mxUtils.write(e,mxResources.get("includeCopyOfMyDiagram"));a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,120,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d){var e=this.editor.graph,f=document.createElement("div");
|
||||
f.style.paddingTop="20px";f.style.paddingRight="8px";var g=document.createElement("input");g.style.marginRight="8px";g.setAttribute("type","checkbox");if(e.background==mxConstants.NONE||null==e.background)g.setAttribute("checked","checked"),g.defaultChecked=!0;f.appendChild(g);mxUtils.write(f,mxResources.get("transparentBackground"));mxUtils.br(f);var q=document.createElement("input");q.style.marginTop="16px";q.style.marginRight="8px";q.setAttribute("type","checkbox");e.isSelectionEmpty()&&q.setAttribute("disabled",
|
||||
"disabled");f.appendChild(q);mxUtils.write(f,mxResources.get("selectionOnly"));mxUtils.br(f);var t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.setAttribute("type","checkbox");f.appendChild(t);mxUtils.write(f,mxResources.get("shadow"));mxUtils.br(f);e.shadowVisible&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);var u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.setAttribute("type","checkbox");(this.isOffline()||
|
||||
!this.canvasSupported)&&u.setAttribute("disabled","disabled");a&&(f.appendChild(u),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f));var v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.setAttribute("type","checkbox");v.style.marginBottom="8px";v.setAttribute("checked","checked");v.defaultChecked=!0;f.appendChild(v);mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));b=new FilenameDialog(this,100,b,mxUtils.bind(this,function(a){d(a,g.checked,
|
||||
!q.checked,t.checked,v.checked,u.checked)}),mxResources.get("zoom")+" (%)",null,f,!this.isOffline()?c:null);this.showDialog(b.container,320,a?266:240,!0,!0);b.init()};EditorUi.prototype.uploadToGithub=function(a,b,c){var d=this.spinner.pause();c=document.createElement("div");c.style.paddingTop="20px";c.style.paddingRight="8px";var e=document.createElement("table"),f=document.createElement("tbody"),g=document.createElement("tr"),q=document.createElement("td"),t=document.createElement("input");t.setAttribute("type",
|
||||
"text");mxUtils.write(q,"Username:");g.appendChild(q);q=q.cloneNode(!1);q.appendChild(t);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),u=document.createElement("input");u.setAttribute("type","password");mxUtils.write(q,"Password:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(u);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),v=document.createElement("input");v.setAttribute("type","text");mxUtils.write(q,"Organisation:");g=g.cloneNode(!1);g.appendChild(q);q=
|
||||
q.cloneNode(!1);q.appendChild(v);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),x=document.createElement("input");x.setAttribute("type","text");mxUtils.write(q,"Repository:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(x);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),z=document.createElement("input");z.setAttribute("type","text");mxUtils.write(q,"Path:");g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(z);g.appendChild(q);f.appendChild(g);
|
||||
q=q.cloneNode(!1);a=this.getCurrentFile();a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;var y=a.lastIndexOf(".");0<y&&(a=a.substring(0,y));z.value=a+".png";var A=document.createElement("input");A.setAttribute("type","text");mxUtils.write(q,"Branch/Tag:");A.value="master";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(A);g.appendChild(q);f.appendChild(g);var q=q.cloneNode(!1),D=document.createElement("input");D.setAttribute("type","text");mxUtils.write(q,"Message:");
|
||||
D.value="Updated "+a+".png";g=g.cloneNode(!1);g.appendChild(q);q=q.cloneNode(!1);q.appendChild(D);g.appendChild(q);f.appendChild(g);q=q.cloneNode(!1);e.appendChild(f);c.appendChild(e);c=new FilenameDialog(this,null,mxResources.get("publish"),mxUtils.bind(this,function(){var a="https://api.github.com/repos/"+v.value+"/"+x.value+"/contents/"+z.value+"?ref\x3d"+encodeURIComponent(A.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());
|
||||
var e={path:z.value,message:D.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+v.value+"/"+x.value+"/blob/"+A.value+"/"+z.value;var b=new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,
|
||||
function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+btoa(t.value+":"+u.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();
|
||||
this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c,d){var e=this.spinner.pause(),f=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,
|
||||
function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){e();var f=null!=a.getTitle()?a.getTitle():this.defaultFilename,g=f.lastIndexOf("."),r=f;0<g&&(r=f=r.substring(0,g));var g=new mxXmlRequest("/imgur",JSON.stringify({type:"base64",image:b,name:r+".png",title:f,description:"Made with https://www.draw.io"}),"POST"),u=mxUtils.bind(this,function(a){var b={message:mxResources.get("unknownError")};try{var c=JSON.parse(a.getText()),b={message:c.message||c.data.error}}catch(d){}this.handleError(b)});
|
||||
g.send(mxUtils.bind(this,function(a){if(200==a.getStatus())try{var b=JSON.parse(a.getText()),e="https://www.draw.io/i/"+b.data.id;try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dimgur-published:"+b.data.id+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26ts\x3d"+(new Date).getTime()}catch(g){}var k=mxUtils.bind(this,function(){this.spinner.stop();var a="https://imgur.com/"+b.data.id,f="https://www.draw.io/imgur?delete\x3d"+b.data.deletehash,
|
||||
a=new ErrorDialog(this,mxResources.get("published"),(c?mxResources.get("viewUrl",['\x3ca href\x3d"'+e+'" target\x3d"_blank"\x3e'+e+"\x3c/a\x3e"])+"\x3cbr\x3e":"")+mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"])+"\x3cbr\x3e"+mxResources.get("deleteUrl",[f]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("share"),function(){d(b.data.id,c)},!1);this.showDialog(a.container,340,180,!0,!1);a.init()});if(c){var l=
|
||||
new mxXmlRequest("/imgur?"+b.data.deletehash,JSON.stringify({title:f,description:mxResources.get("viewUrl",[e])}),"POST");l.send(mxUtils.bind(this,function(){200==l.getStatus()?k():u(l)}),mxUtils.bind(this,function(){u(l)}))}else k()}catch(p){this.handleError(p)}else u(a)}),mxUtils.bind(this,function(a){u(a)}))}));this.showDialog(f.container,320,250,!0,!1);f.init()};EditorUi.prototype.publishImage=function(a,b){var c=this.getCurrentFile();null!=c&&(this.isExportToCanvas()?this.showExportDialog(!1,
|
||||
mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e,f,g,q){d=parseInt(d);if(!isNaN(d)&&0<d){d/=100;var t=this.editor.graph.isSelectionEmpty();f=null!=f?f:t;if(this.spinner.spin(document.body,mxResources.get("publishing")))try{this.exportToCanvas(mxUtils.bind(this,function(d){try{var e=q?this.getFileData(!0,null,null,null,f):null,g=this.createPngDataUri(d,e);a(c,g.substring(g.lastIndexOf(",")+1),q,b)}catch(m){this.handleError(m)}}),
|
||||
null,null,null,mxUtils.bind(this,function(a){this.handleError(a)}),null,f,d||1,e,g)}catch(u){this.handleError(u)}}})):this.showRemoteExportDialog(mxResources.get("publish"),"https://support.draw.io/pages/viewpage.action?pageId\x3d12222625",mxUtils.bind(this,function(d,e){if(this.spinner.spin(document.body,mxResources.get("publishing"))){var f=this.editor.graph.getGraphBounds(),g=this.getFileData(!0,null,null,null,d);if(f.width*f.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE)try{var q=new mxXmlRequest(EXPORT_URL,
|
||||
"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(e?"1":"0")+"\x26xml\x3d"+encodeURIComponent(g));q.send(mxUtils.bind(this,function(){200==q.getStatus()?a(c,q.getText(),e,b):this.handleError(q)}))}catch(t){this.handleError(t)}else this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"))}})))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+
|
||||
" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=b.getSvg(g,null,null,null,null,f);null!=a&&b.setAttribute("content",
|
||||
encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(b)};
|
||||
EditorUi.prototype.exportImage=function(a,b,c,d,e){if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();c=null!=c?c:f;try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c):null)}catch(b){"Invalid image"==b.message?this.downloadFile("png"):this.handleError(b)}}),null,null,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,
|
||||
d)}catch(g){this.spinner.stop(),this.handleError(g)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,t,u,v,x){f=null!=f?f:!0;x=null!=x?x:this.editor.graph;var z=t?null:x.background;z==mxConstants.NONE&&(z=null);null==z&&(z=d);null==z&&!1==t&&(z="#ffffff");this.convertImages(x.getSvg(z,null,null,null,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));
|
||||
q=null!=q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));e.setAttribute("width",Math.ceil(q*g));e.setAttribute("height",Math.ceil(q*m));g=e.getContext("2d");g.scale(q,q);g.drawImage(d,0,0);a(e)});d.onerror=function(a){null!=e&&e(a)};try{u&&this.editor.addSvgShadow(c),this.convertMath(x,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();
|
||||
var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var n=a.getElementsByTagName(c),u=0;u<n.length;u++)mxUtils.bind(this,
|
||||
function(c){var n=d.convert(c.getAttribute(g));if(null!=n&&"data:"!=n.substring(0,5)){var s=f[n];null==s?(e++,this.convertImageToDataUri(n,function(d){null!=d&&(f[n]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,s)}})(n[u])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=
|
||||
document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),t=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=t&&"mxfile"==t.nodeName&&null!=this.pages){var u=t.getElementsByTagName("diagram");if(1==u.length)t=
|
||||
mxUtils.parseXml(g.decompress(mxUtils.getTextContent(u[0]))).documentElement;else if(1<u.length){g.model.beginUpdate();try{for(var v=0;v<u.length;v++){var x=this.updatePageRoot(new DiagramPage(u[v])),z=this.pages.length;null==x.getName()&&x.setName(mxResources.get("pageWithNumber",[z+1]));g.model.execute(new ChangePage(this,x,x,z))}}finally{g.model.endUpdate()}}}if(null!=t&&"mxGraphModel"===t.nodeName){var y=new mxGraphModel;(new mxCodec(t.ownerDocument)).decode(t,y);var A=y.getChildCount(y.getRoot());
|
||||
g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<A;v++){var D=y.getChildAt(y.getRoot(),v);if(1==A&&!g.isCellLocked(g.getDefaultParent()))var E=y.getChildren(D),f=f.concat(g.importCells(E,b,c,g.getDefaultParent(),null,a));else D=g.importCells([D],0,0,g.model.getRoot(),null,a)[0],E=g.model.getChildren(D),g.moveCells(E,b,c),f=f.concat(E)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var B=g.getBoundingBoxFromGeometry(f,!0);null!=B&&g.moveCells(f,b-B.x,c-B.y)}}finally{g.model.endUpdate()}}}}catch(F){throw e||
|
||||
this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}return f};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200==a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if(!this.isOffline()&&
|
||||
(e||"data:"==a.substring(0,5)||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var q=this.extractGraphModelFromPng(a),t=this.importXml(q,b,c,f,!0);if(0<t.length)return t}if("data:image/svg+xml;"==a.substring(0,19))try{if(q=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),t=this.importXml(q,
|
||||
|
@ -2745,15 +2747,15 @@ function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&2
|
|||
16&255,(t^4294967295)>>8&255,(t^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+t);d=f(a,t);f(a,4)}while(t);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),
|
||||
"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=
|
||||
c);d.src=a};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);"undefined"!==typeof ExportDialog&&this.isLocalFileSave()&&(b=this,ExportDialog.saveLocalFile=function(a,c,d){var e="text/xml";"svg"===d&&(e="image/svg+xml");b.saveLocalFile(a,c,e)},ExportDialog.saveRequest=function(a,c,d,e){b.saveRequest(a,c,d,e)});this.defaultFilename=mxResources.get("untitledDiagram");
|
||||
var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(67,
|
||||
!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===
|
||||
c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),!1);var f=document.createElement("div");
|
||||
f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,0);f.style.width="1px";f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&
|
||||
null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!g)f.style.left=a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();
|
||||
document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&null==this.dialog&&null!=a.container&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&
|
||||
(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML="\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=
|
||||
this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();
|
||||
a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
|
||||
var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:c.apply(this,arguments)};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(70,
|
||||
!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,
|
||||
d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),
|
||||
!1);var f=document.createElement("div");f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,0);f.style.width="1px";f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&
|
||||
a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&!g)f.style.left=a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML=
|
||||
"\x26nbsp;";f.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&null==this.dialog&&null!=a.container&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,
|
||||
function(b){a.isEnabled()&&(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML="\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||
|
||||
0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);
|
||||
a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
|
||||
/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,
|
||||
"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity=
|
||||
"0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility=
|
||||
|
@ -2857,21 +2859,20 @@ mxResources.get("copyOf",[a.getName()]))}),d)})};Graph.prototype.defaultThemes[G
|
|||
GraphViewer=function(a,b,c){this.init(a,b,c)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/?client\x3d1";GraphViewer.prototype.editBlankFallbackUrl="https://www.draw.io/?create\x3ddrawdata\x26splash\x3d0";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;
|
||||
GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.checkVisibleState=!0;
|
||||
GraphViewer.prototype.init=function(a,b,c){this.graphConfig=null!=c?c:{};this.autoFit=null!=c["auto-fit"]?c["auto-fit"]:this.autoFit;this.checkVisibleState=null!=c["check-visible-state"]?c["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,
|
||||
"lightbox");this.lightboxClickEnabled=!1!=this.graphConfig.lightbox;this.widthIsEmpty=null!=a?""==a.style.width:!0;this.editor=null;if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;
|
||||
this.editor.editBlankFallbackUrl=this.editBlankFallbackUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};mxClient.IS_SVG&&this.editor.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);this.currentPage=parseInt(this.graphConfig.page)||0;if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var f=this.graph.getGlobalVariable,
|
||||
d=this;this.graph.getGlobalVariable=function(a){var b=e[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:f.apply(this,arguments)}}}urlParams.page=d.currentPage;var g=mxUtils.bind(this,function(){this.graph.getModel().beginUpdate();try{urlParams.nav=!1!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||
|
||||
1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(!1!=
|
||||
this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&a.setAttribute("title",this.graphConfig.title)});if(this.checkVisibleState&&0==a.offsetWidth)var k=new ResizeSensor(this.getVisibleParent(a),function(){0<a.offsetWidth&&(k.detach(),g())});else g()}};
|
||||
GraphViewer.prototype.getVisibleParent=function(a){for(;a!=document.body&&null!=a.parentNode&&0==a.offsetWidth;)a=a.parentNode;return a};GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&("https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10))&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};
|
||||
GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.widthIsEmpty&&(this.graph.container.style.width="",this.graph.container.style.height=""),this.editor.setGraphXml(a),this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
|
||||
GraphViewer.prototype.setXmlNode=function(a){this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
|
||||
GraphViewer.prototype.updateGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.widthIsEmpty&&(this.graph.container.style.width="",this.graph.container.style.height=""),this.editor.setGraphXml(a),this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale});this.fireEvent(new mxEventObject("graphChanged"))};
|
||||
"lightbox");this.lightboxClickEnabled=!1!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.editor=null;if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,
|
||||
null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.editor.editBlankFallbackUrl=this.editBlankFallbackUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};mxClient.IS_SVG&&this.editor.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);this.currentPage=parseInt(this.graphConfig.page)||0;if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");
|
||||
if(0<e.length){var f=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=e[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:f.apply(this,arguments)}}}urlParams.page=d.currentPage;var g=mxUtils.bind(this,function(){this.graph.getModel().beginUpdate();try{urlParams.nav=!1!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:
|
||||
8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);
|
||||
this.graph.setTooltips(!1!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&a.setAttribute("title",this.graphConfig.title)});b=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof b){c=this.getObservableParent(a);var k=new b(mxUtils.bind(this,function(b){0<
|
||||
a.offsetWidth&&(k.disconnect(),g())}));k.observe(c,{attributes:!0})}else g()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&("https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10))&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};
|
||||
GraphViewer.prototype.setXmlNode=function(a){this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
|
||||
GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
|
||||
GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),c=!1;a.style.overflow="hidden";var d=mxUtils.bind(this,function(){if(!c){c=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<b.width+this.graph.border?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-
|
||||
d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}c=!1}}),e=null,f=!1;this.fitGraph=function(b){var c=a.offsetWidth;c!=e&&!f&&(f=!0,this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||
|
||||
1,this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},e=c,window.setTimeout(function(){f=!1},0))};mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,d);if(this.graphConfig.resize||(this.zoomEnabled||
|
||||
!this.autoFit)&&!1!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,this.toolbarHeight),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var g=e=null,d=mxUtils.bind(this,function(){window.clearTimeout(g);f||(g=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});mxClient.IS_QUIRKS||9>=document.documentMode?
|
||||
mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d)}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var k=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"]){var d=null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-
|
||||
b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),e=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(k,0):k();this.positionGraph=function(){b=this.graph.getGraphBounds();e=null;k()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};
|
||||
mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d)}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var k=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var d=null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));
|
||||
this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),e=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(k,0):k();this.positionGraph=function(){b=this.graph.getGraphBounds();e=null;k()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};
|
||||
GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
|
||||
GraphViewer.prototype.showLayers=function(a,b){var c=this.graphConfig.layers;if(null!=c||null!=b)if(c=null!=c?c.split(" "):null,null!=b||0<c.length){var d=null!=b?b.getModel():null,e=a.getModel();e.beginUpdate();try{for(var f=e.getChildCount(e.root),g=0;g<f;g++)e.setVisible(e.getChildAt(e.root,g),null!=b?d.isVisible(d.getChildAt(d.root,g)):!1);if(null==d)for(g=0;g<c.length;g++)e.setVisible(e.getChildAt(e.root,parseInt(c[g])),!0)}finally{e.endUpdate()}}};
|
||||
GraphViewer.prototype.addToolbar=function(){function a(a,b,d,e){var f=document.createElement("div");f.style.borderRight="1px solid #d0d0d0";f.style.padding="3px 6px 3px 6px";mxEvent.addListener(f,"click",a);null!=d&&f.setAttribute("title",d);f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==e||e?(mxEvent.addListener(f,"mouseenter",function(){f.style.backgroundColor="#ddd"}),mxEvent.addListener(f,"mouseleave",
|
||||
|
@ -2882,13 +2883,13 @@ c.style.whiteSpace="nowrap";c.style.zIndex=this.toolbarZIndex;c.style.background
|
|||
k.container.scrollLeft;this.scrollTop=k.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-k.container.scrollLeft)<l&&Math.abs(this.scrollTop-k.container.scrollTop)<l&&Math.abs(this.startX-b.getGraphX())<l&&Math.abs(this.startY-b.getGraphY())<l&&(0<parseFloat(c.style.opacity||0)?f():g(30))}})}for(var n=this.toolbarItems,m=0,p=null,r=null,s=0;s<n.length;s++){var q=n[s];if("pages"==q){var t=[],r=b.ownerDocument.createElement("div");
|
||||
r.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(r,70);var u=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,t.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+t.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(t[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||
|
||||
"Previous Page");u.style.borderRightStyle="none";u.style.paddingLeft="0px";u.style.paddingRight="0px";c.appendChild(r);var v=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,t.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+t.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(t[this.currentPage]))).documentElement)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight=
|
||||
"0px";var x=null,q=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)t=[];this.xmlNode!=x&&(t=this.xmlNode.getElementsByTagName("diagram"),this.currentPage=0,r.innerHTML="",mxUtils.write(r,this.currentPage+1+" / "+t.length),x=this.xmlNode);r.style.display=1<t.length?"inline-block":"none";u.style.display=r.style.display;v.style.display=r.style.display}),z=this.graph.getModel();this.addListener("xmlNodeChanged",q);q()}else if("zoom"==q)this.zoomEnabled&&(a(mxUtils.bind(this,
|
||||
function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==q){if(this.layersEnabled){var z=this.graph.getModel(),
|
||||
y=a(mxUtils.bind(this,function(a){if(null!=p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=y.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);
|
||||
p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");z.addListener(mxEvent.CHANGE,function(){y.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});y.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==q?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
|
||||
(q=this.graphConfig["toolbar-buttons"][q],null!=q&&a(null==q.enabled||q.enabled?q.handler:function(){},q.image,q.title,q.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(n=b.ownerDocument.createElement("div"),n.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",n.setAttribute("title",this.graphConfig.title),mxUtils.write(n,
|
||||
this.graphConfig.title),mxUtils.setOpacity(n,70),c.appendChild(n));this.minToolbarWidth=34*m;var A=b.style.border,n=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
|
||||
b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==A&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){!0!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
|
||||
"0px";var x=null,q=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)t=[];this.xmlNode!=x&&(t=this.xmlNode.getElementsByTagName("diagram"),r.innerHTML="",mxUtils.write(r,this.currentPage+1+" / "+t.length),x=this.xmlNode);r.style.display=1<t.length?"inline-block":"none";u.style.display=r.style.display;v.style.display=r.style.display});this.addListener("xmlNodeChanged",q);q()}else if("zoom"==q)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),
|
||||
Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==q){if(this.layersEnabled){var z=this.graph.getModel(),y=a(mxUtils.bind(this,function(a){if(null!=
|
||||
p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=y.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);p.style.left=b.x+a.left+"px";
|
||||
p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");z.addListener(mxEvent.CHANGE,function(){y.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});y.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==q?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(q=this.graphConfig["toolbar-buttons"][q],
|
||||
null!=q&&a(null==q.enabled||q.enabled?q.handler:function(){},q.image,q.title,q.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(n=b.ownerDocument.createElement("div"),n.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",n.setAttribute("title",this.graphConfig.title),mxUtils.write(n,this.graphConfig.title),mxUtils.setOpacity(n,
|
||||
70),c.appendChild(n));this.minToolbarWidth=34*m;var A=b.style.border,n=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
|
||||
c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==A&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){!0!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
|
||||
p=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",n)};
|
||||
GraphViewer.prototype.addClickHandler=function(a,b){var c=a.isBlankLink,d=this.graphConfig;a.isBlankLink=function(a){return"self"!=d.target&&c.apply(this,arguments)};a.addClickHandler(this.graphConfig.highlight,function(a){null!=b&&b.destroy()},mxUtils.bind(this,function(a){null==b&&this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(a)||0==this.toolbarItems.length)&&this.showLightbox()}))};
|
||||
GraphViewer.prototype.showLightbox=function(){if("open"==this.graphConfig.lightbox||window.self!==window.top){var a=this.layersEnabled?"\x26layers\x3d1":"";if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var b=null,c=mxUtils.bind(this,function(a){"ready"==a.data&&a.source==b&&(b.postMessage(this.xml,"*"),mxEvent.removeListener(window,"message",c))});mxEvent.addListener(window,"message",c);b=window.open("https://test.draw.io/?dev\x3d1\x26client\x3d1\x26chrome\x3d0\x26lightbox\x3d1\x26close\x3d1\x26edit\x3d_blank"+
|
||||
|
|
|
@ -1,225 +0,0 @@
|
|||
/**
|
||||
* Explore plugin.
|
||||
*/
|
||||
Draw.loadPlugin(function(ui)
|
||||
{
|
||||
var graph = ui.editor.graph;
|
||||
var lastSearch = null;
|
||||
var lastFound = null;
|
||||
|
||||
var div = document.createElement('div');
|
||||
div.style.userSelect = 'none';
|
||||
div.style.overflow = 'hidden';
|
||||
div.style.padding = '10px';
|
||||
div.style.height = '100%';
|
||||
|
||||
var searchInput = document.createElement('input');
|
||||
searchInput.setAttribute('placeholder', 'Find');
|
||||
searchInput.setAttribute('type', 'text');
|
||||
searchInput.style.marginTop = '4px';
|
||||
searchInput.style.width = '170px';
|
||||
searchInput.style.fontSize = '12px';
|
||||
searchInput.style.borderRadius = '4px';
|
||||
searchInput.style.padding = '6px';
|
||||
div.appendChild(searchInput);
|
||||
|
||||
var tmp = document.createElement('div');
|
||||
|
||||
function testMeta(re, cell)
|
||||
{
|
||||
if (typeof cell.value === 'object' && cell.value.attributes != null)
|
||||
{
|
||||
var attrs = cell.value.attributes;
|
||||
|
||||
for (var i = 0; i < attrs.length; i++)
|
||||
{
|
||||
if (attrs[i].nodeName != 'label' && re.test(attrs[i].nodeValue.toLowerCase()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
function search()
|
||||
{
|
||||
var cells = graph.model.getDescendants(graph.model.getRoot());
|
||||
var search = searchInput.value.toLowerCase();
|
||||
var re = new RegExp(search);
|
||||
var firstMatch = null;
|
||||
|
||||
if (lastSearch != search)
|
||||
{
|
||||
lastSearch = search;
|
||||
lastFound = null;
|
||||
}
|
||||
|
||||
var active = lastFound == null;
|
||||
|
||||
if (graph.isEnabled() && search.length > 0)
|
||||
{
|
||||
for (var i = 0; i < cells.length; i++)
|
||||
{
|
||||
var state = graph.view.getState(cells[i]);
|
||||
|
||||
if (state != null && state.cell.value != null && (active || firstMatch == null) &&
|
||||
(graph.model.isVertex(state.cell) || graph.model.isEdge(state.cell)))
|
||||
{
|
||||
if (graph.isHtmlLabel(state.cell))
|
||||
{
|
||||
tmp.innerHTML = graph.getLabel(state.cell);
|
||||
label = mxUtils.extractTextWithWhitespace([tmp]);
|
||||
}
|
||||
else
|
||||
{
|
||||
label = graph.getLabel(state.cell);
|
||||
}
|
||||
|
||||
label = mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g, ' ')).toLowerCase();
|
||||
|
||||
if (re.test(label) || testMeta(re, state.cell))
|
||||
{
|
||||
if (active)
|
||||
{
|
||||
firstMatch = state;
|
||||
|
||||
break;
|
||||
}
|
||||
else if (firstMatch == null)
|
||||
{
|
||||
firstMatch = state;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
active = active || state == lastFound;
|
||||
}
|
||||
}
|
||||
|
||||
if (firstMatch != null)
|
||||
{
|
||||
lastFound = firstMatch;
|
||||
graph.setSelectionCell(lastFound.cell);
|
||||
graph.scrollCellToVisible(lastFound.cell);
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.clearSelection();
|
||||
}
|
||||
|
||||
return !graph.isEnabled() || search.length == 0 || firstMatch != null;
|
||||
};
|
||||
|
||||
mxUtils.br(div);
|
||||
|
||||
var resetBtn = mxUtils.button(mxResources.get('reset'), function()
|
||||
{
|
||||
searchInput.value = '';
|
||||
searchInput.style.backgroundColor = '';
|
||||
lastFound = null;
|
||||
lastSearch = null;
|
||||
searchInput.focus();
|
||||
});
|
||||
|
||||
resetBtn.setAttribute('title', mxResources.get('reset'));
|
||||
resetBtn.style.marginTop = '8px';
|
||||
resetBtn.style.marginRight = '4px';
|
||||
resetBtn.style.backgroundColor = '#f5f5f5';
|
||||
resetBtn.style.backgroundImage = 'none';
|
||||
resetBtn.className = 'geBtn';
|
||||
|
||||
div.appendChild(resetBtn);
|
||||
|
||||
var btn = mxUtils.button('Find Again', function()
|
||||
{
|
||||
searchInput.style.backgroundColor = search() ? '' : '#ffcfcf';
|
||||
});
|
||||
|
||||
btn.setAttribute('title', 'Find Again (Enter)');
|
||||
btn.style.marginTop = '8px';
|
||||
btn.style.backgroundColor = '#4d90fe';
|
||||
btn.style.backgroundImage = 'none';
|
||||
btn.className = 'geBtn gePrimaryBtn';
|
||||
|
||||
div.appendChild(btn);
|
||||
|
||||
mxEvent.addListener(searchInput, 'keyup', function(evt)
|
||||
{
|
||||
// Ctrl or Cmd keys
|
||||
if (evt.keyCode == 91 || evt.keyCode == 17)
|
||||
{
|
||||
// Workaround for lost focus on show
|
||||
mxEvent.consume(evt);
|
||||
}
|
||||
else if (evt.keyCode == 27)
|
||||
{
|
||||
findAction.funct();
|
||||
}
|
||||
else if (lastSearch != searchInput.value.toLowerCase() || evt.keyCode == 13)
|
||||
{
|
||||
searchInput.style.backgroundColor = search() ? '' : '#ffcfcf';
|
||||
}
|
||||
});
|
||||
|
||||
var wnd = new mxWindow('Find', div, document.body.offsetWidth - 300, 110, 204, 116, true, true);
|
||||
wnd.destroyOnClose = false;
|
||||
wnd.setMaximizable(false);
|
||||
wnd.setResizable(false);
|
||||
wnd.setClosable(true);
|
||||
|
||||
// Extends Extras menu
|
||||
mxResources.parse('find=Find');
|
||||
|
||||
// Adds action
|
||||
ui.actions.addAction('find...', function()
|
||||
{
|
||||
wnd.setVisible(!wnd.isVisible());
|
||||
|
||||
if (wnd.isVisible())
|
||||
{
|
||||
searchInput.focus();
|
||||
|
||||
if (mxClient.IS_FF || document.documentMode >= 5 || mxClient.IS_QUIRKS)
|
||||
{
|
||||
searchInput.select();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.execCommand('selectAll', false, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.container.focus();
|
||||
}
|
||||
}, null, null, 'Ctrl+F');
|
||||
|
||||
|
||||
var findAction = ui.actions.get('find');
|
||||
|
||||
findAction.setToggleAction(true);
|
||||
findAction.setSelectedCallback(function() { return wnd.isVisible(); });
|
||||
|
||||
var menu = ui.menus.get('edit');
|
||||
var oldFunct = menu.funct;
|
||||
|
||||
menu.funct = function(menu, parent)
|
||||
{
|
||||
oldFunct.apply(this, arguments);
|
||||
|
||||
ui.menus.addMenuItems(menu, ['-', 'find'], parent);
|
||||
};
|
||||
|
||||
ui.keyHandler.bindAction(70, true, 'find'); // Ctrl+F
|
||||
|
||||
mxEvent.addListener(div, 'keydown', function(evt)
|
||||
{
|
||||
if (evt.keyCode == 70 && ui.keyHandler.isControlDown(evt) && !mxEvent.isShiftDown(evt))
|
||||
{
|
||||
findAction.funct();
|
||||
mxEvent.consume(evt);
|
||||
}
|
||||
});
|
||||
});
|
94
war/plugins/number.js
Normal file
94
war/plugins/number.js
Normal file
|
@ -0,0 +1,94 @@
|
|||
/**
|
||||
* Sample plugin.
|
||||
*/
|
||||
Draw.loadPlugin(function(ui) {
|
||||
|
||||
var graph = ui.editor.graph;
|
||||
var enabled = true;
|
||||
var counter = 0;
|
||||
|
||||
// Creates the shape for the shape number and puts it into the draw pane
|
||||
var redrawShape = graph.cellRenderer.redrawShape;
|
||||
graph.cellRenderer.redrawShape = function(state, force, rendering)
|
||||
{
|
||||
var result = redrawShape.apply(this, arguments);
|
||||
|
||||
if (result && enabled && graph.model.isVertex(state.cell))
|
||||
{
|
||||
if (state.shape != null && state.secondLabel == null)
|
||||
{
|
||||
var value = '<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">' + (++counter) + '</div>';
|
||||
state.secondLabel = new mxText(value, new mxRectangle(),
|
||||
mxConstants.ALIGN_LEFT, mxConstants.ALIGN_BOTTOM);
|
||||
|
||||
// Styles the label
|
||||
state.secondLabel.size = 12;
|
||||
state.secondLabel.dialect = state.shape.dialect;
|
||||
state.secondLabel.dialect = mxConstants.DIALECT_STRICTHTML;
|
||||
graph.cellRenderer.initializeLabel(state, state.secondLabel);
|
||||
}
|
||||
}
|
||||
|
||||
if (state.secondLabel != null)
|
||||
{
|
||||
var scale = graph.getView().getScale();
|
||||
var bounds = new mxRectangle(state.x + state.width - 4 * scale, state.y + 4 * scale, 0, 0);
|
||||
state.secondLabel.state = state;
|
||||
state.secondLabel.scale = scale;
|
||||
state.secondLabel.bounds = bounds;
|
||||
state.secondLabel.redraw();
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
// Destroys the shape number
|
||||
var destroy = graph.cellRenderer.destroy;
|
||||
graph.cellRenderer.destroy = function(state)
|
||||
{
|
||||
destroy.apply(this, arguments);
|
||||
|
||||
if (state.secondLabel != null)
|
||||
{
|
||||
state.secondLabel.destroy();
|
||||
state.secondLabel = null;
|
||||
}
|
||||
};
|
||||
|
||||
graph.cellRenderer.getShapesForState = function(state)
|
||||
{
|
||||
return [state.shape, state.text, state.secondLabel, state.control];
|
||||
};
|
||||
|
||||
var validate = graph.view.validate;
|
||||
graph.view.validate = function()
|
||||
{
|
||||
counter = 0;
|
||||
validate.apply(this, arguments);
|
||||
};
|
||||
|
||||
// Extends View menu
|
||||
mxResources.parse('number=Number');
|
||||
|
||||
// Adds action
|
||||
ui.actions.addAction('number...', function()
|
||||
{
|
||||
enabled = !enabled;
|
||||
graph.refresh();
|
||||
});
|
||||
|
||||
var action = ui.actions.get('number');
|
||||
|
||||
action.setToggleAction(true);
|
||||
action.setSelectedCallback(function() { return enabled; });
|
||||
|
||||
var menu = ui.menus.get('view');
|
||||
var oldFunct = menu.funct;
|
||||
|
||||
menu.funct = function(menu, parent)
|
||||
{
|
||||
oldFunct.apply(this, arguments);
|
||||
|
||||
ui.menus.addMenuItems(menu, ['-', 'number'], parent);
|
||||
};
|
||||
});
|
|
@ -1,189 +0,0 @@
|
|||
/**
|
||||
* Explore plugin.
|
||||
*/
|
||||
Draw.loadPlugin(function(ui)
|
||||
{
|
||||
var graph = ui.editor.graph;
|
||||
var propertyName = 'tags';
|
||||
|
||||
var div = document.createElement('div');
|
||||
div.style.userSelect = 'none';
|
||||
div.style.overflow = 'hidden';
|
||||
div.style.padding = '10px';
|
||||
div.style.height = '100%';
|
||||
|
||||
var searchInput = document.createElement('input');
|
||||
searchInput.setAttribute('placeholder', 'All Tags');
|
||||
searchInput.setAttribute('type', 'text');
|
||||
searchInput.style.marginTop = '4px';
|
||||
searchInput.style.width = '170px';
|
||||
searchInput.style.fontSize = '12px';
|
||||
searchInput.style.borderRadius = '4px';
|
||||
searchInput.style.padding = '6px';
|
||||
div.appendChild(searchInput);
|
||||
|
||||
mxEvent.addListener(searchInput, 'dblclick', function()
|
||||
{
|
||||
var dlg = new FilenameDialog(ui, propertyName, mxResources.get('ok'), mxUtils.bind(this, function(name)
|
||||
{
|
||||
if (name != null && name.length > 0)
|
||||
{
|
||||
propertyName = name;
|
||||
}
|
||||
}), mxResources.get('enterPropertyName'));
|
||||
ui.showDialog(dlg.container, 300, 80, true, true);
|
||||
dlg.init();
|
||||
});
|
||||
|
||||
searchInput.setAttribute('title', 'Doubleclick to set property name');
|
||||
|
||||
function searchCells(cells)
|
||||
{
|
||||
cells = (cells != null) ? cells : graph.model.getDescendants(graph.model.getRoot());
|
||||
var tagList = searchInput.value.split(' ');
|
||||
var result = [];
|
||||
|
||||
for (var i = 0; i < cells.length; i++)
|
||||
{
|
||||
if (graph.model.isVertex(cells[i]) || graph.model.isEdge(cells[i]))
|
||||
{
|
||||
var tags = (cells[i].value != null && typeof(cells[i].value) == 'object') ?
|
||||
mxUtils.trim(cells[i].value.getAttribute(propertyName) || '') : '';
|
||||
var match = true;
|
||||
|
||||
if (tags.length > 0)
|
||||
{
|
||||
var tmp = tags.toLowerCase().split(' ');
|
||||
|
||||
for (var j = 0; j < tagList.length && match; j++)
|
||||
{
|
||||
var tag = mxUtils.trim(tagList[j]).toLowerCase();
|
||||
|
||||
match = match && (tag.length == 0 || mxUtils.indexOf(tmp, tag) >= 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
match = mxUtils.trim(searchInput.value).length == 0;
|
||||
}
|
||||
|
||||
if (match)
|
||||
{
|
||||
result.push(cells[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
function setCellsVisible(cells, visible)
|
||||
{
|
||||
graph.model.beginUpdate();
|
||||
try
|
||||
{
|
||||
for (var i = 0; i < cells.length; i++)
|
||||
{
|
||||
graph.model.setVisible(cells[i], visible);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
graph.model.endUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
mxUtils.br(div);
|
||||
|
||||
var hideBtn = mxUtils.button(mxResources.get('hide'), function()
|
||||
{
|
||||
setCellsVisible(searchCells(), false);
|
||||
});
|
||||
|
||||
hideBtn.setAttribute('title', mxResources.get('hide'));
|
||||
hideBtn.style.marginTop = '8px';
|
||||
hideBtn.style.marginRight = '4px';
|
||||
hideBtn.style.backgroundColor = '#f5f5f5';
|
||||
hideBtn.style.backgroundImage = 'none';
|
||||
hideBtn.className = 'geBtn';
|
||||
|
||||
div.appendChild(hideBtn);
|
||||
|
||||
var btn = mxUtils.button(mxResources.get('show'), function()
|
||||
{
|
||||
var cells = searchCells();
|
||||
setCellsVisible(cells, true);
|
||||
graph.setSelectionCells(cells);
|
||||
});
|
||||
|
||||
btn.setAttribute('title', mxResources.get('show') + ' (Enter)');
|
||||
btn.style.marginTop = '8px';
|
||||
btn.style.backgroundColor = '#4d90fe';
|
||||
btn.style.backgroundImage = 'none';
|
||||
btn.className = 'geBtn gePrimaryBtn';
|
||||
|
||||
div.appendChild(btn);
|
||||
|
||||
mxEvent.addListener(searchInput, 'keyup', function(evt)
|
||||
{
|
||||
// Ctrl or Cmd keys
|
||||
if (evt.keyCode == 91 || evt.keyCode == 17)
|
||||
{
|
||||
// Workaround for lost focus on show
|
||||
mxEvent.consume(evt);
|
||||
}
|
||||
else if (evt.keyCode == 13)
|
||||
{
|
||||
btn.click();
|
||||
}
|
||||
});
|
||||
|
||||
// Extends Extras menu
|
||||
mxResources.parse('tags=Tags');
|
||||
|
||||
var wnd = new mxWindow(mxResources.get('tags'), div, document.body.offsetWidth - 300, 230, 204, 116, true, true);
|
||||
wnd.destroyOnClose = false;
|
||||
wnd.setMaximizable(false);
|
||||
wnd.setResizable(false);
|
||||
wnd.setClosable(true);
|
||||
|
||||
// Adds action
|
||||
ui.actions.addAction('tags...', function()
|
||||
{
|
||||
wnd.setVisible(!wnd.isVisible());
|
||||
|
||||
if (wnd.isVisible())
|
||||
{
|
||||
searchInput.focus();
|
||||
|
||||
if (mxClient.IS_FF || document.documentMode >= 5 || mxClient.IS_QUIRKS)
|
||||
{
|
||||
searchInput.select();
|
||||
}
|
||||
else
|
||||
{
|
||||
document.execCommand('selectAll', false, null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.container.focus();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var action = ui.actions.get('tags');
|
||||
|
||||
action.setToggleAction(true);
|
||||
action.setSelectedCallback(function() { return wnd.isVisible(); });
|
||||
|
||||
var menu = ui.menus.get('extras');
|
||||
var oldFunct = menu.funct;
|
||||
|
||||
menu.funct = function(menu, parent)
|
||||
{
|
||||
oldFunct.apply(this, arguments);
|
||||
|
||||
ui.menus.addMenuItems(menu, ['-', 'tags'], parent);
|
||||
};
|
||||
});
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=صُف
|
|||
alignment=محاذاة
|
||||
allChangesLost=سيتم فقد جميع التغييرات
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=زاوية
|
||||
areYouSure=هل أنت متأكد؟
|
||||
|
@ -149,6 +150,7 @@ done=تم
|
|||
dotted=نقطي
|
||||
doubleClickOrientation=أنقر مرتين لتغيير الإتجاه
|
||||
doubleClickTooltip=انقر مرتين لإضافة نص
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=تحميل
|
||||
downloadAs=تحميل ك
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=كيف تريدون فتح الملف(ات)؟
|
|||
fileWillBeSavedInAppFolder=سيتم حفظ {1} داخل ملف التطبيق.
|
||||
fill=تعبئة
|
||||
fillColor=تعبئة لون
|
||||
find=Find
|
||||
fit=ملائمة
|
||||
fitContainer=تغيير حجم الإطار
|
||||
fitIntoContainer=ملاءمة للإطار
|
||||
|
@ -568,6 +571,7 @@ subscript=خط صغير
|
|||
superscript=خط كبير
|
||||
support=مساعدة
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=جدول
|
||||
targetSpacing=تباعد الهدف
|
||||
template=قالب
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Poravnaj
|
|||
alignment=Poravnanje
|
||||
allChangesLost=Sve promjene će biti izgubljene!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Završeno
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Dupli klik za promjenu orijentacije
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Boja popunjavanja
|
||||
find=Find
|
||||
fit=Prilagodi
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Proređivanje odredišta
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Alinea
|
|||
alignment=Alineació
|
||||
allChangesLost=Es perderan tots els canvis!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=N'esteu segurs?
|
||||
|
@ -149,6 +150,7 @@ done=Finalitzat
|
|||
dotted=Puntejat
|
||||
doubleClickOrientation=Fes doble clic per canviar l'orientació
|
||||
doubleClickTooltip=Fes doble clic per inserir text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Descarrega
|
||||
downloadAs=Descarrega com
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Com desitja obrir aquest/s fitxer/s?
|
|||
fileWillBeSavedInAppFolder={1} es desarà a la carpeta d'aplicacions.
|
||||
fill=Farcit
|
||||
fillColor=Color de farcit
|
||||
find=Find
|
||||
fit=Ajusta
|
||||
fitContainer=Redimensiona el contenidor
|
||||
fitIntoContainer=Ajusta'l al contenidor
|
||||
|
@ -568,6 +571,7 @@ subscript=Subíndex
|
|||
superscript=Superíndex
|
||||
support=Suport
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Taula
|
||||
targetSpacing=Espaiat del objectiu
|
||||
template=Plantilla
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Zarovnat
|
|||
alignment=Zarovnání
|
||||
allChangesLost=Všechny změny budou ztraceny!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Úhel
|
||||
areYouSure=Jste si jisti?
|
||||
|
@ -149,6 +150,7 @@ done=Hotovo
|
|||
dotted=Tečkovaný
|
||||
doubleClickOrientation=Poklepejte ke změně orientace
|
||||
doubleClickTooltip=Dvojitý klik pro vložení textu
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Stáhnout
|
||||
downloadAs=Stáhnout jako
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Jak si přejete otevřít tento soubor(y)?
|
|||
fileWillBeSavedInAppFolder={1} bude uloženo ve složce aplikace
|
||||
fill=Vyplnit
|
||||
fillColor=Barva výplně
|
||||
find=Find
|
||||
fit=Roztáhnout
|
||||
fitContainer=Změnit velikost nádoby
|
||||
fitIntoContainer=Přizpůsobit nádobě
|
||||
|
@ -568,6 +571,7 @@ subscript=Index
|
|||
superscript=Nadpis
|
||||
support=Podpora
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabulka
|
||||
targetSpacing=Odsazení cíle
|
||||
template=Šablona
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Juster
|
|||
alignment=Justering
|
||||
allChangesLost=Alle ændringer vil gå tabt!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Vinkel
|
||||
areYouSure=Er du sikker?
|
||||
|
@ -149,6 +150,7 @@ done=Udført
|
|||
dotted=Punkteret
|
||||
doubleClickOrientation=Dobbeltklik for at ændre orientering
|
||||
doubleClickTooltip=Dobbeltklik for at indsætte tekst
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download som
|
||||
clickHereToSave=Klik her for at gemme
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Hvordan vil du åbne disse fil(er)?
|
|||
fileWillBeSavedInAppFolder={1} vil blive gemt i App-mappen
|
||||
fill=Udfyld
|
||||
fillColor=Fyldfarve
|
||||
find=Find
|
||||
fit=Tilpas
|
||||
fitContainer=Skalér container
|
||||
fitIntoContainer=Tilpas container
|
||||
|
@ -568,6 +571,7 @@ subscript=Sænket skrift
|
|||
superscript=Hævet skrift
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabel
|
||||
targetSpacing=Målafstand
|
||||
template=Skabelon
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Ausrichten
|
|||
alignment=Ausrichtung
|
||||
allChangesLost=Alle Änderungen gehen verloren!
|
||||
allPages=Alle Seiten
|
||||
allTags=Alle Tags
|
||||
android=Android
|
||||
angle=Winkel
|
||||
areYouSure=Sind Sie sicher?
|
||||
|
@ -149,6 +150,7 @@ done=Fertig
|
|||
dotted=Punktiert
|
||||
doubleClickOrientation=Doppelklicken um Orientierung zu ändern
|
||||
doubleClickTooltip=Doppelklicken um Text einzufügen
|
||||
doubleClickChangeProperty=Doppelklicken um Eigenschaftsname zu ändern
|
||||
download=Herunterladen
|
||||
downloadAs=Herunterladen als
|
||||
clickHereToSave=Hier klicken um zu speichern.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Wie möchten Sie diese Datei(en) öffnen?
|
|||
fileWillBeSavedInAppFolder={1} wird im Verzeichnis der App gespeichert.
|
||||
fill=Füllen
|
||||
fillColor=Füllfarbe
|
||||
find=Suchen
|
||||
fit=Einpassen
|
||||
fitContainer=Containergröße anpassen
|
||||
fitIntoContainer=In Container einpassen
|
||||
|
@ -568,6 +571,7 @@ subscript=Tiefgestellt
|
|||
superscript=Hochgestellt
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabelle
|
||||
targetSpacing=Endabstand
|
||||
template=Vorlage
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Στοίχισε
|
|||
alignment=Στοίχιση
|
||||
allChangesLost=Όλες οι αλλαγές θα χαθούν!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Γωνία
|
||||
areYouSure=Είστε βέβαιοι;
|
||||
|
@ -149,6 +150,7 @@ done=Έγινε
|
|||
dotted=Διάστικτο
|
||||
doubleClickOrientation=Κάντε διπλό κλικ για αλλαγή προσανατολισμού
|
||||
doubleClickTooltip=Κάντε διπλό κλικ για εισαγωγή κειμένου
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Λήψη
|
||||
downloadAs=Λήψη ως
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Πώς θα θέλατε να ανοίγετε αυτά τα α
|
|||
fileWillBeSavedInAppFolder={1} θα αποθηκεύεται στο φάκελο εφαρμογής.
|
||||
fill=Γέμισμα
|
||||
fillColor=Χρώμα γεμίσματος
|
||||
find=Find
|
||||
fit=Προσαρμογή μεγέθους
|
||||
fitContainer=Προσαρμογή μεγέθους δοχείου
|
||||
fitIntoContainer=Προσαρμόστε μέσα στο δοχείο
|
||||
|
@ -568,6 +571,7 @@ subscript=Δείκτης
|
|||
superscript=Εκθέτης
|
||||
support=Υποστήριξη
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Πίνακας
|
||||
targetSpacing=Απόσταση Στόχου
|
||||
template=Πρότυπο
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Alinear
|
|||
alignment=Alineación
|
||||
allChangesLost=¡Se perderán todos los cambios!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Ángulo
|
||||
areYouSure=¿Estás seguro?
|
||||
|
@ -149,6 +150,7 @@ done=Finalizado
|
|||
dotted=Punteado
|
||||
doubleClickOrientation=Haga doble clic para cambiar la orientación
|
||||
doubleClickTooltip=Haga doble clic para insertar texto
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Descargar
|
||||
downloadAs=Descargar como
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=¿Cómo quieres abrir este/os archivo/s?
|
|||
fileWillBeSavedInAppFolder={1} se guardará en la carpeta de aplicaciones.
|
||||
fill=Relleno
|
||||
fillColor=Color del relleno
|
||||
find=Find
|
||||
fit=Ajustar
|
||||
fitContainer=Redimensionar contenedor
|
||||
fitIntoContainer=Ajustar al contenedor
|
||||
|
@ -568,6 +571,7 @@ subscript=Subíndice
|
|||
superscript=Superíndice
|
||||
support=Soporte
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabla
|
||||
targetSpacing=Espaciado del objetivo
|
||||
template=Plantilla
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Joonda
|
|||
alignment=Joondamine
|
||||
allChangesLost=Kõik muudatused kaovad!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Nurk
|
||||
areYouSure=Oled kindel?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=تراز
|
|||
alignment=همترازی
|
||||
allChangesLost=تمامی تغییرات از دست خواهند رفت!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=اندروید
|
||||
angle=زاویه
|
||||
areYouSure=آیا مطمئن هستید؟
|
||||
|
@ -149,6 +150,7 @@ done=تامام
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=دانلود
|
||||
downloadAs=دانلود بهصورت
|
||||
clickHereToSave=برای ذخیره اینجا کلیک نمایید.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Kohdista
|
|||
alignment=Kohdistus
|
||||
allChangesLost=Kaikki muutokset menetään!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Kulma
|
||||
areYouSure=Oletko varma?
|
||||
|
@ -149,6 +150,7 @@ done=Valmis
|
|||
dotted=Pisteytetty
|
||||
doubleClickOrientation=Muuta suuntaa kaksoisnapsauttamalla
|
||||
doubleClickTooltip=Syötä tekstiä kaksoisnapsauttamalla
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Lataa
|
||||
downloadAs=Lataa nimellä
|
||||
clickHereToSave=Klikkaa tästä tallentaaksesi.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Miten haluaisit avata tämän tiedoston/nämä tiedostot?
|
|||
fileWillBeSavedInAppFolder={1} tallennetaan sovelluksen kansioon.
|
||||
fill=Täytä
|
||||
fillColor=Täyteväri
|
||||
find=Find
|
||||
fit=Sovita
|
||||
fitContainer=Muuta astian kokoa
|
||||
fitIntoContainer=Sovita astiaan
|
||||
|
@ -568,6 +571,7 @@ subscript=Alaindeksi
|
|||
superscript=Yläindeksi
|
||||
support=Tuki
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Taulukko
|
||||
targetSpacing=Tavoiteriviväli
|
||||
template=Mallipohja
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Ihanay
|
|||
alignment=Paghahanay
|
||||
allChangesLost=Lahat ng pagbabago ay mawawala
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Anggulo
|
||||
areYouSure=Sigurado ka ba?
|
||||
|
@ -149,6 +150,7 @@ done=Tapos
|
|||
dotted=Natuldokan
|
||||
doubleClickOrientation=Pindutin ng dalawang beses para mabago ang oryentasyon
|
||||
doubleClickTooltip=Pindutin ng dalawang beses para mailagay ang teksto
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Dawnlowd
|
||||
downloadAs=Dawnlowd bilang
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Paano mo gustong buksan ang mga payl na ito?
|
|||
fileWillBeSavedInAppFolder={1} ay maseseyb sa polder ng app
|
||||
fill=Punuan
|
||||
fillColor=Punuan ng kulay
|
||||
find=Find
|
||||
fit=Sukat
|
||||
fitContainer=Muling baguhin ang laki ng lalagyan.
|
||||
fitIntoContainer=Isukat sa loob ng lalagayan
|
||||
|
@ -568,6 +571,7 @@ subscript=Subskripto
|
|||
superscript=Superskripto
|
||||
support=Suporta
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Teybol
|
||||
targetSpacing=Target na pageespasyo
|
||||
template=Templeyt
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Aligner
|
|||
alignment=Alignement
|
||||
allChangesLost=Toutes les modifications seront perdues!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Êtes-vous sûr?
|
||||
|
@ -149,6 +150,7 @@ done=Achevé
|
|||
dotted=Pointillé
|
||||
doubleClickOrientation=Double-cliquer pour modifier l’orientation
|
||||
doubleClickTooltip=Double-cliquer pour insérer du texte
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Télécharger
|
||||
downloadAs=Télécharger en tant que
|
||||
clickHereToSave=Cliquer ici pour sauvegarder
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Comment voulez-vous ouvrir ce(s) fichier(s)?
|
|||
fileWillBeSavedInAppFolder={1} sera enregistré dans le dossier de l'application.
|
||||
fill=Remplir
|
||||
fillColor=Couleur de remplissage
|
||||
find=Find
|
||||
fit=Ajuster
|
||||
fitContainer=Redimensionner le conteneur
|
||||
fitIntoContainer=Ajuster au conteneur
|
||||
|
@ -568,6 +571,7 @@ subscript=Texte miniaturisé
|
|||
superscript=Texte agrandi
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tableau
|
||||
targetSpacing=Espacement de la cible
|
||||
template=Modèle
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=ישר
|
|||
alignment=יישור
|
||||
allChangesLost=כל השינויים יאבדו!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=זווית
|
||||
areYouSure=האם אתה בטוח?
|
||||
|
@ -149,6 +150,7 @@ done=סיום
|
|||
dotted=מנוקד
|
||||
doubleClickOrientation=לחץ לחיצה כפולה לשינוי אוריינטציה
|
||||
doubleClickTooltip=לחץ לחיצה כפולה כדי לשלב טקסט
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=הורד
|
||||
downloadAs=הורד בתור
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=כיצד תרצה לפתוח קובץ זה?
|
|||
fileWillBeSavedInAppFolder={1} יישמר בתיקיית האפליקציה.
|
||||
fill=מלא
|
||||
fillColor=מלא צבע
|
||||
find=Find
|
||||
fit=התאם
|
||||
fitContainer= שנה את גודל המכל
|
||||
fitIntoContainer=התאם למכל
|
||||
|
@ -568,6 +571,7 @@ subscript=סקריפט משנה
|
|||
superscript=סופר סקריפט
|
||||
support=תמיכה
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=טבלה
|
||||
targetSpacing=מרווח יעד
|
||||
template=תבנית
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Igazít
|
|||
alignment=Igazítás
|
||||
allChangesLost=Elvesz minden változtatás!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Szög
|
||||
areYouSure=Biztos benne?
|
||||
|
@ -149,6 +150,7 @@ done=Befejez
|
|||
dotted=Pontozott
|
||||
doubleClickOrientation=Dupla klikk az irányultság változtatásához
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Letölt
|
||||
downloadAs=Letölt mint
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Hogyan szeretné nyitni ezt a fájlt?
|
|||
fileWillBeSavedInAppFolder=Az {1} az applikáció mappába lesz mentve.
|
||||
fill=Töltés
|
||||
fillColor=Kitöltés szín
|
||||
find=Find
|
||||
fit=Illeszt
|
||||
fitContainer=Konténert átméretez
|
||||
fitIntoContainer=Konténerbe méretez
|
||||
|
@ -568,6 +571,7 @@ subscript=Index
|
|||
superscript=Mutatószám
|
||||
support=Támogatás
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tábázat
|
||||
targetSpacing=Cél térköz
|
||||
template=Sablon
|
||||
|
|
|
@ -16,6 +16,7 @@ align=align
|
|||
alignment=alignment
|
||||
allChangesLost=allChangesLost
|
||||
allPages=allPages
|
||||
allTags=allTags
|
||||
android=android
|
||||
angle=angle
|
||||
areYouSure=areYouSure
|
||||
|
@ -149,6 +150,7 @@ done=done
|
|||
dotted=dotted
|
||||
doubleClickOrientation=doubleClickOrientation
|
||||
doubleClickTooltip=doubleClickTooltip
|
||||
doubleClickChangeProperty=doubleClickChangeProperty
|
||||
download=download
|
||||
downloadAs=downloadAs
|
||||
clickHereToSave=clickHereToSave
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=fileOpenLocation
|
|||
fileWillBeSavedInAppFolder=fileWillBeSavedInAppFolder
|
||||
fill=fill
|
||||
fillColor=fillColor
|
||||
find=find
|
||||
fit=fit
|
||||
fitContainer=fitContainer
|
||||
fitIntoContainer=fitIntoContainer
|
||||
|
@ -568,6 +571,7 @@ subscript=subscript
|
|||
superscript=superscript
|
||||
support=support
|
||||
sysml=sysml
|
||||
tags=tags
|
||||
table=table
|
||||
targetSpacing=targetSpacing
|
||||
template=template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Rata
|
|||
alignment=Perataan
|
||||
allChangesLost=Semua perubahan akan hilang!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Sudut
|
||||
areYouSure=Apakah kamu yakin?
|
||||
|
@ -149,6 +150,7 @@ done=Selesai
|
|||
dotted=Garis-garis
|
||||
doubleClickOrientation=Klik ganda untuk ubah orientasi
|
||||
doubleClickTooltip=Klik dua kali untuk memasukkan teks
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=unduh
|
||||
downloadAs=unduh sebagai
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Bagaimana kamu mau membuka file-file ini?
|
|||
fileWillBeSavedInAppFolder=Akan tersimpan dalam direktori aplikasi
|
||||
fill=Isi
|
||||
fillColor=Isi warna
|
||||
find=Find
|
||||
fit=Paskan
|
||||
fitContainer=Rubah ukuran kontainer
|
||||
fitIntoContainer=Paskan dala kontainer
|
||||
|
@ -568,6 +571,7 @@ subscript=Subskrip
|
|||
superscript=Superskrip
|
||||
support=Bantuan
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabel
|
||||
targetSpacing=Spasi Target
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Allinea
|
|||
alignment=Allineamento
|
||||
allChangesLost=Tutte le modifiche saranno perse!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angolo
|
||||
areYouSure=Sei sicuro?
|
||||
|
@ -149,6 +150,7 @@ done=Fatto
|
|||
dotted=Puntato
|
||||
doubleClickOrientation=Doppio click per cambiare orientamento
|
||||
doubleClickTooltip=Doppio clic per inserire il testo
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Scarica
|
||||
downloadAs=Scarica come
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Come vorresti aprire questo file/questi files?
|
|||
fileWillBeSavedInAppFolder={1} sarà salvato nella cartella dell'applicazione
|
||||
fill=Riempi
|
||||
fillColor=Colore di riempimento
|
||||
find=Find
|
||||
fit=Adatta
|
||||
fitContainer=Ridimensiona il contenitore
|
||||
fitIntoContainer=Adatta al contenitore
|
||||
|
@ -568,6 +571,7 @@ subscript=Indice
|
|||
superscript=Testo ingrandito
|
||||
support=Supporto
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tavola
|
||||
targetSpacing=Spaziatura dell'obiettivo
|
||||
template=Modello
|
||||
|
|
|
@ -16,6 +16,7 @@ align=整列
|
|||
alignment=文字配置
|
||||
allChangesLost=すべての変更が失われます!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=アンドロイド
|
||||
angle=角度
|
||||
areYouSure=ほんとにいいですか?
|
||||
|
@ -149,6 +150,7 @@ done=完了
|
|||
dotted=点線
|
||||
doubleClickOrientation=ダブルクリックして向きを変更
|
||||
doubleClickTooltip=ダブルクリックして文字を挿入
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=ダウンロード
|
||||
downloadAs=ダウンロード
|
||||
clickHereToSave=ここをクリックして保存
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=このファイルはどのように開きますか?
|
|||
fileWillBeSavedInAppFolder={1}はアプリフォルダに保存されました。
|
||||
fill=塗りつぶし
|
||||
fillColor=塗りつぶしの色
|
||||
find=Find
|
||||
fit=フィット
|
||||
fitContainer=コンテナのリサイズ
|
||||
fitIntoContainer=コンテナにフィット
|
||||
|
@ -568,6 +571,7 @@ subscript=下付き文字
|
|||
superscript=上付き文字
|
||||
support=サポート
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=テーブル
|
||||
targetSpacing=終点の間隔
|
||||
template=テンプレート
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=정렬
|
|||
alignment=정렬
|
||||
allChangesLost=모든 변경내용이 손실됩니다!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=각
|
||||
areYouSure=계속 진행하시겠습니까?
|
||||
|
@ -149,6 +150,7 @@ done=완료
|
|||
dotted=점선
|
||||
doubleClickOrientation=더블 클릭하여 방향 변경
|
||||
doubleClickTooltip=더블 클릭하여 텍스트 삽입
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=다운로드
|
||||
downloadAs=다른 파일 형식으로 다운로드
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=파일을 어디에서 여시겠습니까?
|
|||
fileWillBeSavedInAppFolder={1} 파일이 프로그램 폴더에 저장됩니다.
|
||||
fill=채우기
|
||||
fillColor=채우기 색
|
||||
find=Find
|
||||
fit=맞추기
|
||||
fitContainer=도형 크기 조정
|
||||
fitIntoContainer=도형 안에 맞추기
|
||||
|
@ -568,6 +571,7 @@ subscript=아래 첨자
|
|||
superscript=위 첨자
|
||||
support=고객지원
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=표
|
||||
targetSpacing=객체 간격
|
||||
template=탬플릿
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Menjajar
|
|||
alignment=Penjajaran
|
||||
allChangesLost=Semua perubahan akan hilang!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Sudut
|
||||
areYouSure=Pastikah anda?
|
||||
|
@ -149,6 +150,7 @@ done=Siap
|
|||
dotted=Bertitik
|
||||
doubleClickOrientation=Klik dua kali untuk mengubahkan orientasi
|
||||
doubleClickTooltip=Klik dua kali untuk memasukkan teks
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Muat turun
|
||||
downloadAs=Muat turun sebagai
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Macam mana anda ingin buka fail-fail ini?
|
|||
fileWillBeSavedInAppFolder={1} akan disimpan dalam fail aplikasi.
|
||||
fill=Isikan
|
||||
fillColor=Isikan warna
|
||||
find=Find
|
||||
fit=Sesuai
|
||||
fitContainer=Mengubah saiz kotak
|
||||
fitIntoContainer=Sesuaikan ke dalam kotak
|
||||
|
@ -568,6 +571,7 @@ subscript=Subskrip
|
|||
superscript=Superskrip
|
||||
support=Sokongan
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Jadual
|
||||
targetSpacing=Jarak antara sasaran
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=In lijn brengen
|
|||
alignment=Uitlijnen
|
||||
allChangesLost=Alle veranderingen zullen verloren gaan!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Hoek
|
||||
areYouSure=Zeker weten?
|
||||
|
@ -149,6 +150,7 @@ done=Voltooid
|
|||
dotted=Gestippeld
|
||||
doubleClickOrientation=Dubbelklik om richting te veranderen
|
||||
doubleClickTooltip=Dubbelklik om tekst in te voegen
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Downloaden
|
||||
downloadAs=Downloaden als
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Hoe wilt u deze bestanden openen?
|
|||
fileWillBeSavedInAppFolder={1} wordt opgeslagen in de app map
|
||||
fill=Vullen
|
||||
fillColor=Kleur Vullen
|
||||
find=Find
|
||||
fit=Aanpassen
|
||||
fitContainer=Container formaat aanpassen
|
||||
fitIntoContainer=Passend maken in container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Help
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabel
|
||||
targetSpacing=Doel Interlinie
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Juster
|
|||
alignment=Justering
|
||||
allChangesLost=Alle endringer vil gå tapt
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Vinkel
|
||||
areYouSure=Er du sikker?
|
||||
|
@ -149,6 +150,7 @@ done=Utført
|
|||
dotted=Prikket
|
||||
doubleClickOrientation=Dobbeltklikk for å endre retning
|
||||
doubleClickTooltip=Dobbeltklikk for å sette inn tekst
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Last ned
|
||||
downloadAs=Last ned som
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Hvordan ønsker du å åpne filen(e)?
|
|||
fileWillBeSavedInAppFolder= {1} blir lagret i app-mappen.
|
||||
fill=Fyll
|
||||
fillColor=Fyll farge
|
||||
find=Find
|
||||
fit=Tilpass
|
||||
fitContainer=Endre boksstørrelse
|
||||
fitIntoContainer=Tilpass boks
|
||||
|
@ -568,6 +571,7 @@ subscript=Senket skrift
|
|||
superscript=Hevet skrift
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabell
|
||||
targetSpacing=Målavstand
|
||||
template=Mal
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Wyrównaj
|
|||
alignment=Wyrównywanie
|
||||
allChangesLost=Wszystkie zmiany zostaną utracone!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Kąt
|
||||
areYouSure=Czy jesteś pewny?
|
||||
|
@ -149,6 +150,7 @@ done=Gotowe
|
|||
dotted=Kropkowany
|
||||
doubleClickOrientation=Kliknij dwukrotnie, aby zmienić położenie
|
||||
doubleClickTooltip=Kliknij dwukrotnie, aby wstawić tekst
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Pobierz
|
||||
downloadAs=Pobierz jako
|
||||
clickHereToSave=Kliknij tutaj, aby zapisać
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=W jaki sposób chcesz otworzyć ten/te plik(i)?
|
|||
fileWillBeSavedInAppFolder={1} zostanie zapisany w folderze aplikacji.
|
||||
fill=Wypełnij
|
||||
fillColor=Kolor wypełnienia
|
||||
find=Find
|
||||
fit=Dopasuj
|
||||
fitContainer=Zmień wymiary kontenera
|
||||
fitIntoContainer=Dopasuj do kontenera
|
||||
|
@ -568,6 +571,7 @@ subscript=Indeks dolny
|
|||
superscript=Indeks górny
|
||||
support=Wsparcie
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabela
|
||||
targetSpacing=Rozmieszczenie celu
|
||||
template=Szablon
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Alinhar
|
|||
alignment=Alinhamento
|
||||
allChangesLost=Todas as modificações serão perdidas!
|
||||
allPages=Todas as páginas
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Ângulo
|
||||
areYouSure=Tem certeza?
|
||||
|
@ -149,6 +150,7 @@ done=Concluído
|
|||
dotted=Pontilhado
|
||||
doubleClickOrientation=Clique duas vezes para mudar de orientação
|
||||
doubleClickTooltip=Clique duas vezes para inserir texto
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Baixar
|
||||
downloadAs=Baixar como
|
||||
clickHereToSave=Clique aqui para salvar.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Como você gostaria de abrir o(s) arquivo(s)?
|
|||
fileWillBeSavedInAppFolder={1} será salvo na pasta do aplicativo.
|
||||
fill=Preencher
|
||||
fillColor=Cor de preenchimento
|
||||
find=Find
|
||||
fit=Ajustar
|
||||
fitContainer=Redimensionar compartimento
|
||||
fitIntoContainer=Ajustar no compartimento
|
||||
|
@ -568,6 +571,7 @@ subscript=Subescrever
|
|||
superscript=Sobrescrever
|
||||
support=Ajuda
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabela
|
||||
targetSpacing=Espaçamento Alvo
|
||||
template=Modelo
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Alinhar
|
|||
alignment=Alinhamento
|
||||
allChangesLost=Todas as alterações serão perdidas!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Ângulo
|
||||
areYouSure=Tem a certeza?
|
||||
|
@ -149,6 +150,7 @@ done=Concluído
|
|||
dotted=Pontilhado
|
||||
doubleClickOrientation=Clique duas vezes para mudar de orientação
|
||||
doubleClickTooltip=Clique duas vezes para inserir texto
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Descarregar
|
||||
downloadAs=Descarregar como
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Como gostava de abrir o(s) ficheiro(s)?
|
|||
fileWillBeSavedInAppFolder={1} será guardado na pasta de aplicações.
|
||||
fill=Preencher
|
||||
fillColor=Cor de preenchimento
|
||||
find=Find
|
||||
fit=Ajustar
|
||||
fitContainer=Redimensionar contentor
|
||||
fitIntoContainer=Ajustar no contentor
|
||||
|
@ -568,6 +571,7 @@ subscript=Subescrever
|
|||
superscript=Sobrescrever
|
||||
support=Ajuda
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabela
|
||||
targetSpacing=Espaçamento do objetivo
|
||||
template=Modelo
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Aliniază
|
|||
alignment=Aliniere
|
||||
allChangesLost=Toate modificările vor fi pierdute!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Unghi
|
||||
areYouSure=Eşti sigur?
|
||||
|
@ -149,6 +150,7 @@ done=Finalizat
|
|||
dotted=Punctat
|
||||
doubleClickOrientation=Efectuează dublu-click pentru a modifica orientarea
|
||||
doubleClickTooltip=Efectuează dublu-click pentru a insera textul
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Descarcă
|
||||
downloadAs=Descarcă ca şi
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=În ce format doreşti să deschizi aceste fişiere?
|
|||
fileWillBeSavedInAppFolder={1} va fi salvat în dosarul aplicaţiei.
|
||||
fill=Umplere
|
||||
fillColor=Culoarea de umplere
|
||||
find=Find
|
||||
fit=Potrivește dimensiunea
|
||||
fitContainer=Redimensionează recipientul.
|
||||
fitIntoContainer=Potrivește în interiorul recipientului.
|
||||
|
@ -568,6 +571,7 @@ subscript=Indice
|
|||
superscript=Text mărit
|
||||
support=Suport
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabel
|
||||
targetSpacing=Spațierea țintei
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Выровнять
|
|||
alignment=Выравнивание
|
||||
allChangesLost=Все изменения будут потеряны!
|
||||
allPages=Все страницы
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Угол
|
||||
areYouSure=Вы уверены?
|
||||
|
@ -149,6 +150,7 @@ done=Готово
|
|||
dotted=Точками
|
||||
doubleClickOrientation=Дважды щелкните мышью, чтобы изменить ориентацию
|
||||
doubleClickTooltip=Дважды щелкните мышью для ввода текста
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Скачать
|
||||
downloadAs=Скачать как
|
||||
clickHereToSave=Щелкните здесь для сохранения
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Как вы хотите открыть файл(ы)?
|
|||
fileWillBeSavedInAppFolder={1} будет сохранен в папке программы
|
||||
fill=Заливка
|
||||
fillColor=Цвет заливки
|
||||
find=Find
|
||||
fit=По размеру
|
||||
fitContainer=Изменить размер контейнера
|
||||
fitIntoContainer=По размеру контейнера
|
||||
|
@ -568,6 +571,7 @@ subscript=Нижний индекс
|
|||
superscript=Верхний индекс
|
||||
support=Поддержка
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Таблица
|
||||
targetSpacing=От конечного узла
|
||||
template=Шаблон
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Poravnaj
|
|||
alignment=Poravnanje
|
||||
allChangesLost=Sve promene će biti izgubljene!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Ugao
|
||||
areYouSure=Da li ste sigurni?
|
||||
|
@ -149,6 +150,7 @@ done=Završeno
|
|||
dotted=Tačkast
|
||||
doubleClickOrientation=Dupli klik za promenu orijentacije
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Sačuvaj kao
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Kako biste želeli otvoriti ovaj dokument?
|
|||
fileWillBeSavedInAppFolder={1} će biti sačuvan u folderu aplikacije.
|
||||
fill=Fill
|
||||
fillColor=Boja popunjavanja
|
||||
find=Find
|
||||
fit=Prilagodi
|
||||
fitContainer=Prilagodi kontejner
|
||||
fitIntoContainer=Prilagodi u kontejner
|
||||
|
@ -568,6 +571,7 @@ subscript=Potpis
|
|||
superscript=Natpis
|
||||
support=Podrška
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabela
|
||||
targetSpacing=Proređivanje odredišta
|
||||
template=Šablon
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Justera
|
|||
alignment=Justering
|
||||
allChangesLost=Alla ändringar kommer gå förlorade!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Vinkel
|
||||
areYouSure=Är du säker?
|
||||
|
@ -149,6 +150,7 @@ done=Klar
|
|||
dotted=Prickad
|
||||
doubleClickOrientation=Dubbelklicka för att ändra riktning
|
||||
doubleClickTooltip=Dubbelklicka för att sätta in text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Ladda ner
|
||||
downloadAs=Ladda ner som
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Hur vill du öppna dessa filer?
|
|||
fileWillBeSavedInAppFolder={1} kommer sparas i app-mappen
|
||||
fill=Fyll
|
||||
fillColor=Fyllningsfärg
|
||||
find=Find
|
||||
fit=Anpassa
|
||||
fitContainer=Storleksändra box
|
||||
fitIntoContainer=Anpassa till box
|
||||
|
@ -568,6 +571,7 @@ subscript=Nedsänkt text
|
|||
superscript=Upphöjd text
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tabell
|
||||
targetSpacing=Målavstånd
|
||||
template=Mall
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Align
|
|||
alignment=Alignment
|
||||
allChangesLost=All changes will be lost!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Angle
|
||||
areYouSure=Are you sure?
|
||||
|
@ -149,6 +150,7 @@ done=Done
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=Doubleclick to change orientation
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=Download as
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=How would you like to open these file(s)?
|
|||
fileWillBeSavedInAppFolder={1} will be saved in the app folder.
|
||||
fill=Fill
|
||||
fillColor=Fill Color
|
||||
find=Find
|
||||
fit=Fit
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=Subscript
|
|||
superscript=Superscript
|
||||
support=Support
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Table
|
||||
targetSpacing=Target Spacing
|
||||
template=Template
|
||||
|
|
|
@ -16,6 +16,7 @@ align=จัดเรียงแนวเดียวกัน
|
|||
alignment=การจัดเรียงแนวเดียวกัน
|
||||
allChangesLost=การเปลี่ยนแปลงทั้งหมดจะสูญหาย
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=มุม
|
||||
areYouSure=คุณแน่ใจหรือไม่
|
||||
|
@ -149,6 +150,7 @@ done=เสร็จสิ้น
|
|||
dotted=จุดไข่ปลา
|
||||
doubleClickOrientation=ดับเบิ้ลคลิ๊กเพื่อเปลี่ยนทิศทาง
|
||||
doubleClickTooltip=ดับเบิ้ลคลิ๊กกล่องข้อความช่วยเหลือ
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=ดาวน์โหลด
|
||||
downloadAs=ดาวน์โหลดเป็น
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=คุณต้องการเปิดไฟล์เหล
|
|||
fileWillBeSavedInAppFolder={1} จะถูกบันทึกลงในแฟ้มแอพพลิเคชั่น
|
||||
fill=เติม
|
||||
fillColor=เติมสี
|
||||
find=Find
|
||||
fit=พอดี
|
||||
fitContainer=แก้ไขขนาดที่บรรจุ
|
||||
fitIntoContainer=เติมให้เต็มที่บรรจุ
|
||||
|
@ -568,6 +571,7 @@ subscript=ดรรชนีล่าง
|
|||
superscript=ดรรชนีบน
|
||||
support=ช่วยเหลือ
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=ตาราง
|
||||
targetSpacing=การเว้นวรรคเป้าหมาย
|
||||
template=แบบร่าง
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Hizala
|
|||
alignment=Hizalama
|
||||
allChangesLost=Tüm değişiklikler kaybolacaktır!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Açı
|
||||
areYouSure=Emin misiniz?
|
||||
|
@ -149,6 +150,7 @@ done=Tamamlandı
|
|||
dotted=Nokta-nokta
|
||||
doubleClickOrientation=Yönlendirmeyi değiştirmek için çift tıklayın
|
||||
doubleClickTooltip=Metin girmek için çift tıklayın
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=İndir
|
||||
downloadAs=Farklı indir
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Bu dosya(lar)ı nasıl açmak isterdiniz?
|
|||
fileWillBeSavedInAppFolder={1} uygulama klasöründe kaydedilecek.
|
||||
fill=Doldur
|
||||
fillColor=Dolgu rengi
|
||||
find=Find
|
||||
fit=Sığdır
|
||||
fitContainer=Kapsayıcının boyutunu değiştir
|
||||
fitIntoContainer=Kapsayıcıya sığdır
|
||||
|
@ -568,6 +571,7 @@ subscript=Alt-simge
|
|||
superscript=Üst-simge
|
||||
support=Destek
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Tablo
|
||||
targetSpacing=Hedef boşluğu
|
||||
template=Şablon
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Вирівняти
|
|||
alignment=Вирівнювання
|
||||
allChangesLost=Всі зміни будуть втрачені!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Кут
|
||||
areYouSure=Ви впевнені?
|
||||
|
@ -149,6 +150,7 @@ done=Готово
|
|||
dotted=Крапками
|
||||
doubleClickOrientation=Двічі клацніть мишкою, щоб змінити напрямок
|
||||
doubleClickTooltip=Двічі клацніть мишкою, щоб вставити текст
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Скачати
|
||||
downloadAs=Скачати як
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Як ви хочете відкрити файл(и)?
|
|||
fileWillBeSavedInAppFolder={1} буде збережено в папці програми.
|
||||
fill=Заливка
|
||||
fillColor=Колір заливки
|
||||
find=Find
|
||||
fit=Припасувати
|
||||
fitContainer=Змінити розмір контейнера
|
||||
fitIntoContainer=По розміру контейнера
|
||||
|
@ -568,6 +571,7 @@ subscript=Нижній індекс
|
|||
superscript=Верхній індекс
|
||||
support=Підтримка
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Таблиця
|
||||
targetSpacing=Від кінцевого вузла
|
||||
template=Шаблон
|
||||
|
|
|
@ -16,6 +16,7 @@ align=Căn lề
|
|||
alignment=Sự căn lề
|
||||
allChangesLost=Tất cả thay đổi sẽ mất!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=Góc
|
||||
areYouSure=Bạn chắc chắn?
|
||||
|
@ -149,6 +150,7 @@ done=Xong
|
|||
dotted=Chấm chấm
|
||||
doubleClickOrientation=Nhấp đôi chuột để đổi hướng
|
||||
doubleClickTooltip=Nhấp đôi chuột để chèn văn bản
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Tải xuống
|
||||
downloadAs=Tải xuống dưới dạng
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=Bạn muốn mở (các) tập tin này thế nào?
|
|||
fileWillBeSavedInAppFolder={1} sẽ được lưu trong thư mục ứng dụng
|
||||
fill=Tô
|
||||
fillColor=Tô màu
|
||||
find=Find
|
||||
fit=Phù hợp
|
||||
fitContainer=Đặt lại kích thước thùng chứa
|
||||
fitIntoContainer=Phù hợp với thùng chứa
|
||||
|
@ -568,6 +571,7 @@ subscript=Chỉ số dưới
|
|||
superscript=Chỉ số trên
|
||||
support=Hỗ trợ
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=Bảng
|
||||
targetSpacing=Khoảng cách mục tiêu
|
||||
template=Bản mẫu
|
||||
|
|
|
@ -16,6 +16,7 @@ align=對齊
|
|||
alignment=對齊
|
||||
allChangesLost=所有的修改將不會被儲存!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=角度
|
||||
areYouSure=是否確定?
|
||||
|
@ -149,6 +150,7 @@ done=完成
|
|||
dotted=Dotted
|
||||
doubleClickOrientation=雙擊改變方向
|
||||
doubleClickTooltip=雙撃插入文字
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=下載
|
||||
downloadAs=下載為
|
||||
clickHereToSave=點擊此處存檔
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=您想如何開啟這些檔案 ?
|
|||
fileWillBeSavedInAppFolder={1}將會儲存在應用目錄
|
||||
fill=填滿
|
||||
fillColor=填滿顏色
|
||||
find=Find
|
||||
fit=符合大小
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=下標
|
|||
superscript=上標
|
||||
support=協助
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=表格
|
||||
targetSpacing=目標間距
|
||||
template=模板
|
||||
|
|
|
@ -16,6 +16,7 @@ align=对齐
|
|||
alignment=对齐
|
||||
allChangesLost=所有修改都不会被保存!
|
||||
allPages=All Pages
|
||||
allTags=All Tags
|
||||
android=Android
|
||||
angle=角度
|
||||
areYouSure=你确定吗?
|
||||
|
@ -149,6 +150,7 @@ done=完成
|
|||
dotted=点线
|
||||
doubleClickOrientation=双击改变方向
|
||||
doubleClickTooltip=Doubleclick to insert text
|
||||
doubleClickChangeProperty=Doubleclick to change property name
|
||||
download=Download
|
||||
downloadAs=下载为
|
||||
clickHereToSave=Click here to save.
|
||||
|
@ -233,6 +235,7 @@ fileOpenLocation=你想如何打开这些文件?
|
|||
fileWillBeSavedInAppFolder={1}将要保存在应用文件夹
|
||||
fill=填充
|
||||
fillColor=填充色
|
||||
find=Find
|
||||
fit=配合
|
||||
fitContainer=Resize Container
|
||||
fitIntoContainer=Fit into Container
|
||||
|
@ -568,6 +571,7 @@ subscript=下标
|
|||
superscript=上标
|
||||
support=支持
|
||||
sysml=SysML
|
||||
tags=Tags
|
||||
table=表格
|
||||
targetSpacing=末端间距
|
||||
template=模板
|
||||
|
|
Loading…
Reference in a new issue