11.2.4 release
This commit is contained in:
parent
3096f7d47e
commit
36cf86fd99
27 changed files with 9506 additions and 3699 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
29-AUG-2019: 11.2.4
|
||||
|
||||
- Fixes segment connector rounding issue
|
||||
- Updates AWS icons
|
||||
- Fixes partial concentric ellipse
|
||||
- Fixes search for custom libraries
|
||||
- Adds pagecount placeholder
|
||||
|
||||
26-AUG-2019: 11.2.3
|
||||
|
||||
- Fit window zoom no longer ignores selection
|
||||
- Updates page IDs in custom links on import
|
||||
- Updates link hint after selection change
|
||||
- Updates cell IDs in custom links
|
||||
|
||||
23-AUG-2019: 11.2.2
|
||||
|
||||
- Add support for loading zipped draw.io and Gliffy formats
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
11.2.2
|
||||
11.2.4
|
|
@ -1,4 +1,4 @@
|
|||
var mxClient={VERSION:"4.0.3",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")&&
|
||||
var mxClient={VERSION:"4.0.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
|
||||
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
|
||||
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
|
||||
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg",
|
||||
|
@ -306,7 +306,7 @@ e.setAttribute("offset","0%");e.setAttribute("style","stop-color:"+a+c);f.append
|
|||
mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("path"==c.nodeName)if(null!=this.path&&0<this.path.length)c.setAttribute("d",this.path.join(" "));else return;a&&null!=d.fillColor?this.updateFill():this.styleEnabled||("ellipse"==c.nodeName&&mxClient.IS_FF?c.setAttribute("fill","transparent"):c.setAttribute("fill","none"),a=!1);b&&null!=d.strokeColor?this.updateStroke():this.styleEnabled||c.setAttribute("stroke","none");null!=d.transform&&0<d.transform.length&&
|
||||
c.setAttribute("transform",d.transform);d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&!a&&this.root.appendChild(this.createTolerance(c));this.pointerEvents?c.setAttribute("pointer-events",this.pointerEventsValue):this.pointerEvents||null!=this.originalRoot||c.setAttribute("pointer-events","none");("rect"!=c.nodeName&&"path"!=c.nodeName&&"ellipse"!=c.nodeName||"none"!=c.getAttribute("fill")&&"transparent"!=c.getAttribute("fill")||"none"!=c.getAttribute("stroke")||"none"!=
|
||||
c.getAttribute("pointer-events"))&&this.root.appendChild(c);this.node=null}};
|
||||
mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);if(null!=a.fillColor)if(null!=a.gradientColor)if(a=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection),mxClient.IS_CHROME_APP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document)this.node.setAttribute("fill","url(#"+a+")");else{var b=this.getBaseUrl().replace(/([\(\)])/g,
|
||||
mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);if(null!=a.fillColor)if(null!=a.gradientColor)if(a=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection),mxClient.IS_CHROMEAPP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document)this.node.setAttribute("fill","url(#"+a+")");else{var b=this.getBaseUrl().replace(/([\(\)])/g,
|
||||
"\\$1");this.node.setAttribute("fill","url("+b+"#"+a+")")}else this.node.setAttribute("fill",String(a.fillColor).toLowerCase())};mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))};
|
||||
mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",String(a.strokeColor).toLowerCase());(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute("stroke-opacity",a.alpha*a.strokeAlpha);var b=this.getCurrentStrokeWidth();1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern((a.fixDash?1:a.strokeWidth)*a.scale))};
|
||||
mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null==a.miterLimit||this.styleEnabled&&10==a.miterLimit||this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
|
||||
|
@ -341,7 +341,7 @@ d/2:g==mxConstants.ALIGN_BOTTOM&&(q-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_W
|
|||
")"+z);x.setAttribute("width",Math.round(Math.max(1,c)));x.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(x,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(x.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(x),c.appendChild(a),u.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,q)}};
|
||||
mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
|
||||
mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p){n=null!=n?n:0;k=this.state;var q=k.fontSize,r=this.createElement("g"),t=k.transform||"";this.updateFont(r);0!=n&&(t+="rotate("+n+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&r.setAttribute("direction",p);m&&0<c&&0<d&&(p=a,n=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?n-=d/2:g==mxConstants.ALIGN_BOTTOM&&(n-=d)),n=this.createClip(p*k.scale-2,
|
||||
n*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(n):this.root.appendChild(n),mxClient.IS_CHROME_APP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document?r.setAttribute("clip-path","url(#"+n.getAttribute("id")+")"):(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),r.setAttribute("clip-path","url("+p+"#"+n.getAttribute("id")+")")));n=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=n&&r.setAttribute("text-anchor",
|
||||
n*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(n):this.root.appendChild(n),mxClient.IS_CHROMEAPP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document?r.setAttribute("clip-path","url(#"+n.getAttribute("id")+")"):(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),r.setAttribute("clip-path","url("+p+"#"+n.getAttribute("id")+")")));n=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=n&&r.setAttribute("text-anchor",
|
||||
n);this.styleEnabled&&q==mxConstants.DEFAULT_FONTSIZE||r.setAttribute("font-size",q*k.scale+"px");0<t.length&&r.setAttribute("transform",t);1>k.alpha&&r.setAttribute("opacity",k.alpha);t=e.split("\n");p=Math.round(q*mxConstants.LINE_HEIGHT);var u=q+(t.length-1)*p;n=b+q-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?n-=d/2:(m=(this.matchHtmlAlignment&&m&&0<d?Math.min(u,d):u)/2,n-=m+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==l?n-=d:(m=this.matchHtmlAlignment&&m&&0<d?Math.min(u,d):u,n-=m+2));for(m=0;m<t.length;m++)0<
|
||||
t[m].length&&0<mxUtils.trim(t[m]).length&&(q=this.createElement("text"),q.setAttribute("x",this.format(a*k.scale)+this.textOffset),q.setAttribute("y",this.format(n*k.scale)+this.textOffset),mxUtils.write(q,t[m]),r.appendChild(q)),n+=p;this.root.appendChild(r);this.addTextBackground(r,e,a,b,c,"fill"==l?d:u,f,g,l)};
|
||||
mxSvgCanvas2D.prototype.updateFont=function(a){var b=this.state;a.setAttribute("fill",b.fontColor);this.styleEnabled&&b.fontFamily==mxConstants.DEFAULT_FONTFAMILY||a.setAttribute("font-family",b.fontFamily);(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&a.setAttribute("font-weight","bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&a.setAttribute("font-style","italic");(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&a.setAttribute("text-decoration",
|
||||
|
@ -978,18 +978,18 @@ SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)
|
|||
Math.round(t.x),t.y=Math.round(t.y),n.push(t))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));t=g[q];null!=t&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-t.x)<k&&(d[d.length-1].x=t.x),Math.abs(d[d.length-1].y-t.y)<k&&(d[d.length-1].y=t.y));var n=d[0],u=b,x=g[0],y=!1,A=!1,y=n;null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),u=null);for(r=0;2>r;r++){var z=null!=x&&x.x==y.x,v=null!=x&&x.y==y.y,B=null!=u&&y.y>=u.y&&y.y<=u.y+
|
||||
u.height,u=null!=u&&y.x>=u.x&&y.x<=u.x+u.width,y=v||null==x&&B,A=z||null==x&&u;if(0!=r||!(y&&A||z&&v)){if(null!=x&&!v&&!z&&(B||u)){m=B?!1:!0;break}if(A||y){m=y;1==r&&(m=0==d.length%2?y:A);break}}u=c;x=g[q];null!=x&&(x.x=Math.round(x.x),x.y=Math.round(x.y),u=null);y=d[d.length-1];z&&v&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
|
||||
p.y));m?p.y=n.y:p.x=n.x;for(r=0;r<d.length;r++)m=!m,n=d[r],m?p.y=n.y:p.x=n.x,f(p.clone())}else n=p,m=!0;p=g[q];null==p&&null!=c&&(p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=n&&(m&&(null!=g[q]&&g[q].y!=n.y||null==g[q]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[q]&&g[q].x!=n.x||null==g[q]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&f(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=b)for(;1<
|
||||
e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[q]&&null!=c)for(;1<e.length&&null!=e[e.length-1]&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e.splice(e.length-1,1);null!=t&&null!=e[e.length-1]&&Math.abs(t.x-e[e.length-1].x)<k&&Math.abs(t.y-e[e.length-1].y)<k&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(Math.abs(e[e.length-1].x-t.x)<k&&(e[e.length-1].x=t.x),Math.abs(e[e.length-1].y-t.y)<k&&(e[e.length-1].y=t.y)))},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,
|
||||
0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,
|
||||
2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,
|
||||
getJettySize:function(a,b,c,d,e){b=mxUtils.getValue(a.style,e?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==b&&(mxUtils.getValue(a.style,e?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,e?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),b=Math.max(2,Math.ceil((a+mxEdgeStyle.orthBuffer)/
|
||||
mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],m=f[f.length-1],n=null!=b?b.x:l.x,p=null!=b?b.y:l.y,q=null!=b?b.width:0,r=null!=b?b.height:0,t=null!=c?c.x:m.x,u=null!=c?c.y:m.y,x=null!=c?c.width:0,y=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),A=a.view.scale*mxEdgeStyle.getJettySize(a,
|
||||
b,c,d,!1);null!=b&&c==b&&(f=A=Math.max(f,A));var z=A+f,v=!1;if(null!=l&&null!=m)var v=m.x-l.x,B=m.y-l.y,v=v*v+B*B<z*z;if(v||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(n,p,q,r),v),n=v.x,p=v.y,
|
||||
q=v.width,r=v.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(t,u,x,y),v),t=v.x,u=v.y,x=v.width,y=v.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;r=Math.round(10*r)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;x=Math.round(10*x)/10;y=Math.round(10*y)/10;a=[0,0];n=[[n,p,q,r],[t,u,x,y]];A=[f,A];for(v=0;2>v;v++)mxEdgeStyle.limits[v][1]=
|
||||
n[v][0]-A[v],mxEdgeStyle.limits[v][2]=n[v][1]-A[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+A[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+A[v];A=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);B=A-p;A=0;0>v?A=0>B?2:1:0>=B&&(A=3,0==v&&(A=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=mxConstants.DIRECTION_MASK_EAST),
|
||||
b[v][1]=(p.y-n[v][1])/n[v][3],1>=Math.abs(p.y-n[v][1])?a[v]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[v][1]-n[v][3])&&(a[v]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=m);v=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);q=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-z,0);mxEdgeStyle.vertexSeperations[2]=Math.max(v-z,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-z,0);mxEdgeStyle.vertexSeperations[3]=Math.max(q-z,0);z=[];
|
||||
c=[];l=[];c[0]=m>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=v>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=q?m:q;p=v>=p?v:p;q=[[0,0],[0,0]];r=!1;for(v=0;2>v;v++)0==a[v]&&(0==(c[v]&d[v])&&(c[v]=mxUtils.reversePortConstraints(c[v])),0==(l[v]&d[v])&&(l[v]=mxUtils.reversePortConstraints(l[v])),q[v][0]=l[v],q[v][1]=c[v]);0<p&&0<m&&(0<(c[0]&d[0])&&0<(l[1]&d[1])?(q[0][0]=
|
||||
c[0],q[0][1]=l[0],q[1][0]=l[1],q[1][1]=c[1],r=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(q[0][0]=l[0],q[0][1]=c[0],q[1][0]=c[1],q[1][1]=l[1],r=!0));0<p&&!r&&(q[0][0]=l[0],q[0][1]=c[0],q[1][0]=l[1],q[1][1]=c[1],r=!0);0<m&&!r&&(q[0][0]=c[0],q[0][1]=l[0],q[1][0]=c[1],q[1][1]=l[1]);for(v=0;2>v;v++)0==a[v]&&(0==(q[v][0]&d[v])&&(q[v][0]=q[v][1]),z[v]=q[v][0]&d[v],z[v]|=(q[v][1]&d[v])<<8,z[v]|=(q[1-v][v]&d[v])<<16,z[v]|=(q[1-v][1-v]&d[v])<<24,0==(z[v]&15)&&(z[v]<<=8),0==(z[v]&3840)&&(z[v]=z[v]&15|z[v]>>8),0==(z[v]&
|
||||
983040)&&(z[v]=z[v]&65535|(z[v]&251658240)>>8),a[v]=z[v]&15,d[v]==mxConstants.DIRECTION_MASK_WEST||d[v]==mxConstants.DIRECTION_MASK_NORTH||d[v]==mxConstants.DIRECTION_MASK_EAST||d[v]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[v]=d[v]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];z=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=A;z-=A;1>d&&(d+=4);1>z&&(z+=4);d=mxEdgeStyle.routePatterns[d-1][z-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
|
||||
e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[q]&&null!=c)for(;1<e.length&&null!=e[e.length-1]&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e.splice(e.length-1,1);null!=t&&null!=e[e.length-1]&&Math.abs(t.x-e[e.length-1].x)<=k&&Math.abs(t.y-e[e.length-1].y)<=k&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(Math.abs(e[e.length-1].x-t.x)<k&&(e[e.length-1].x=t.x),Math.abs(e[e.length-1].y-t.y)<k&&(e[e.length-1].y=t.y)))},orthBuffer:10,orthPointsFallback:!0,
|
||||
dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,
|
||||
2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,
|
||||
VERTEX_MASK:3072,getJettySize:function(a,b,c,d,e){b=mxUtils.getValue(a.style,e?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==b&&(mxUtils.getValue(a.style,e?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,e?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),b=Math.max(2,Math.ceil((a+
|
||||
mxEdgeStyle.orthBuffer)/mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],m=f[f.length-1],n=null!=b?b.x:l.x,p=null!=b?b.y:l.y,q=null!=b?b.width:0,r=null!=b?b.height:0,t=null!=c?c.x:m.x,u=null!=c?c.y:m.y,x=null!=c?c.width:0,y=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),A=a.view.scale*
|
||||
mxEdgeStyle.getJettySize(a,b,c,d,!1);null!=b&&c==b&&(f=A=Math.max(f,A));var z=A+f,v=!1;if(null!=l&&null!=m)var v=m.x-l.x,B=m.y-l.y,v=v*v+B*B<z*z;if(v||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(n,
|
||||
p,q,r),v),n=v.x,p=v.y,q=v.width,r=v.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),v=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=v&&(v=mxUtils.getBoundingBox(new mxRectangle(t,u,x,y),v),t=v.x,u=v.y,x=v.width,y=v.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;r=Math.round(10*r)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;x=Math.round(10*x)/10;y=Math.round(10*y)/10;a=[0,0];n=[[n,p,q,r],[t,u,x,y]];A=[f,A];for(v=0;2>
|
||||
v;v++)mxEdgeStyle.limits[v][1]=n[v][0]-A[v],mxEdgeStyle.limits[v][2]=n[v][1]-A[v],mxEdgeStyle.limits[v][4]=n[v][0]+n[v][2]+A[v],mxEdgeStyle.limits[v][8]=n[v][1]+n[v][3]+A[v];A=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;v=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);B=A-p;A=0;0>v?A=0>B?2:1:0>=B&&(A=3,0==v&&(A=2));p=null;null!=b&&(p=l);b=[[.5,.5],[.5,.5]];for(v=0;2>v;v++)null!=p&&(b[v][0]=(p.x-n[v][0])/n[v][2],1>=Math.abs(p.x-n[v][0])?a[v]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[v][0]-n[v][2])&&(a[v]=
|
||||
mxConstants.DIRECTION_MASK_EAST),b[v][1]=(p.y-n[v][1])/n[v][3],1>=Math.abs(p.y-n[v][1])?a[v]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[v][1]-n[v][3])&&(a[v]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=m);v=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);q=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-z,0);mxEdgeStyle.vertexSeperations[2]=Math.max(v-z,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-z,0);mxEdgeStyle.vertexSeperations[3]=
|
||||
Math.max(q-z,0);z=[];c=[];l=[];c[0]=m>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=v>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=q?m:q;p=v>=p?v:p;q=[[0,0],[0,0]];r=!1;for(v=0;2>v;v++)0==a[v]&&(0==(c[v]&d[v])&&(c[v]=mxUtils.reversePortConstraints(c[v])),0==(l[v]&d[v])&&(l[v]=mxUtils.reversePortConstraints(l[v])),q[v][0]=l[v],q[v][1]=c[v]);0<p&&0<m&&(0<(c[0]&d[0])&&
|
||||
0<(l[1]&d[1])?(q[0][0]=c[0],q[0][1]=l[0],q[1][0]=l[1],q[1][1]=c[1],r=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(q[0][0]=l[0],q[0][1]=c[0],q[1][0]=c[1],q[1][1]=l[1],r=!0));0<p&&!r&&(q[0][0]=l[0],q[0][1]=c[0],q[1][0]=l[1],q[1][1]=c[1],r=!0);0<m&&!r&&(q[0][0]=c[0],q[0][1]=l[0],q[1][0]=c[1],q[1][1]=l[1]);for(v=0;2>v;v++)0==a[v]&&(0==(q[v][0]&d[v])&&(q[v][0]=q[v][1]),z[v]=q[v][0]&d[v],z[v]|=(q[v][1]&d[v])<<8,z[v]|=(q[1-v][v]&d[v])<<16,z[v]|=(q[1-v][1-v]&d[v])<<24,0==(z[v]&15)&&(z[v]<<=8),0==(z[v]&3840)&&(z[v]=
|
||||
z[v]&15|z[v]>>8),0==(z[v]&983040)&&(z[v]=z[v]&65535|(z[v]&251658240)>>8),a[v]=z[v]&15,d[v]==mxConstants.DIRECTION_MASK_WEST||d[v]==mxConstants.DIRECTION_MASK_NORTH||d[v]==mxConstants.DIRECTION_MASK_EAST||d[v]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[v]=d[v]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];z=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=A;z-=A;1>d&&(d+=4);1>z&&(z+=4);d=mxEdgeStyle.routePatterns[d-1][z-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
|
||||
f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2];mxEdgeStyle.wayPoints1[0][1]+=n[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=n[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=z=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
|
||||
0:1;for(v=0;v<d.length;v++)l=d[v]&15,r=l==mxConstants.DIRECTION_MASK_EAST?3:l,r+=A,4<r&&(r-=4),m=mxEdgeStyle.dirVectors[r-1],l=0<r%2?0:1,l!=z&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),t=0<(d[v]&mxEdgeStyle.TARGET_MASK),u=0<(d[v]&mxEdgeStyle.SOURCE_MASK),p=(d[v]&mxEdgeStyle.SIDE_MASK)>>5,p<<=A,15<p&&(p>>=4),q=0<(d[v]&mxEdgeStyle.CENTER_MASK),(u||t)&&9>p?(r=u?0:1,p=q&&0==l?n[r][0]+b[r][0]*n[r][2]:q?n[r][1]+b[r][1]*
|
||||
n[r][3]:mxEdgeStyle.limits[r][p],0==l?(p=(p-mxEdgeStyle.wayPoints1[f][0])*m[0],0<p&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*p)):(p=(p-mxEdgeStyle.wayPoints1[f][1])*m[1],0<p&&(mxEdgeStyle.wayPoints1[f][1]+=m[1]*p))):q&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2),mxEdgeStyle.wayPoints1[f][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2)),0<f&&mxEdgeStyle.wayPoints1[f][l]==mxEdgeStyle.wayPoints1[f-1][l]?f--:z=l;for(v=0;v<=f&&(v!=f||((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
|
||||
|
@ -1815,8 +1815,8 @@ mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphView);a.e
|
|||
typeof g&&n.setAttribute(p,g);g=f.absolutePoints;if(null!=g&&0<g.length){l=Math.round(g[0].x)+","+Math.round(g[0].y);for(p=1;p<g.length;p++)l+=" "+Math.round(g[p].x)+","+Math.round(g[p].y);n.setAttribute("points",l)}else n.setAttribute("x",Math.round(f.x)),n.setAttribute("y",Math.round(f.y)),n.setAttribute("width",Math.round(f.width)),n.setAttribute("height",Math.round(f.height));p=f.absoluteOffset;null!=p&&(0!=p.x&&n.setAttribute("dx",Math.round(p.x)),0!=p.y&&n.setAttribute("dy",Math.round(p.y)))}for(p=
|
||||
0;p<k;p++)f=this.encodeCell(a,c,b.getChildAt(d,p)),null!=f&&n.appendChild(f)}}return n};return a}());
|
||||
var mxStylesheetCodec=mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxStylesheet);a.encode=function(a,c){var b=a.document.createElement(this.getName()),e;for(e in c.styles){var f=c.styles[e],g=a.document.createElement("add");if(null!=e){g.setAttribute("as",e);for(var k in f){var l=this.getStringValue(k,f[k]);if(null!=l){var m=a.document.createElement("add");m.setAttribute("value",l);m.setAttribute("as",k);g.appendChild(m)}}0<g.childNodes.length&&b.appendChild(g)}}return b};a.getStringValue=
|
||||
function(a,c){var b=typeof c;"function"==b?c=mxStyleRegistry.getName(style[j]):"object"==b&&(c=null);return c};a.decode=function(a,c,d){d=d||new this.template.constructor;var b=c.getAttribute("id");null!=b&&(a.objects[b]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName&&(b=c.getAttribute("as"),null!=b)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),
|
||||
g={});for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute("as");if("add"==f.nodeName){var l=mxUtils.getTextContent(f);null!=l&&0<l.length&&mxStylesheetCodec.allowEval?l=mxUtils.eval(l):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[k]=l)}else"remove"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(b,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!0;
|
||||
function(a,c){var b=typeof c;"function"==b?c=mxStyleRegistry.getName(c):"object"==b&&(c=null);return c};a.decode=function(a,c,d){d=d||new this.template.constructor;var b=c.getAttribute("id");null!=b&&(a.objects[b]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName&&(b=c.getAttribute("as"),null!=b)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g=
|
||||
{});for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute("as");if("add"==f.nodeName){var l=mxUtils.getTextContent(f);null!=l&&0<l.length&&mxStylesheetCodec.allowEval?l=mxUtils.eval(l):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[k]=l)}else"remove"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(b,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!0;
|
||||
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultKeyHandler);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d)for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName){var b=c.getAttribute("as"),f=c.getAttribute("action"),g=c.getAttribute("control");d.bindAction(b,f,g)}c=c.nextSibling}return d};return a}());
|
||||
var mxDefaultToolbarCodec=mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultToolbar);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d){var b=d.editor;for(c=c.firstChild;null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,c,d))if("separator"==c.nodeName)d.addSeparator();else if("br"==c.nodeName)d.toolbar.addBreak();else if("hr"==c.nodeName)d.toolbar.addLine();else if("add"==c.nodeName){var f=c.getAttribute("as"),f=mxResources.get(f)||
|
||||
f,g=c.getAttribute("icon"),k=c.getAttribute("pressedIcon"),l=c.getAttribute("action"),m=c.getAttribute("mode"),n=c.getAttribute("template"),p="0"!=c.getAttribute("toggle"),q=mxUtils.getTextContent(c),r=null;if(null!=l)r=d.addItem(f,g,l,k);else if(null!=m)var t=mxDefaultToolbarCodec.allowEval?mxUtils.eval(q):null,r=d.addMode(f,g,m,k,t);else if(null!=n||null!=q&&0<q.length)r=b.templates[n],n=c.getAttribute("style"),null!=r&&null!=n&&(r=b.graph.cloneCell(r),r.setStyle(n)),n=null,null!=q&&0<q.length&&
|
||||
|
|
|
@ -128,7 +128,7 @@ function insertDiagram(id, page, col, row)
|
|||
var blob = result[0];
|
||||
var w = result[1];
|
||||
var h = result[2];
|
||||
var s = result[3];
|
||||
var s = result[3] < 1? 1: result[3];
|
||||
var img = null;
|
||||
|
||||
if (blob != null)
|
||||
|
@ -366,7 +366,7 @@ function updateDiagram(id, page, scale, elt, pageId)
|
|||
var blob = result[0];
|
||||
var w = result[1];
|
||||
var h = result[2];
|
||||
var s = result[3];
|
||||
var s = result[3] < 1? 1: result[3];
|
||||
|
||||
if (blob != null)
|
||||
{
|
||||
|
@ -406,7 +406,7 @@ function fetchImage(id, page, scale, pageId)
|
|||
"format": "png",
|
||||
"scale": scale || "1",
|
||||
"xml": fileData,
|
||||
"extras": "{\"isPng\": " + isPng + ", \"isGoogleApp\": true}"
|
||||
"extras": "{\"isPng\": " + isPng + ", \"isGoogleApp\": true, \"isGoogleSheet\": true}"
|
||||
};
|
||||
|
||||
if (pageId != null)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
CACHE MANIFEST
|
||||
|
||||
# THIS FILE WAS GENERATED. DO NOT MODIFY!
|
||||
# 08/23/2019 04:55 PM
|
||||
# 08/29/2019 10:27 AM
|
||||
|
||||
app.html
|
||||
index.html?offline=1
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
<script>
|
||||
var mxIsElectron = navigator.userAgent.toLowerCase().indexOf(' electron/') > -1;
|
||||
var GOOGLE_APPS_MAX_AREA = 25000000;
|
||||
var GOOGLE_SHEET_MAX_AREA = 1048576; //1024x1024
|
||||
|
||||
Editor.initMath();
|
||||
|
||||
|
@ -111,27 +112,7 @@
|
|||
{
|
||||
graph.globalUrlVars = extras.globalVars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements %page% and %pagenumber% placeholders
|
||||
*/
|
||||
var graphGetGlobalVariable = graph.getGlobalVariable;
|
||||
|
||||
graph.getGlobalVariable = function(name)
|
||||
{
|
||||
if (name == 'page')
|
||||
{
|
||||
return (diagrams == null) ? 'Page-1' :
|
||||
(diagrams[from].getAttribute('name') || ('Page-' + (from + 1)));
|
||||
}
|
||||
else if (name == 'pagenumber')
|
||||
{
|
||||
return from + 1;
|
||||
}
|
||||
|
||||
return graphGetGlobalVariable.apply(this, arguments);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Disables custom links on shapes.
|
||||
*/
|
||||
|
@ -485,6 +466,11 @@
|
|||
s = 2;
|
||||
}
|
||||
|
||||
if (extras != null && extras.isGoogleSheet != null)
|
||||
{
|
||||
GOOGLE_APPS_MAX_AREA = GOOGLE_SHEET_MAX_AREA;
|
||||
}
|
||||
|
||||
//The image cannot exceed 25 MP to be included in Google Apps
|
||||
if (b.width * s * b.height * s > GOOGLE_APPS_MAX_AREA)
|
||||
{
|
||||
|
|
2875
src/main/webapp/js/app.min.js
vendored
2875
src/main/webapp/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1956,10 +1956,10 @@ App.prototype.getThumbnail = function(width, fn)
|
|||
|
||||
if (this.pages != null && (this.currentPage != this.pages[0] || darkTheme))
|
||||
{
|
||||
graph = this.createTemporaryGraph((darkTheme) ? graph.getDefaultStylesheet() : graph.getStylesheet());
|
||||
var graphGetGlobalVariable = graph.getGlobalVariable;
|
||||
graph = this.createTemporaryGraph((darkTheme) ? graph.getDefaultStylesheet() : graph.getStylesheet());
|
||||
var page = this.pages[0];
|
||||
|
||||
|
||||
// Avoids override of stylesheet in getSvg for dark mode
|
||||
if (darkTheme)
|
||||
{
|
||||
|
@ -1979,7 +1979,8 @@ App.prototype.getThumbnail = function(width, fn)
|
|||
|
||||
return graphGetGlobalVariable.apply(this, arguments);
|
||||
};
|
||||
|
||||
|
||||
graph.getGlobalVariable = graphGetGlobalVariable;
|
||||
document.body.appendChild(graph.container);
|
||||
graph.model.setRoot(page.root);
|
||||
}
|
||||
|
|
|
@ -5363,6 +5363,10 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
|
|||
{
|
||||
return realPage + 1;
|
||||
}
|
||||
else if (name == 'pagecount')
|
||||
{
|
||||
return (diagrams != null) ? diagrams.length : 1;
|
||||
}
|
||||
|
||||
return graphGetGlobalVariable.apply(this, arguments);
|
||||
};
|
||||
|
@ -5769,9 +5773,9 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
|
|||
try
|
||||
{
|
||||
var temp = parseInt(pageSelect.value);
|
||||
parseDiagram(diagrams[temp]);
|
||||
currentPage = temp;
|
||||
realPage = currentPage;
|
||||
parseDiagram(diagrams[temp]);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
|
@ -6038,6 +6042,10 @@ var DraftDialog = function(editorUi, title, xml, editFn, discardFn, editLabel, d
|
|||
{
|
||||
return currentPage + 1;
|
||||
}
|
||||
else if (name == 'pagecount')
|
||||
{
|
||||
return (diagrams != null) ? diagrams.length : 1;
|
||||
}
|
||||
|
||||
return graphGetGlobalVariable.apply(this, arguments);
|
||||
};
|
||||
|
|
|
@ -3352,12 +3352,12 @@
|
|||
else if (colorset['fill'] == '')
|
||||
{
|
||||
btn.style.backgroundColor = mxUtils.getValue(graph.defaultVertexStyle,
|
||||
mxConstants.STYLE_FILLCOLOR, (uiTheme == 'dark') ?'#000000' : '#ffffff');
|
||||
mxConstants.STYLE_FILLCOLOR, (uiTheme == 'dark') ?'#2a2a2a' : '#ffffff');
|
||||
}
|
||||
else
|
||||
{
|
||||
btn.style.backgroundColor = colorset['fill'] || mxUtils.getValue(graph.defaultVertexStyle,
|
||||
mxConstants.STYLE_FILLCOLOR, (uiTheme == 'dark') ?'#000000' : '#ffffff');
|
||||
mxConstants.STYLE_FILLCOLOR, (uiTheme == 'dark') ?'#2a2a2a' : '#ffffff');
|
||||
}
|
||||
|
||||
if (colorset['stroke'] == mxConstants.NONE)
|
||||
|
@ -3367,12 +3367,12 @@
|
|||
else if (colorset['stroke'] == '')
|
||||
{
|
||||
btn.style.border = '1px solid ' + mxUtils.getValue(graph.defaultVertexStyle,
|
||||
mxConstants.STYLE_STROKECOLOR, (uiTheme != 'dark') ?'#000000' : '#ffffff');
|
||||
mxConstants.STYLE_STROKECOLOR, (uiTheme != 'dark') ?'#2a2a2a' : '#ffffff');
|
||||
}
|
||||
else
|
||||
{
|
||||
btn.style.border = '1px solid ' + (colorset['stroke'] || mxUtils.getValue(graph.defaultVertexStyle,
|
||||
mxConstants.STYLE_STROKECOLOR, (uiTheme != 'dark') ?'#000000' : '#ffffff'));
|
||||
mxConstants.STYLE_STROKECOLOR, (uiTheme != 'dark') ?'#2a2a2a' : '#ffffff'));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -3585,6 +3585,7 @@
|
|||
* Adds rack child layout style.
|
||||
*/
|
||||
var graphInit = Graph.prototype.init;
|
||||
|
||||
Graph.prototype.init = function()
|
||||
{
|
||||
graphInit.apply(this, arguments);
|
||||
|
@ -3782,7 +3783,7 @@
|
|||
|
||||
return this.defaultStylesheet;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Temporarily overrides stylesheet during image export in dark mode.
|
||||
*/
|
||||
|
@ -3865,6 +3866,7 @@
|
|||
* Sets default style (used in editor.get/setGraphXml below)
|
||||
*/
|
||||
var graphLoadStylesheet = Graph.prototype.loadStylesheet;
|
||||
|
||||
Graph.prototype.loadStylesheet = function()
|
||||
{
|
||||
graphLoadStylesheet.apply(this, arguments);
|
||||
|
@ -3900,6 +3902,8 @@
|
|||
// Some actions are stateless and must be handled before the transaction
|
||||
var link = JSON.parse(href.substring(17));
|
||||
|
||||
// When adding new actions that reference cell IDs support for updating
|
||||
// those cell IDs must be handled in Graph.updateCustomLinkActions
|
||||
if (link.actions != null)
|
||||
{
|
||||
// Executes open actions before starting transaction
|
||||
|
@ -3984,7 +3988,126 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates cell IDs in custom links on the given cell and its label.
|
||||
*/
|
||||
Graph.prototype.updateCustomLinksForCell = function(mapping, cell)
|
||||
{
|
||||
var href = this.getLinkForCell(cell);
|
||||
|
||||
if (href != null && href.substring(0, 17) == 'data:action/json,')
|
||||
{
|
||||
this.setLinkForCell(cell, this.updateCustomLink(mapping, href));
|
||||
}
|
||||
|
||||
if (this.isHtmlLabel(cell))
|
||||
{
|
||||
var temp = document.createElement('div');
|
||||
temp.innerHTML = this.getLabel(cell);
|
||||
var links = temp.getElementsByTagName('a');
|
||||
var changed = false;
|
||||
|
||||
for (var i = 0; i < links.length; i++)
|
||||
{
|
||||
href = links[i].getAttribute('href');
|
||||
|
||||
if (href != null && href.substring(0, 17) == 'data:action/json,')
|
||||
{
|
||||
links[i].setAttribute('href', this.updateCustomLink(mapping, href));
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (changed)
|
||||
{
|
||||
this.labelChanged(cell, temp.innerHTML);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates cell IDs in the given custom link and returns the updated link.
|
||||
*/
|
||||
Graph.prototype.updateCustomLink = function(mapping, href)
|
||||
{
|
||||
if (href.substring(0, 17) == 'data:action/json,')
|
||||
{
|
||||
try
|
||||
{
|
||||
// Some actions are stateless and must be handled before the transaction
|
||||
var link = JSON.parse(href.substring(17));
|
||||
|
||||
if (link.actions != null)
|
||||
{
|
||||
this.updateCustomLinkActions(mapping, link.actions);
|
||||
href = 'data:action/json,' + JSON.stringify(link);
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
|
||||
return href;
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates cell IDs in the given custom link actions.
|
||||
*/
|
||||
Graph.prototype.updateCustomLinkActions = function(mapping, actions)
|
||||
{
|
||||
for (var i = 0; i < actions.length; i++)
|
||||
{
|
||||
var action = actions[i];
|
||||
|
||||
this.updateCustomLinkAction(mapping, action.toggle);
|
||||
this.updateCustomLinkAction(mapping, action.show);
|
||||
this.updateCustomLinkAction(mapping, action.hide);
|
||||
this.updateCustomLinkAction(mapping, action.select);
|
||||
this.updateCustomLinkAction(mapping, action.highlight);
|
||||
this.updateCustomLinkAction(mapping, action.scroll);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates cell IDs in the given custom link action.
|
||||
*/
|
||||
Graph.prototype.updateCustomLinkAction = function(mapping, action)
|
||||
{
|
||||
if (action != null && action.cells != null)
|
||||
{
|
||||
var result = [];
|
||||
|
||||
for (var i = 0; i < action.cells.length; i++)
|
||||
{
|
||||
if (action.cells[i] == '*')
|
||||
{
|
||||
result.push(action.cells[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
var temp = mapping[action.cells[i]];
|
||||
|
||||
if (temp != null)
|
||||
{
|
||||
if (temp != '')
|
||||
{
|
||||
result.push(temp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.push(action.cells[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
action.cells = result;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles each action in the action array of a custom link. This code
|
||||
* handles toggle actions for cell IDs.
|
||||
|
@ -4904,6 +5027,10 @@
|
|||
{
|
||||
return i + 1;
|
||||
}
|
||||
else if (name == 'pagecount')
|
||||
{
|
||||
return (editorUi.pages != null) ? editorUi.pages.length : 1;
|
||||
}
|
||||
|
||||
return graphGetGlobalVariable.apply(this, arguments);
|
||||
};
|
||||
|
|
|
@ -1323,8 +1323,8 @@
|
|||
if (this.pages != null && this.currentPage != this.pages[0] && (forceSvg ||
|
||||
(!forceXml && file != null && /(\.svg)$/i.test(file.getTitle()))))
|
||||
{
|
||||
graph = this.createTemporaryGraph(graph.getStylesheet());
|
||||
var graphGetGlobalVariable = graph.getGlobalVariable;
|
||||
graph = this.createTemporaryGraph(graph.getStylesheet());
|
||||
var page = this.pages[0];
|
||||
|
||||
graph.getGlobalVariable = function(name)
|
||||
|
@ -2840,40 +2840,7 @@
|
|||
// KNOWN: Existing entries are not replaced after edit of custom library
|
||||
if (this.sidebar != null && images != null)
|
||||
{
|
||||
for (var i = 0; i < images.length; i++)
|
||||
{
|
||||
(mxUtils.bind(this, function(img)
|
||||
{
|
||||
var data = img.data;
|
||||
|
||||
if (data != null && img.title != null)
|
||||
{
|
||||
this.sidebar.addEntry(img.title, mxUtils.bind(this, function()
|
||||
{
|
||||
data = this.convertDataUri(data);
|
||||
var s = 'shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;';
|
||||
|
||||
if (img.aspect == 'fixed')
|
||||
{
|
||||
s += 'aspect=fixed;'
|
||||
}
|
||||
|
||||
return this.sidebar.createVertexTemplate(s + 'image=' +
|
||||
data, img.w, img.h, '', img.title || '', false, false, true)
|
||||
}));
|
||||
}
|
||||
else if (img.xml != null && img.title != null)
|
||||
{
|
||||
this.sidebar.addEntry(img.title, mxUtils.bind(this, function()
|
||||
{
|
||||
var cells = this.stringToCells(Graph.decompress(img.xml));
|
||||
|
||||
return this.sidebar.createVertexTemplateFromCells(
|
||||
cells, img.w, img.h, img.title || '', true, false, true);
|
||||
}));
|
||||
}
|
||||
}))(images[i]);
|
||||
}
|
||||
this.sidebar.addEntries(images);
|
||||
}
|
||||
|
||||
// Adds new sidebar entry for this library
|
||||
|
@ -6826,7 +6793,7 @@
|
|||
var graph = this.editor.graph;
|
||||
var href = graph.getLinkForCell(cell);
|
||||
|
||||
if (href != null && href.substring(0, 13) == 'data:page/id,')
|
||||
if (href != null)
|
||||
{
|
||||
graph.setLinkForCell(cell, this.updatePageLink(mapping, href));
|
||||
}
|
||||
|
@ -6841,7 +6808,7 @@
|
|||
{
|
||||
href = links[i].getAttribute('href');
|
||||
|
||||
if (href != null && href.substring(0, 13) == 'data:page/id,')
|
||||
if (href != null)
|
||||
{
|
||||
links[i].setAttribute('href', this.updatePageLink(mapping, href));
|
||||
changed = true;
|
||||
|
@ -6865,9 +6832,48 @@
|
|||
*/
|
||||
EditorUi.prototype.updatePageLink = function(mapping, href)
|
||||
{
|
||||
var newId = mapping[href.substring(href.indexOf(',') + 1)];
|
||||
if (href.substring(0, 13) == 'data:page/id,')
|
||||
{
|
||||
var newId = mapping[href.substring(href.indexOf(',') + 1)];
|
||||
href = (newId != null) ? 'data:page/id,' + newId : null;
|
||||
}
|
||||
else if (href.substring(0, 17) == 'data:action/json,')
|
||||
{
|
||||
try
|
||||
{
|
||||
var link = JSON.parse(href.substring(17));
|
||||
|
||||
if (link.actions != null)
|
||||
{
|
||||
for (var i = 0; i < link.actions.length; i++)
|
||||
{
|
||||
var action = link.actions[i];
|
||||
|
||||
if (action.open != null && action.open.substring(0, 13) == 'data:page/id,')
|
||||
{
|
||||
var newId = mapping[action.open.substring(action.open.indexOf(',') + 1)];
|
||||
|
||||
if (newId != null)
|
||||
{
|
||||
action.open = 'data:page/id,' + newId;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete action.open;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
href = 'data:action/json,' + JSON.stringify(link);
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
|
||||
return (newId != null) ? 'data:page/id,' + newId : null;
|
||||
return href;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -7531,83 +7537,105 @@
|
|||
{
|
||||
var ui = this;
|
||||
|
||||
JSZip.loadAsync(file)
|
||||
.then(function(zip)
|
||||
{
|
||||
if (Object.keys(zip.files).length == 0)
|
||||
{
|
||||
onerror();
|
||||
}
|
||||
else
|
||||
{
|
||||
var gliffyLatestVer = {version: 0};
|
||||
var drawioFound = false;
|
||||
|
||||
zip.forEach(function (relativePath, zipEntry)
|
||||
{
|
||||
var name = zipEntry.name.toLowerCase();
|
||||
|
||||
if (name == 'diagram/diagram.xml') //draw.io zip format has the latest diagram version at diagram/diagram.xml
|
||||
{
|
||||
drawioFound = true;
|
||||
|
||||
zipEntry.async("string").then(function(str){
|
||||
if (str.indexOf('<mxfile ') == 0)
|
||||
{
|
||||
success(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
onerror();
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (name.indexOf('versions/') == 0) //Gliffy zip format has the versions inside versions folder
|
||||
{
|
||||
var version = parseInt(name.substr(9)); //9 is the length of versions/
|
||||
|
||||
if (version > gliffyLatestVer.version)
|
||||
{
|
||||
gliffyLatestVer = {version: version, zipEntry: zipEntry}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (gliffyLatestVer.version > 0)
|
||||
{
|
||||
gliffyLatestVer.zipEntry.async("string").then(function(data)
|
||||
{
|
||||
if (!ui.isOffline() && new XMLHttpRequest().upload && ui.isRemoteFileFormat(data, file.name))
|
||||
{
|
||||
ui.parseFile(new Blob([data], {type: 'application/octet-stream'}), mxUtils.bind(this, function(xhr)
|
||||
{
|
||||
if (xhr.readyState == 4)
|
||||
{
|
||||
if (xhr.status >= 200 && xhr.status <= 299)
|
||||
{
|
||||
success(xhr.responseText);
|
||||
}
|
||||
else
|
||||
{
|
||||
onerror();
|
||||
}
|
||||
}
|
||||
}), file.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
onerror();
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (!drawioFound)
|
||||
{
|
||||
onerror();
|
||||
}
|
||||
}
|
||||
}, function (e) {
|
||||
onerror(e);
|
||||
});
|
||||
var delayed = mxUtils.bind(this, function()
|
||||
{
|
||||
this.loadingExtensions = false;
|
||||
|
||||
if (typeof JSZip !== 'undefined')
|
||||
{
|
||||
JSZip.loadAsync(file)
|
||||
.then(function(zip)
|
||||
{
|
||||
if (Object.keys(zip.files).length == 0)
|
||||
{
|
||||
onerror();
|
||||
}
|
||||
else
|
||||
{
|
||||
var gliffyLatestVer = {version: 0};
|
||||
var drawioFound = false;
|
||||
|
||||
zip.forEach(function (relativePath, zipEntry)
|
||||
{
|
||||
var name = zipEntry.name.toLowerCase();
|
||||
|
||||
if (name == 'diagram/diagram.xml') //draw.io zip format has the latest diagram version at diagram/diagram.xml
|
||||
{
|
||||
drawioFound = true;
|
||||
|
||||
zipEntry.async("string").then(function(str){
|
||||
if (str.indexOf('<mxfile ') == 0)
|
||||
{
|
||||
success(str);
|
||||
}
|
||||
else
|
||||
{
|
||||
onerror();
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (name.indexOf('versions/') == 0) //Gliffy zip format has the versions inside versions folder
|
||||
{
|
||||
var version = parseInt(name.substr(9)); //9 is the length of versions/
|
||||
|
||||
if (version > gliffyLatestVer.version)
|
||||
{
|
||||
gliffyLatestVer = {version: version, zipEntry: zipEntry}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (gliffyLatestVer.version > 0)
|
||||
{
|
||||
gliffyLatestVer.zipEntry.async("string").then(function(data)
|
||||
{
|
||||
if (!ui.isOffline() && new XMLHttpRequest().upload && ui.isRemoteFileFormat(data, file.name))
|
||||
{
|
||||
ui.parseFile(new Blob([data], {type: 'application/octet-stream'}), mxUtils.bind(this, function(xhr)
|
||||
{
|
||||
if (xhr.readyState == 4)
|
||||
{
|
||||
if (xhr.status >= 200 && xhr.status <= 299)
|
||||
{
|
||||
success(xhr.responseText);
|
||||
}
|
||||
else
|
||||
{
|
||||
onerror();
|
||||
}
|
||||
}
|
||||
}), file.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
onerror();
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (!drawioFound)
|
||||
{
|
||||
onerror();
|
||||
}
|
||||
}
|
||||
}, function (e) {
|
||||
onerror(e);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
onerror();
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof JSZip === 'undefined' && !this.loadingExtensions && !this.isOffline(true))
|
||||
{
|
||||
this.loadingExtensions = true;
|
||||
mxscript('js/extensions.min.js', delayed);
|
||||
}
|
||||
else
|
||||
{
|
||||
delayed();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -8529,7 +8557,7 @@
|
|||
|
||||
return done;
|
||||
};
|
||||
|
||||
|
||||
// Extends clear default style to clear persisted settings
|
||||
var clearDefaultStyle = this.clearDefaultStyle;
|
||||
|
||||
|
@ -8632,8 +8660,23 @@
|
|||
|
||||
// Specifies the default filename
|
||||
this.defaultFilename = mxResources.get('untitledDiagram');
|
||||
|
||||
// Adds export for %page%, %pagenumber% and %pagecount% placeholders
|
||||
var graphGetExportVariables = graph.getExportVariables;
|
||||
|
||||
// Adds placeholder for %page% and %pagenumber%
|
||||
graph.getExportVariables = function()
|
||||
{
|
||||
var vars = graphGetExportVariables.apply(this, arguments);
|
||||
|
||||
vars['pagecount'] = (ui.pages != null) ? ui.pages.length : 1;
|
||||
vars['page'] = (ui.currentPage != null) ? ui.currentPage.getName() : '';
|
||||
vars['pagenumber'] = (ui.pages != null && ui.currentPage != null) ?
|
||||
mxUtils.indexOf(ui.pages, ui.currentPage) + 1 : 1;
|
||||
|
||||
return vars;
|
||||
};
|
||||
|
||||
// Adds %page%, %pagenumber% and %pagecount% placeholders
|
||||
var graphGetGlobalVariable = graph.getGlobalVariable;
|
||||
|
||||
graph.getGlobalVariable = function(name)
|
||||
|
@ -8653,6 +8696,10 @@
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
else if (name == 'pagecount')
|
||||
{
|
||||
return (ui.pages != null) ? ui.pages.length : 1;
|
||||
}
|
||||
|
||||
return graphGetGlobalVariable.apply(this, arguments);
|
||||
};
|
||||
|
@ -10734,8 +10781,8 @@
|
|||
// LATER: Add caching for the graph or SVG while not on first page
|
||||
if (this.pages != null && this.currentPage != this.pages[0])
|
||||
{
|
||||
graph = this.createTemporaryGraph(graph.getStylesheet());
|
||||
var graphGetGlobalVariable = graph.getGlobalVariable;
|
||||
graph = this.createTemporaryGraph(graph.getStylesheet());
|
||||
var page = this.pages[0];
|
||||
|
||||
graph.getGlobalVariable = function(name)
|
||||
|
|
|
@ -220,6 +220,10 @@
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
else if (name == 'pagecount')
|
||||
{
|
||||
return diagrams.length;
|
||||
}
|
||||
|
||||
return graphGetGlobalVariable.apply(this, arguments);
|
||||
};
|
||||
|
|
|
@ -143,7 +143,7 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
|
|||
|
||||
if (this.graphConfig['toolbar-nohide'] == true)
|
||||
{
|
||||
this.editor.defaultGraphOverflow = 'visible';
|
||||
this.editor.defaultGraphOverflow = 'visible';
|
||||
}
|
||||
|
||||
//Extract graph model from html & svg formats
|
||||
|
@ -160,7 +160,7 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
|
|||
if (mxClient.IS_SVG)
|
||||
{
|
||||
// LATER: Add shadow for labels in graph.container (eg. math, NO_FO), scaling
|
||||
this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement, null, true);
|
||||
this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement, null, true);
|
||||
}
|
||||
|
||||
// Adds page placeholders
|
||||
|
@ -198,6 +198,10 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
|
|||
{
|
||||
return self.currentPage + 1;
|
||||
}
|
||||
else if (name == 'pagecount')
|
||||
{
|
||||
return diagrams.length;
|
||||
}
|
||||
|
||||
return graphGetGlobalVariable.apply(this, arguments);
|
||||
};
|
||||
|
|
|
@ -319,137 +319,140 @@ EditorUi.prototype.getPageById = function(id)
|
|||
*/
|
||||
EditorUi.prototype.initPages = function()
|
||||
{
|
||||
this.actions.addAction('previousPage', mxUtils.bind(this, function()
|
||||
if (!this.editor.graph.standalone)
|
||||
{
|
||||
this.selectNextPage(false);
|
||||
}));
|
||||
|
||||
this.actions.addAction('nextPage', mxUtils.bind(this, function()
|
||||
{
|
||||
this.selectNextPage(true);
|
||||
}));
|
||||
|
||||
this.keyHandler.bindAction(33, true, 'previousPage', true); // Ctrl+Shift+PageUp
|
||||
this.keyHandler.bindAction(34, true, 'nextPage', true); // Ctrl+Shift+PageDown
|
||||
|
||||
// Updates the tabs after loading the diagram
|
||||
var graph = this.editor.graph;
|
||||
var graphViewValidateBackground = graph.view.validateBackground;
|
||||
|
||||
graph.view.validateBackground = mxUtils.bind(this, function()
|
||||
{
|
||||
if (this.tabContainer != null)
|
||||
this.actions.addAction('previousPage', mxUtils.bind(this, function()
|
||||
{
|
||||
var prevHeight = this.tabContainer.style.height;
|
||||
|
||||
if (this.fileNode == null || this.pages == null ||
|
||||
(this.pages.length == 1 && urlParams['pages'] == '0'))
|
||||
{
|
||||
this.tabContainer.style.height = '0px';
|
||||
}
|
||||
else
|
||||
{
|
||||
this.tabContainer.style.height = this.tabContainerHeight + 'px';
|
||||
}
|
||||
|
||||
if (prevHeight != this.tabContainer.style.height)
|
||||
{
|
||||
this.refresh(false);
|
||||
}
|
||||
}
|
||||
this.selectNextPage(false);
|
||||
}));
|
||||
|
||||
graphViewValidateBackground.apply(graph.view, arguments);
|
||||
});
|
||||
|
||||
var lastPage = null;
|
||||
|
||||
var updateTabs = mxUtils.bind(this, function()
|
||||
{
|
||||
this.updateTabContainer();
|
||||
|
||||
// Updates scrollbar positions and backgrounds after validation
|
||||
var p = this.currentPage;
|
||||
|
||||
if (p != null && p != lastPage)
|
||||
this.actions.addAction('nextPage', mxUtils.bind(this, function()
|
||||
{
|
||||
if (p.viewState == null || p.viewState.scrollLeft == null)
|
||||
this.selectNextPage(true);
|
||||
}));
|
||||
|
||||
this.keyHandler.bindAction(33, true, 'previousPage', true); // Ctrl+Shift+PageUp
|
||||
this.keyHandler.bindAction(34, true, 'nextPage', true); // Ctrl+Shift+PageDown
|
||||
|
||||
// Updates the tabs after loading the diagram
|
||||
var graph = this.editor.graph;
|
||||
var graphViewValidateBackground = graph.view.validateBackground;
|
||||
|
||||
graph.view.validateBackground = mxUtils.bind(this, function()
|
||||
{
|
||||
if (this.tabContainer != null)
|
||||
{
|
||||
this.resetScrollbars();
|
||||
|
||||
if (graph.isLightboxView())
|
||||
var prevHeight = this.tabContainer.style.height;
|
||||
|
||||
if (this.fileNode == null || this.pages == null ||
|
||||
(this.pages.length == 1 && urlParams['pages'] == '0'))
|
||||
{
|
||||
this.lightboxFit();
|
||||
this.tabContainer.style.height = '0px';
|
||||
}
|
||||
else
|
||||
{
|
||||
this.tabContainer.style.height = this.tabContainerHeight + 'px';
|
||||
}
|
||||
|
||||
if (this.chromelessResize != null)
|
||||
if (prevHeight != this.tabContainer.style.height)
|
||||
{
|
||||
graph.container.scrollLeft = 0;
|
||||
graph.container.scrollTop = 0;
|
||||
this.chromelessResize();
|
||||
this.refresh(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
graphViewValidateBackground.apply(graph.view, arguments);
|
||||
});
|
||||
|
||||
var lastPage = null;
|
||||
|
||||
var updateTabs = mxUtils.bind(this, function()
|
||||
{
|
||||
this.updateTabContainer();
|
||||
|
||||
// Updates scrollbar positions and backgrounds after validation
|
||||
var p = this.currentPage;
|
||||
|
||||
if (p != null && p != lastPage)
|
||||
{
|
||||
graph.container.scrollLeft = graph.view.translate.x * graph.view.scale + p.viewState.scrollLeft;
|
||||
graph.container.scrollTop = graph.view.translate.y * graph.view.scale + p.viewState.scrollTop;
|
||||
if (p.viewState == null || p.viewState.scrollLeft == null)
|
||||
{
|
||||
this.resetScrollbars();
|
||||
|
||||
if (graph.isLightboxView())
|
||||
{
|
||||
this.lightboxFit();
|
||||
}
|
||||
|
||||
if (this.chromelessResize != null)
|
||||
{
|
||||
graph.container.scrollLeft = 0;
|
||||
graph.container.scrollTop = 0;
|
||||
this.chromelessResize();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.container.scrollLeft = graph.view.translate.x * graph.view.scale + p.viewState.scrollLeft;
|
||||
graph.container.scrollTop = graph.view.translate.y * graph.view.scale + p.viewState.scrollTop;
|
||||
}
|
||||
|
||||
lastPage = p;
|
||||
}
|
||||
|
||||
lastPage = p;
|
||||
}
|
||||
|
||||
// Updates layers window
|
||||
if (this.actions.layersWindow != null)
|
||||
{
|
||||
this.actions.layersWindow.refreshLayers();
|
||||
}
|
||||
|
||||
// Workaround for math if tab is switched before typesetting has stopped
|
||||
if (typeof(MathJax) !== 'undefined' && typeof(MathJax.Hub) !== 'undefined')
|
||||
{
|
||||
// Pending math should not be rendered if the graph has no math enabled
|
||||
if (MathJax.Hub.queue.pending == 1 && this.editor != null && !this.editor.graph.mathEnabled)
|
||||
// Updates layers window
|
||||
if (this.actions.layersWindow != null)
|
||||
{
|
||||
// Since there is no way to stop/undo mathjax or
|
||||
// clear the queue we have to refresh after typeset
|
||||
MathJax.Hub.Queue(mxUtils.bind(this, function()
|
||||
this.actions.layersWindow.refreshLayers();
|
||||
}
|
||||
|
||||
// Workaround for math if tab is switched before typesetting has stopped
|
||||
if (typeof(MathJax) !== 'undefined' && typeof(MathJax.Hub) !== 'undefined')
|
||||
{
|
||||
// Pending math should not be rendered if the graph has no math enabled
|
||||
if (MathJax.Hub.queue.pending == 1 && this.editor != null && !this.editor.graph.mathEnabled)
|
||||
{
|
||||
if (this.editor != null)
|
||||
// Since there is no way to stop/undo mathjax or
|
||||
// clear the queue we have to refresh after typeset
|
||||
MathJax.Hub.Queue(mxUtils.bind(this, function()
|
||||
{
|
||||
this.editor.graph.refresh();
|
||||
}
|
||||
}));
|
||||
if (this.editor != null)
|
||||
{
|
||||
this.editor.graph.refresh();
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (typeof(Editor.MathJaxClear) !== 'undefined' && (this.editor == null || !this.editor.graph.mathEnabled))
|
||||
{
|
||||
// Clears our own queue for async loading
|
||||
Editor.MathJaxClear();
|
||||
}
|
||||
});
|
||||
|
||||
// Adds a graph model listener to update the view
|
||||
this.editor.graph.model.addListener(mxEvent.CHANGE, mxUtils.bind(this, function(sender, evt)
|
||||
{
|
||||
var edit = evt.getProperty('edit');
|
||||
var changes = edit.changes;
|
||||
|
||||
for (var i = 0; i < changes.length; i++)
|
||||
{
|
||||
if (changes[i] instanceof SelectPage ||
|
||||
changes[i] instanceof RenamePage ||
|
||||
changes[i] instanceof MovePage ||
|
||||
changes[i] instanceof mxRootChange)
|
||||
else if (typeof(Editor.MathJaxClear) !== 'undefined' && (this.editor == null || !this.editor.graph.mathEnabled))
|
||||
{
|
||||
updateTabs();
|
||||
break;
|
||||
// Clears our own queue for async loading
|
||||
Editor.MathJaxClear();
|
||||
}
|
||||
});
|
||||
|
||||
// Adds a graph model listener to update the view
|
||||
this.editor.graph.model.addListener(mxEvent.CHANGE, mxUtils.bind(this, function(sender, evt)
|
||||
{
|
||||
var edit = evt.getProperty('edit');
|
||||
var changes = edit.changes;
|
||||
|
||||
for (var i = 0; i < changes.length; i++)
|
||||
{
|
||||
if (changes[i] instanceof SelectPage ||
|
||||
changes[i] instanceof RenamePage ||
|
||||
changes[i] instanceof MovePage ||
|
||||
changes[i] instanceof mxRootChange)
|
||||
{
|
||||
updateTabs();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
// Updates zoom in toolbar
|
||||
if (this.toolbar != null)
|
||||
{
|
||||
this.editor.addListener('pageSelected', this.toolbar.updateZoom);
|
||||
}
|
||||
}));
|
||||
|
||||
// Updates zoom in toolbar
|
||||
if (this.toolbar != null)
|
||||
{
|
||||
this.editor.addListener('pageSelected', this.toolbar.updateZoom);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -733,30 +736,33 @@ EditorUi.prototype.selectPage = function(page, quiet, viewState)
|
|||
{
|
||||
try
|
||||
{
|
||||
if (this.editor.graph.isEditing())
|
||||
if (page != this.currentPage)
|
||||
{
|
||||
this.editor.graph.stopEditing(false);
|
||||
}
|
||||
if (this.editor.graph.isEditing())
|
||||
{
|
||||
this.editor.graph.stopEditing(false);
|
||||
}
|
||||
|
||||
quiet = (quiet != null) ? quiet : false;
|
||||
this.editor.graph.isMouseDown = false;
|
||||
this.editor.graph.reset();
|
||||
|
||||
var edit = this.editor.graph.model.createUndoableEdit();
|
||||
|
||||
// Special flag to bypass autosave for this edit
|
||||
edit.ignoreEdit = true;
|
||||
|
||||
quiet = (quiet != null) ? quiet : false;
|
||||
this.editor.graph.isMouseDown = false;
|
||||
this.editor.graph.reset();
|
||||
|
||||
var edit = this.editor.graph.model.createUndoableEdit();
|
||||
|
||||
// Special flag to bypass autosave for this edit
|
||||
edit.ignoreEdit = true;
|
||||
|
||||
var change = new SelectPage(this, page, viewState);
|
||||
change.execute();
|
||||
edit.add(change);
|
||||
edit.notify();
|
||||
|
||||
this.editor.graph.tooltipHandler.hide();
|
||||
|
||||
if (!quiet)
|
||||
{
|
||||
this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO, 'edit', edit));
|
||||
var change = new SelectPage(this, page, viewState);
|
||||
change.execute();
|
||||
edit.add(change);
|
||||
edit.notify();
|
||||
|
||||
this.editor.graph.tooltipHandler.hide();
|
||||
|
||||
if (!quiet)
|
||||
{
|
||||
this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO, 'edit', edit));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
|
|
|
@ -85,6 +85,8 @@
|
|||
[
|
||||
this.createVertexTemplateEntry(n3 + 'resourceIcon;resIcon=' + gn + '.marketplace;',
|
||||
s * 78, s * 78, '', 'Marketplace', null, null, this.getTagsForStencil(gn, 'marketplace', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n3 + 'resourceIcon;resIcon=' + gn + '.general;',
|
||||
s * 78, s * 78, '', 'General', null, null, this.getTagsForStencil(gn, 'general', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'client;',
|
||||
s * 78, s * 76, '', 'Client', null, null, this.getTagsForStencil(gn, 'client', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'corporate_data_center;',
|
||||
|
@ -234,6 +236,8 @@
|
|||
s * 68, s * 78, '', 'Search Documents', null, null, this.getTagsForStencil(gn, 'search documents', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'cluster;',
|
||||
s * 78, s * 78, '', 'HDFS Cluster', null, null, this.getTagsForStencil(gn, 'hdfs cluster', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'data_lake_resource_icon;',
|
||||
s * 78, s * 78, '', 'Data Lake', null, null, this.getTagsForStencil(gn, 'data lake', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'emr_engine;',
|
||||
s * 78, s * 59, '', 'EMR Engine', null, null, this.getTagsForStencil(gn, 'emr engine', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'emr_engine_mapr_m3;',
|
||||
|
@ -273,6 +277,8 @@
|
|||
w2, w2, '', 'Application Integration', null, null, this.getTagsForStencil(gn, 'application integration', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.appsync;',
|
||||
w2, w2, '', 'AppSync', null, null, this.getTagsForStencil(gn, 'appsync', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.eventbridge;',
|
||||
w2, w2, '', 'EventBridge', null, null, this.getTagsForStencil(gn, 'eventbridge event bridge', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.step_functions;',
|
||||
w2, w2, '', 'Step Functions', null, null, this.getTagsForStencil(gn, 'step functions', dt).join(' ')),
|
||||
|
||||
|
@ -465,6 +471,20 @@
|
|||
w2, w2, '', 'Outposts', null, null, this.getTagsForStencil(gn, 'outposts', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.serverless_application_repository;',
|
||||
w2, w2, '', 'Serverless Application Repository', null, null, this.getTagsForStencil(gn, 'serverless application repository', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_deadline;',
|
||||
w2, w2, '', 'Thinkbox Deadline', null, null, this.getTagsForStencil(gn, 'thinkbox deadline', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_draft;',
|
||||
w2, w2, '', 'Thinkbox Draft', null, null, this.getTagsForStencil(gn, 'thinkbox draft', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_frost;',
|
||||
w2, w2, '', 'Thinkbox Frost', null, null, this.getTagsForStencil(gn, 'thinkbox frost', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_krakatoa;',
|
||||
w2, w2, '', 'Thinkbox Krakatoa', null, null, this.getTagsForStencil(gn, 'thinkbox krakatoa', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_sequoia;',
|
||||
w2, w2, '', 'Thinkbox Sequoia', null, null, this.getTagsForStencil(gn, 'thinkbox sequoia', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_stoke;',
|
||||
w2, w2, '', 'Thinkbox Stoke', null, null, this.getTagsForStencil(gn, 'thinkbox stoke', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_xmesh;',
|
||||
w2, w2, '', 'Thinkbox XMesh', null, null, this.getTagsForStencil(gn, 'thinkbox xmesh', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.compute;',
|
||||
w2, w2, '', 'Compute', null, null, this.getTagsForStencil(gn, 'compute', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.elastic_load_balancing;',
|
||||
|
@ -562,6 +582,38 @@
|
|||
s * 78, s * 78, '', 'Attribute', null, null, this.getTagsForStencil(gn, 'dynamodb dynamo db database attribute', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'attributes;',
|
||||
s * 78, s * 78, '', 'Attributes', null, null, this.getTagsForStencil(gn, 'dynamodb dynamo db database attributes', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'aurora_instance;',
|
||||
s * 78, s * 78, '', 'Aurora Instance', null, null, this.getTagsForStencil(gn, 'aurora instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'aurora_instance_alt;',
|
||||
s * 78, s * 78, '', 'Aurora Instance', null, null, this.getTagsForStencil(gn, 'aurora instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_instance;',
|
||||
s * 78, s * 78, '', 'RDS Instance', null, null, this.getTagsForStencil(gn, 'rds instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_instance_alt;',
|
||||
s * 78, s * 78, '', 'RDS Instance', null, null, this.getTagsForStencil(gn, 'rds instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_mariadb_instance;',
|
||||
s * 78, s * 78, '', 'RDS MariaDB Instance', null, null, this.getTagsForStencil(gn, 'rds mariadb maria db instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_mariadb_instance_alt;',
|
||||
s * 78, s * 78, '', 'RDS MariaDB Instance', null, null, this.getTagsForStencil(gn, 'rds mariadb maria db instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_mysql_instance;',
|
||||
s * 78, s * 78, '', 'RDS MySQL Instance', null, null, this.getTagsForStencil(gn, 'rds mysql instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_mysql_instance_alt;',
|
||||
s * 78, s * 78, '', 'RDS MySQL Instance', null, null, this.getTagsForStencil(gn, 'rds mysql instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_oracle_instance;',
|
||||
s * 78, s * 78, '', 'RDS Oracle Instance', null, null, this.getTagsForStencil(gn, 'rds oracle instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_oracle_instance_alt;',
|
||||
s * 78, s * 78, '', 'RDS Oracle Instance', null, null, this.getTagsForStencil(gn, 'rds oracle instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_piop;',
|
||||
s * 78, s * 78, '', 'RDS PIOP', null, null, this.getTagsForStencil(gn, 'rds piop', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_postgresql_instance;',
|
||||
s * 78, s * 78, '', 'RDS PostgreSQL Instance', null, null, this.getTagsForStencil(gn, 'rds postgresql instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_postgresql_instance_alt;',
|
||||
s * 78, s * 78, '', 'RDS PostgreSQL Instance', null, null, this.getTagsForStencil(gn, 'rds postgresql instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_sql_server_instance;',
|
||||
s * 78, s * 78, '', 'RDS SQL Server Instance', null, null, this.getTagsForStencil(gn, 'rds sql server instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'rds_sql_server_instance_alt;',
|
||||
s * 78, s * 78, '', 'RDS SQL Server Instance', null, null, this.getTagsForStencil(gn, 'rds sql server instance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'dynamodb_dax;',
|
||||
s * 78, s * 72, '', 'DAX', null, null, this.getTagsForStencil(gn, 'dynamodb dynamo db database dax', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'global_secondary_index;',
|
||||
s * 78, s * 78, '', 'Global Secondary Index', null, null, this.getTagsForStencil(gn, 'global secondary index', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'item;',
|
||||
|
@ -614,8 +666,13 @@
|
|||
|
||||
this.addPaletteFunctions('aws4Developer Tools', 'AWS / Developer Tools', false,
|
||||
[
|
||||
this.createVertexTemplateEntry(n + 'dynamodb_dax;',
|
||||
s * 78, s * 72, '', 'DAX', null, null, this.getTagsForStencil(gn, 'dynamodb dynamo db database dax', dt).join(' ')),
|
||||
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.cloud9;',
|
||||
w2, w2, '', 'Cloud9', null, null, this.getTagsForStencil(gn, 'cloud9', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.cloud_development_kit;',
|
||||
w2, w2, '', 'Cloud Development Kit', null, null, this.getTagsForStencil(gn, 'cloud development kit', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.codebuild;',
|
||||
w2, w2, '', 'CodeBuild', null, null, this.getTagsForStencil(gn, 'codebuild', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.codecommit;',
|
||||
|
@ -917,6 +974,10 @@
|
|||
s * 68, s * 78, '', 'Resources', null, null, this.getTagsForStencil(gn, 'opsworks resources', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'stack2;',
|
||||
s * 78, s * 78, '', 'Stack', null, null, this.getTagsForStencil(gn, 'stack', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'organizations_account;',
|
||||
s * 74, s * 78, '', 'Organizations Account', null, null, this.getTagsForStencil(gn, 'organizations account', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'organizations_organizational_unit;',
|
||||
s * 78, s * 67, '', 'Organizations Organizational Unit', null, null, this.getTagsForStencil(gn, 'organizations organizational unit', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'shield_shield_advanced;',
|
||||
s * 70, s * 78, '', 'Shield Advanced', null, null, this.getTagsForStencil(gn, 'shield advanced', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'automation;',
|
||||
|
@ -944,7 +1005,9 @@
|
|||
this.createVertexTemplateEntry(n + 'checklist_performance;',
|
||||
s * 78, s * 78, '', 'Checklist Performance', null, null, this.getTagsForStencil(gn, 'trusted advisor checklist performance', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'checklist_security;',
|
||||
s * 78, s * 78, '', 'Checklist Security', null, null, this.getTagsForStencil(gn, 'trusted advisor checklist security', dt).join(' '))
|
||||
s * 78, s * 78, '', 'Checklist Security', null, null, this.getTagsForStencil(gn, 'trusted advisor checklist security', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'systems_manager_opscenter;',
|
||||
s * 78, s * 78, '', 'Systems Manager OpsCenter', null, null, this.getTagsForStencil(gn, 'systems manager opscenter', dt).join(' '))
|
||||
]);
|
||||
};
|
||||
|
||||
|
@ -972,6 +1035,14 @@
|
|||
w2, w2, '', 'Elemental MediaStore', null, null, this.getTagsForStencil(gn, 'elemental mediastore', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.elemental_mediatailor;',
|
||||
w2, w2, '', 'Elemental MediaTailor', null, null, this.getTagsForStencil(gn, 'elemental mediatailor', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.elemental;',
|
||||
w2, w2, '', 'Elemental Conductor', null, null, this.getTagsForStencil(gn, 'elemental conductor', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.elemental;',
|
||||
w2, w2, '', 'Elemental Delta', null, null, this.getTagsForStencil(gn, 'elemental delta', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.elemental;',
|
||||
w2, w2, '', 'Elemental Live', null, null, this.getTagsForStencil(gn, 'elemental live', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.elemental;',
|
||||
w2, w2, '', 'Elemental Server', null, null, this.getTagsForStencil(gn, 'elemental server', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.media_services;',
|
||||
w2, w2, '', 'Media Services', null, null, this.getTagsForStencil(gn, 'media services', dt).join(' '))
|
||||
]);
|
||||
|
@ -1115,7 +1186,9 @@
|
|||
this.createVertexTemplateEntry(n + 'vpn_connection;',
|
||||
s * 70, s * 78, '', 'VPN Connection', null, null, this.getTagsForStencil(gn, 'vpc virtual private cloud vpn network connection', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'vpn_gateway;',
|
||||
s * 78, s * 78, '', 'VPN Gateway', null, null, this.getTagsForStencil(gn, 'vpc virtual private cloud vpn network gateway', dt).join(' '))
|
||||
s * 78, s * 78, '', 'VPN Gateway', null, null, this.getTagsForStencil(gn, 'vpc virtual private cloud vpn network gateway', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'vpc_traffic_mirroring;',
|
||||
s * 78, s * 78, '', 'VPC Traffic Mirroring', null, null, this.getTagsForStencil(gn, 'vpc virtual private cloud traffic mirroring', dt).join(' '))
|
||||
]);
|
||||
};
|
||||
|
||||
|
@ -1190,6 +1263,8 @@
|
|||
w2, w2, '', 'Identity and Access Management', null, null, this.getTagsForStencil(gn, 'identity and access management', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.key_management_service;',
|
||||
w2, w2, '', 'Key Management Service', null, null, this.getTagsForStencil(gn, 'key management service', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.resource_access_manager;',
|
||||
w2, w2, '', 'Resource Access Manager', null, null, this.getTagsForStencil(gn, 'resource access manager', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.organizations;',
|
||||
w2, w2, '', 'Organizations', null, null, this.getTagsForStencil(gn, 'organizations', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.secrets_manager;',
|
||||
|
@ -1205,6 +1280,8 @@
|
|||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.security_identity_and_compliance;',
|
||||
w2, w2, '', 'Security Identity and Compliance', null, null, this.getTagsForStencil(gn, 'security identity and compliance', dt).join(' ')),
|
||||
|
||||
this.createVertexTemplateEntry(n + 'ad_connector;',
|
||||
s * 78, s * 73, '', 'AD Connector', null, null, this.getTagsForStencil(gn, 'ad connector', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'agent;',
|
||||
s * 78, s * 74, '', 'Inspector Agent', null, null, this.getTagsForStencil(gn, 'inspector agent', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'certificate_manager_2;',
|
||||
|
@ -1229,6 +1306,8 @@
|
|||
s * 78, s * 44, '', 'Role', null, null, this.getTagsForStencil(gn, 'identity and access management iam role', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'temporary_security_credential;',
|
||||
s * 77, s * 78, '', 'Temporary Security Credential', null, null, this.getTagsForStencil(gn, 'identity and access management iam temporary security credential', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'managed_ms_ad;',
|
||||
s * 78, s * 77, '', 'Managed MS AD', null, null, this.getTagsForStencil(gn, 'managed ms ad', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'organizations_account;',
|
||||
s * 74, s * 78, '', 'Organizations Account', null, null, this.getTagsForStencil(gn, 'organizations account', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'organizations_organizational_unit;',
|
||||
|
@ -1236,7 +1315,9 @@
|
|||
this.createVertexTemplateEntry(n + 'shield_shield_advanced;',
|
||||
s * 70, s * 78, '', 'Shield Advanced', null, null, this.getTagsForStencil(gn, 'shield advanced', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'filtering_rule;',
|
||||
s * 78, s * 78, '', 'Filtering Rule', null, null, this.getTagsForStencil(gn, 'filtering rule', dt).join(' '))
|
||||
s * 78, s * 78, '', 'Filtering Rule', null, null, this.getTagsForStencil(gn, 'filtering rule', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n + 'simple_ad;',
|
||||
s * 78, s * 77, '', 'Simple AD', null, null, this.getTagsForStencil(gn, 'simple ad', dt).join(' '))
|
||||
]);
|
||||
};
|
||||
|
||||
|
@ -1272,6 +1353,10 @@
|
|||
w2, w2, '', 'Snowmobile', null, null, this.getTagsForStencil(gn, 'snowmobile', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.storage_gateway;',
|
||||
w2, w2, '', 'Storage Gateway', null, null, this.getTagsForStencil(gn, 'storage gateway', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.efs_infrequentaccess;',
|
||||
w2, w2, '', 'EFS InfrequentAccess', null, null, this.getTagsForStencil(gn, 'efs infrequent access', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.efs_standard;',
|
||||
w2, w2, '', 'EFS Standard', null, null, this.getTagsForStencil(gn, 'efs standard', dt).join(' ')),
|
||||
this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.storage;',
|
||||
w2, w2, '', 'Storage', null, null, this.getTagsForStencil(gn, 'storage', dt).join(' ')),
|
||||
|
||||
|
|
|
@ -744,6 +744,7 @@
|
|||
{
|
||||
var dataLoaded = mxUtils.bind(this, function(images)
|
||||
{
|
||||
this.addEntries(images);
|
||||
this.editorUi.addLibraryEntries(images, content);
|
||||
});
|
||||
|
||||
|
|
|
@ -220,6 +220,10 @@
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
else if (name == 'pagecount')
|
||||
{
|
||||
return diagrams.length;
|
||||
}
|
||||
|
||||
return graphGetGlobalVariable.apply(this, arguments);
|
||||
};
|
||||
|
|
|
@ -619,7 +619,29 @@ Actions.prototype.init = function()
|
|||
}, null, null, Editor.ctrlKey + '+H');
|
||||
this.addAction('zoomIn', function(evt) { graph.zoomIn(); }, null, null, Editor.ctrlKey + ' + (Numpad) / Alt+Mousewheel');
|
||||
this.addAction('zoomOut', function(evt) { graph.zoomOut(); }, null, null, Editor.ctrlKey + ' - (Numpad) / Alt+Mousewheel');
|
||||
this.addAction('fitWindow', function() { graph.fit(); }, null, null, Editor.ctrlKey + '+Shift+H');
|
||||
this.addAction('fitWindow', function()
|
||||
{
|
||||
var bounds = (graph.isSelectionEmpty()) ? graph.getGraphBounds() : graph.getBoundingBox(graph.getSelectionCells());
|
||||
var t = graph.view.translate;
|
||||
var s = graph.view.scale;
|
||||
bounds.width /= s;
|
||||
bounds.height /= s;
|
||||
bounds.x = bounds.x / s - t.x;
|
||||
bounds.y = bounds.y / s - t.y;
|
||||
|
||||
var cw = graph.container.clientWidth - 10;
|
||||
var ch = graph.container.clientHeight - 10;
|
||||
var scale = Math.floor(20 * Math.min(cw / bounds.width, ch / bounds.height)) / 20;
|
||||
graph.zoomTo(scale);
|
||||
|
||||
if (mxUtils.hasScrollbars(graph.container))
|
||||
{
|
||||
graph.container.scrollTop = (bounds.y + t.y) * scale -
|
||||
Math.max((ch - bounds.height * scale) / 2 + 5, 0);
|
||||
graph.container.scrollLeft = (bounds.x + t.x) * scale -
|
||||
Math.max((cw - bounds.width * scale) / 2 + 5, 0);
|
||||
}
|
||||
}, null, null, Editor.ctrlKey + '+Shift+H');
|
||||
this.addAction('fitPage', mxUtils.bind(this, function()
|
||||
{
|
||||
if (!graph.pageVisible)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -138,13 +138,14 @@ mxShape.prototype.getConstraints = function(style, w, h)
|
|||
/**
|
||||
* Defines graph class.
|
||||
*/
|
||||
Graph = function(container, model, renderHint, stylesheet, themes)
|
||||
Graph = function(container, model, renderHint, stylesheet, themes, standalone)
|
||||
{
|
||||
mxGraph.call(this, container, model, renderHint, stylesheet);
|
||||
|
||||
this.themes = themes || this.defaultThemes;
|
||||
this.currentEdgeStyle = mxUtils.clone(this.defaultEdgeStyle);
|
||||
this.currentVertexStyle = mxUtils.clone(this.defaultVertexStyle);
|
||||
this.standalone = (standalone != null) ? standalone : false;
|
||||
|
||||
// Sets the base domain URL and domain path URL for relative links.
|
||||
var b = this.baseUrl;
|
||||
|
@ -1234,6 +1235,13 @@ Graph.prototype.editAfterInsert = false;
|
|||
*/
|
||||
Graph.prototype.builtInProperties = ['label', 'tooltip', 'placeholders', 'placeholder'];
|
||||
|
||||
/**
|
||||
* Defines if the graph is part of an EditorUi. If this is false the graph can
|
||||
* be used in an EditorUi instance but will not have a UI added, functions
|
||||
* overridden or event handlers added.
|
||||
*/
|
||||
Graph.prototype.standalone = false;
|
||||
|
||||
/**
|
||||
* Installs child layout styles.
|
||||
*/
|
||||
|
@ -4050,7 +4058,6 @@ HoverIcons.prototype.setCurrentState = function(state)
|
|||
|
||||
(function()
|
||||
{
|
||||
|
||||
/**
|
||||
* Reset the list of processed edges.
|
||||
*/
|
||||
|
@ -5031,6 +5038,52 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates lookup from object IDs to cell IDs.
|
||||
*/
|
||||
Graph.prototype.createCellLookup = function(cells, lookup)
|
||||
{
|
||||
lookup = (lookup != null) ? lookup : new Object();
|
||||
|
||||
for (var i = 0; i < cells.length; i++)
|
||||
{
|
||||
var cell = cells[i];
|
||||
lookup[mxObjectIdentity.get(cell)] = cell.getId();
|
||||
var childCount = this.model.getChildCount(cell);
|
||||
|
||||
for (var j = 0; j < childCount; j++)
|
||||
{
|
||||
this.createCellLookup([this.model.getChildAt(cell, j)], lookup);
|
||||
}
|
||||
}
|
||||
|
||||
return lookup;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates lookup from original to cloned cell IDs where mapping is
|
||||
* the mapping used in cloneCells and lookup is a mapping from
|
||||
* object IDs to cell IDs.
|
||||
*/
|
||||
Graph.prototype.createCellMapping = function(mapping, lookup, cellMapping)
|
||||
{
|
||||
cellMapping = (cellMapping != null) ? cellMapping : new Object();
|
||||
|
||||
for (var objectId in mapping)
|
||||
{
|
||||
var cellId = lookup[objectId];
|
||||
|
||||
if (cellMapping[cellId] == null)
|
||||
{
|
||||
// Uses empty string if clone ID was null which means
|
||||
// the cell was cloned but not inserted into the model.
|
||||
cellMapping[cellId] = mapping[objectId].getId() || '';
|
||||
}
|
||||
}
|
||||
|
||||
return cellMapping;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -5045,11 +5098,16 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
var cells = []
|
||||
|
||||
// Clones cells to remove invalid edges
|
||||
var layers = tempModel.getChildren(this.cloneCell(
|
||||
tempModel.root, this.isCloneInvalidEdges()));
|
||||
var cloneMap = new Object();
|
||||
var cellMapping = new Object();
|
||||
var layers = tempModel.getChildren(this.cloneCell(tempModel.root,
|
||||
this.isCloneInvalidEdges(), cloneMap));
|
||||
|
||||
if (layers != null)
|
||||
{
|
||||
// Creates lookup from object IDs to cell IDs
|
||||
var lookup = this.createCellLookup([tempModel.root]);
|
||||
|
||||
// Uses copy as layers are removed from array inside loop
|
||||
layers = layers.slice();
|
||||
|
||||
|
@ -5061,6 +5119,10 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
{
|
||||
cells = this.moveCells(tempModel.getChildren(layers[0]),
|
||||
dx, dy, false, this.getDefaultParent());
|
||||
|
||||
// Imported default default parent maps to local default parent
|
||||
cellMapping[tempModel.getChildAt(tempModel.root, 0).getId()] =
|
||||
this.getDefaultParent().getId();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5071,6 +5133,10 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
}
|
||||
}
|
||||
|
||||
// Adds mapping for all cloned entries from imported to local cell ID
|
||||
this.createCellMapping(cloneMap, lookup, cellMapping);
|
||||
this.updateCustomLinks(cellMapping, cells);
|
||||
|
||||
if (crop)
|
||||
{
|
||||
if (this.isGridEnabled())
|
||||
|
@ -5096,6 +5162,100 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
return cells;
|
||||
};
|
||||
|
||||
/**
|
||||
* Translates this point by the given vector.
|
||||
*
|
||||
* @param {number} dx X-coordinate of the translation.
|
||||
* @param {number} dy Y-coordinate of the translation.
|
||||
*/
|
||||
Graph.prototype.encodeCells = function(cells)
|
||||
{
|
||||
var cloneMap = new Object();
|
||||
var clones = this.cloneCells(cells, null, cloneMap);
|
||||
|
||||
// Creates a dictionary for fast lookups
|
||||
var dict = new mxDictionary();
|
||||
|
||||
for (var i = 0; i < cells.length; i++)
|
||||
{
|
||||
dict.put(cells[i], true);
|
||||
}
|
||||
|
||||
// Checks for orphaned relative children and makes absolute
|
||||
for (var i = 0; i < clones.length; i++)
|
||||
{
|
||||
var state = this.view.getState(cells[i]);
|
||||
|
||||
if (state != null)
|
||||
{
|
||||
var geo = this.getCellGeometry(clones[i]);
|
||||
|
||||
if (geo != null && geo.relative && !this.model.isEdge(cells[i]) &&
|
||||
!dict.get(this.model.getParent(cells[i])))
|
||||
{
|
||||
geo.relative = false;
|
||||
geo.x = state.x / state.view.scale - state.view.translate.x;
|
||||
geo.y = state.y / state.view.scale - state.view.translate.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var codec = new mxCodec();
|
||||
var model = new mxGraphModel();
|
||||
var parent = model.getChildAt(model.getRoot(), 0);
|
||||
|
||||
for (var i = 0; i < clones.length; i++)
|
||||
{
|
||||
model.add(parent, clones[i]);
|
||||
}
|
||||
|
||||
this.updateCustomLinks(this.createCellMapping(cloneMap,
|
||||
this.createCellLookup(cells)), clones);
|
||||
|
||||
return codec.encode(model);
|
||||
};
|
||||
|
||||
/**
|
||||
* Overrides cloning cells in moveCells.
|
||||
*/
|
||||
var graphMoveCells = Graph.prototype.moveCells;
|
||||
|
||||
Graph.prototype.moveCells = function(cells, dx, dy, clone, target, evt, mapping)
|
||||
{
|
||||
mapping = (mapping != null) ? mapping : new Object();
|
||||
var result = graphMoveCells.apply(this, arguments);
|
||||
|
||||
if (clone)
|
||||
{
|
||||
this.updateCustomLinks(this.createCellMapping(mapping,
|
||||
this.createCellLookup(cells)), result);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates cells IDs for custom links in the given cells.
|
||||
*/
|
||||
Graph.prototype.updateCustomLinks = function(mapping, cells)
|
||||
{
|
||||
for (var i = 0; i < cells.length; i++)
|
||||
{
|
||||
if (cells[i] != null)
|
||||
{
|
||||
this.updateCustomLinksForCell(mapping, cells[i]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates cell IDs in custom links on the given cell and its label.
|
||||
*/
|
||||
Graph.prototype.updateCustomLinksForCell = function(mapping, cell)
|
||||
{
|
||||
// Hook for subclassers
|
||||
};
|
||||
|
||||
/**
|
||||
* Overrides method to provide connection constraints for shapes.
|
||||
*/
|
||||
|
@ -6394,56 +6554,7 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
{
|
||||
return (mxClient.IS_MAC && mxEvent.isMetaDown(evt)) || mxEvent.isControlDown(evt);
|
||||
};
|
||||
|
||||
/**
|
||||
* Translates this point by the given vector.
|
||||
*
|
||||
* @param {number} dx X-coordinate of the translation.
|
||||
* @param {number} dy Y-coordinate of the translation.
|
||||
*/
|
||||
Graph.prototype.encodeCells = function(cells)
|
||||
{
|
||||
var clones = this.cloneCells(cells);
|
||||
|
||||
// Creates a dictionary for fast lookups
|
||||
var dict = new mxDictionary();
|
||||
|
||||
for (var i = 0; i < cells.length; i++)
|
||||
{
|
||||
dict.put(cells[i], true);
|
||||
}
|
||||
|
||||
// Checks for orphaned relative children and makes absolute
|
||||
for (var i = 0; i < clones.length; i++)
|
||||
{
|
||||
var state = this.view.getState(cells[i]);
|
||||
|
||||
if (state != null)
|
||||
{
|
||||
var geo = this.getCellGeometry(clones[i]);
|
||||
|
||||
if (geo != null && geo.relative && !this.model.isEdge(cells[i]) &&
|
||||
!dict.get(this.model.getParent(cells[i])))
|
||||
{
|
||||
geo.relative = false;
|
||||
geo.x = state.x / state.view.scale - state.view.translate.x;
|
||||
geo.y = state.y / state.view.scale - state.view.translate.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var codec = new mxCodec();
|
||||
var model = new mxGraphModel();
|
||||
var parent = model.getChildAt(model.getRoot(), 0);
|
||||
|
||||
for (var i = 0; i < cells.length; i++)
|
||||
{
|
||||
model.add(parent, clones[i]);
|
||||
}
|
||||
|
||||
return codec.encode(model);
|
||||
};
|
||||
|
||||
/**
|
||||
* Translates this point by the given vector.
|
||||
*
|
||||
|
@ -8517,14 +8628,7 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
|
||||
this.redrawHandles();
|
||||
});
|
||||
|
||||
this.selectionHandler = mxUtils.bind(this, function(sender, evt)
|
||||
{
|
||||
update();
|
||||
});
|
||||
|
||||
this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.selectionHandler);
|
||||
|
||||
|
||||
this.changeHandler = mxUtils.bind(this, function(sender, evt)
|
||||
{
|
||||
this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),
|
||||
|
@ -8532,6 +8636,7 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
update();
|
||||
});
|
||||
|
||||
this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.changeHandler);
|
||||
this.graph.getModel().addListener(mxEvent.CHANGE, this.changeHandler);
|
||||
|
||||
// Repaint needed when editing stops and no change event is fired
|
||||
|
@ -8664,13 +8769,6 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
this.labelShape.node.style.display = (this.graph.isEnabled() && this.graph.getSelectionCount() < this.graph.graphHandler.maxCells) ? '' : 'none';
|
||||
}
|
||||
});
|
||||
|
||||
this.selectionHandler = mxUtils.bind(this, function(sender, evt)
|
||||
{
|
||||
update();
|
||||
});
|
||||
|
||||
this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.selectionHandler);
|
||||
|
||||
this.changeHandler = mxUtils.bind(this, function(sender, evt)
|
||||
{
|
||||
|
@ -8679,7 +8777,8 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
update();
|
||||
this.redrawHandles();
|
||||
});
|
||||
|
||||
|
||||
this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.changeHandler);
|
||||
this.graph.getModel().addListener(mxEvent.CHANGE, this.changeHandler);
|
||||
|
||||
var link = this.graph.getLinkForCell(this.state.cell);
|
||||
|
@ -8761,14 +8860,9 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
this.linkHint = null;
|
||||
}
|
||||
|
||||
if (this.selectionHandler != null)
|
||||
{
|
||||
this.graph.getSelectionModel().removeListener(this.selectionHandler);
|
||||
this.selectionHandler = null;
|
||||
}
|
||||
|
||||
if (this.changeHandler != null)
|
||||
{
|
||||
this.graph.getSelectionModel().removeListener(this.changeHandler);
|
||||
this.graph.getModel().removeListener(this.changeHandler);
|
||||
this.changeHandler = null;
|
||||
}
|
||||
|
@ -8827,15 +8921,10 @@ if (typeof mxVertexHandler != 'undefined')
|
|||
this.linkHint = null;
|
||||
}
|
||||
|
||||
if (this.selectionHandler != null)
|
||||
{
|
||||
this.graph.getSelectionModel().removeListener(this.selectionHandler);
|
||||
this.selectionHandler = null;
|
||||
}
|
||||
|
||||
if (this.changeHandler != null)
|
||||
{
|
||||
this.graph.getModel().removeListener(this.changeHandler);
|
||||
this.graph.getSelectionModel().removeListener(this.changeHandler);
|
||||
this.changeHandler = null;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -445,6 +445,47 @@ Sidebar.prototype.addDataEntry = function(tags, width, height, title, data)
|
|||
}));
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds the give entries to the search index.
|
||||
*/
|
||||
Sidebar.prototype.addEntries = function(images)
|
||||
{
|
||||
for (var i = 0; i < images.length; i++)
|
||||
{
|
||||
(mxUtils.bind(this, function(img)
|
||||
{
|
||||
var data = img.data;
|
||||
|
||||
if (data != null && img.title != null)
|
||||
{
|
||||
this.addEntry(img.title, mxUtils.bind(this, function()
|
||||
{
|
||||
data = this.editorUi.convertDataUri(data);
|
||||
var s = 'shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;';
|
||||
|
||||
if (img.aspect == 'fixed')
|
||||
{
|
||||
s += 'aspect=fixed;'
|
||||
}
|
||||
|
||||
return this.createVertexTemplate(s + 'image=' +
|
||||
data, img.w, img.h, '', img.title || '', false, false, true)
|
||||
}));
|
||||
}
|
||||
else if (img.xml != null && img.title != null)
|
||||
{
|
||||
this.addEntry(img.title, mxUtils.bind(this, function()
|
||||
{
|
||||
var cells = this.editorUi.stringToCells(Graph.decompress(img.xml));
|
||||
|
||||
return this.createVertexTemplateFromCells(
|
||||
cells, img.w, img.h, img.title || '', true, false, true);
|
||||
}));
|
||||
}
|
||||
}))(images[i]);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Hides the current tooltip.
|
||||
*/
|
||||
|
@ -639,6 +680,7 @@ Sidebar.prototype.addSearchPalette = function(expand)
|
|||
input.style.width = '100%';
|
||||
input.style.outline = 'none';
|
||||
input.style.padding = '6px';
|
||||
input.style.paddingRight = '20px';
|
||||
inner.appendChild(input);
|
||||
|
||||
var cross = document.createElement('img');
|
||||
|
@ -764,6 +806,12 @@ Sidebar.prototype.addSearchPalette = function(expand)
|
|||
active = false;
|
||||
page++;
|
||||
this.insertSearchHint(div, searchTerm, count, page, results, len, more, terms);
|
||||
|
||||
// Allows to repeat the search
|
||||
if (results.length == 0 && page == 1)
|
||||
{
|
||||
searchTerm = '';
|
||||
}
|
||||
|
||||
if (center.parentNode != null)
|
||||
{
|
||||
|
@ -833,18 +881,6 @@ Sidebar.prototype.addSearchPalette = function(expand)
|
|||
}
|
||||
}));
|
||||
|
||||
mxEvent.addListener(input, 'focus', function()
|
||||
{
|
||||
input.style.paddingRight = '';
|
||||
});
|
||||
|
||||
mxEvent.addListener(input, 'blur', function()
|
||||
{
|
||||
input.style.paddingRight = '20px';
|
||||
});
|
||||
|
||||
input.style.paddingRight = '20px';
|
||||
|
||||
mxEvent.addListener(input, 'keyup', mxUtils.bind(this, function(evt)
|
||||
{
|
||||
if (input.value == '')
|
||||
|
|
26
src/main/webapp/js/shapes.min.js
vendored
26
src/main/webapp/js/shapes.min.js
vendored
|
@ -2316,23 +2316,23 @@ mxShapeInfographicBannerSingleFold.prototype.getConstraints=function(a,d,e){a=[]
|
|||
0),!1,null,0,.5*(e-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+.25*h,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+.5*h,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+.75*h,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+h,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.25*b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*
|
||||
b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.75*b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,.5*(e+c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-b-2*c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.75*(b+2*c),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*(b+2*c),
|
||||
e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.25*(b+2*c),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+.25*h,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+.5*h,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+.75*h,e-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g+h,e-c));return a};
|
||||
function mxShapeBasicShadedCube(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.isoAngle=15}mxUtils.extend(mxShapeBasicShadedCube,mxActor);mxShapeBasicShadedCube.prototype.cst={SHADED_CUBE:"mxgraph.infographic.shadedCube"};mxShapeBasicShadedCube.prototype.customProperties=[{name:"isoAngle",dispName:"Perspective",type:"float",defVal:15,min:0}];
|
||||
mxShapeBasicShadedCube.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;d=Math.min(b*Math.tan(d),.5*c);a.begin();a.moveTo(.5*b,0);a.lineTo(b,d);a.lineTo(b,c-d);a.lineTo(.5*b,c);a.lineTo(0,c-d);a.lineTo(0,d);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#000000");a.begin();a.moveTo(.5*b,2*d);a.lineTo(b,d);a.lineTo(b,c-d);a.lineTo(.5*b,c);a.close();
|
||||
a.fill();a.setFillColor("#ffffff");a.begin();a.moveTo(.5*b,2*d);a.lineTo(0,d);a.lineTo(0,c-d);a.lineTo(.5*b,c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeBasicShadedCube.prototype.cst.SHADED_CUBE,mxShapeBasicShadedCube);
|
||||
Graph.handleFactory[mxShapeBasicShadedCube.prototype.cst.SHADED_CUBE]=function(a){return[Graph.createHandle(a,["isoAngle"],function(a){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",this.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(d),.5*a.height))},function(a,e){this.state.style.isoAngle=Math.round(100*Math.max(0,Math.min(100,e.y-a.y)))/100})]};
|
||||
mxShapeBasicShadedCube.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,b=Math.min(d*Math.tan(b),.5*e);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.25*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,
|
||||
function mxShapeInfographicShadedCube(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.isoAngle=15}mxUtils.extend(mxShapeInfographicShadedCube,mxActor);mxShapeInfographicShadedCube.prototype.cst={SHADED_CUBE:"mxgraph.infographic.shadedCube"};mxShapeInfographicShadedCube.prototype.customProperties=[{name:"isoAngle",dispName:"Perspective",type:"float",defVal:15,min:0}];
|
||||
mxShapeInfographicShadedCube.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;d=Math.min(b*Math.tan(d),.5*c);a.begin();a.moveTo(.5*b,0);a.lineTo(b,d);a.lineTo(b,c-d);a.lineTo(.5*b,c);a.lineTo(0,c-d);a.lineTo(0,d);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#000000");a.begin();a.moveTo(.5*b,2*d);a.lineTo(b,d);a.lineTo(b,c-d);a.lineTo(.5*b,c);
|
||||
a.close();a.fill();a.setFillColor("#ffffff");a.begin();a.moveTo(.5*b,2*d);a.lineTo(0,d);a.lineTo(0,c-d);a.lineTo(.5*b,c);a.close();a.fill()};mxCellRenderer.registerShape(mxShapeInfographicShadedCube.prototype.cst.SHADED_CUBE,mxShapeInfographicShadedCube);
|
||||
Graph.handleFactory[mxShapeInfographicShadedCube.prototype.cst.SHADED_CUBE]=function(a){return[Graph.createHandle(a,["isoAngle"],function(a){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",this.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(d),.5*a.height))},function(a,e){this.state.style.isoAngle=Math.round(100*Math.max(0,Math.min(100,e.y-a.y)))/100})]};
|
||||
mxShapeInfographicShadedCube.prototype.getConstraints=function(a,d,e){a=[];var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,b=Math.min(d*Math.tan(b),.5*e);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d,.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.25*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,
|
||||
0),!1,null,d,b+.5*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.75*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d,e-.5*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
|
||||
0,e-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b+.75*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b+.5*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b+.25*(e-2*b)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d,.5*b));return a};
|
||||
function mxShapeBasicPartConcEllipse(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.startAngle=.25;this.endAngle=.75;this.arcWidth=.5}mxUtils.extend(mxShapeBasicPartConcEllipse,mxActor);mxShapeBasicPartConcEllipse.prototype.cst={PART_CONC_ELLIPSE:"mxgraph.infographic.partConcEllipse"};
|
||||
mxShapeBasicPartConcEllipse.prototype.customProperties=[{name:"startAngle",dispName:"Start Angle",min:0,max:1,defVal:.25},{name:"endAngle",dispName:"End Angle",min:0,max:1,defVal:.1},{name:"arcWidth",dispName:"Arc Width",min:0,max:1,defVal:.5}];
|
||||
mxShapeBasicPartConcEllipse.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"startAngle",this.startAngle)))),g=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"endAngle",this.endAngle)))),h=1-Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arcWidth",this.arcWidth))));d=.5*b;e=.5*c;var k=d*h,l=e*h,m=g-f;0>m?m+=2*Math.PI:m==Math.PI&&(g+=1E-5);var n=d+Math.sin(f)*d,p=e-Math.cos(f)*
|
||||
e,q=d+Math.sin(f)*k,f=e-Math.cos(f)*l,r=d+Math.sin(g)*d,t=e-Math.cos(g)*e,u=d+Math.sin(g)*k,g=e-Math.cos(g)*l,v=0;m<=Math.PI&&(v=1);a.begin();a.moveTo(d,0);a.arcTo(d,e,0,0,1,b,e);a.arcTo(d,e,0,0,1,d,c);a.arcTo(d,e,0,0,1,0,e);a.arcTo(d,e,0,0,1,d,0);a.close();a.moveTo(d,.5*c-l);a.arcTo(k,l,0,0,0,.5*b-k,e);a.arcTo(k,l,0,0,0,d,.5*c+l);a.arcTo(k,l,0,0,0,.5*b+k,e);a.arcTo(k,l,0,0,0,d,.5*c-l);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#ffffff");a.begin();a.moveTo(n,
|
||||
p);a.arcTo(d,e,0,v,0,r,t);a.lineTo(u,g);a.arcTo(k,l,0,v,1,q,f);a.close();a.fill();d=.5*b;e=.5*c;k=d*h;l=e*h;h=k+.25*(d-k);m=l+.25*(e-l);a.setFillColor("#000000");a.begin();a.moveTo(d,.5*c-l);a.arcTo(k,l,0,0,1,.5*b+k,e);a.arcTo(k,l,0,0,1,d,.5*c+l);a.arcTo(k,l,0,0,1,.5*b-k,e);a.arcTo(k,l,0,0,1,d,.5*c-l);a.close();a.moveTo(d,.5*c-m);a.arcTo(h,m,0,0,0,.5*b-h,e);a.arcTo(h,m,0,0,0,d,.5*c+m);a.arcTo(h,m,0,0,0,.5*b+h,e);a.arcTo(h,m,0,0,0,d,.5*c-m);a.close();a.fill()};
|
||||
mxCellRenderer.registerShape(mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE,mxShapeBasicPartConcEllipse);
|
||||
Graph.handleFactory[mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE]=function(a){var d=[Graph.createHandle(a,["startAngle"],function(a){var b=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"startAngle",this.startAngle))));return new mxPoint(a.x+.5*a.width+Math.sin(b)*a.width*.5,a.y+.5*a.height-Math.cos(b)*a.height*.5)},function(a,c){var b=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(c.x-a.x-.5*a.width)/(.5*a.width))))/100,-Math.round(100*Math.max(-1,
|
||||
function mxShapeInfographicPartConcEllipse(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.startAngle=.25;this.endAngle=.75;this.arcWidth=.5}mxUtils.extend(mxShapeInfographicPartConcEllipse,mxActor);mxShapeInfographicPartConcEllipse.prototype.cst={PART_CONC_ELLIPSE:"mxgraph.infographic.partConcEllipse"};
|
||||
mxShapeInfographicPartConcEllipse.prototype.customProperties=[{name:"startAngle",dispName:"Start Angle",min:0,max:1,defVal:.25},{name:"endAngle",dispName:"End Angle",min:0,max:1,defVal:.1},{name:"arcWidth",dispName:"Arc Width",min:0,max:1,defVal:.5}];
|
||||
mxShapeInfographicPartConcEllipse.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);var f=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"startAngle",this.startAngle)))),g=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"endAngle",this.endAngle)))),h=1-Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arcWidth",this.arcWidth))));d=.5*b;e=.5*c;var k=d*h,l=e*h,m=g-f;0>m?m+=2*Math.PI:m==Math.PI&&(g+=1E-5);var n=d+Math.sin(f)*d,
|
||||
p=e-Math.cos(f)*e,q=d+Math.sin(f)*k,f=e-Math.cos(f)*l,r=d+Math.sin(g)*d,t=e-Math.cos(g)*e,u=d+Math.sin(g)*k,g=e-Math.cos(g)*l,v=0;m<=Math.PI&&(v=1);a.begin();a.moveTo(d,0);a.arcTo(d,e,0,0,1,b,e);a.arcTo(d,e,0,0,1,d,c);a.arcTo(d,e,0,0,1,0,e);a.arcTo(d,e,0,0,1,d,0);a.close();a.moveTo(d,.5*c-l);a.arcTo(k,l,0,0,0,.5*b-k,e);a.arcTo(k,l,0,0,0,d,.5*c+l);a.arcTo(k,l,0,0,0,.5*b+k,e);a.arcTo(k,l,0,0,0,d,.5*c-l);a.close();a.fillAndStroke();a.setShadow(!1);a.setFillAlpha("0.2");a.setFillColor("#ffffff");a.begin();
|
||||
a.moveTo(n,p);a.arcTo(d,e,0,v,0,r,t);a.lineTo(u,g);a.arcTo(k,l,0,v,1,q,f);a.close();a.fill();d=.5*b;e=.5*c;k=d*h;l=e*h;h=k+.25*(d-k);m=l+.25*(e-l);a.setFillColor("#000000");a.begin();a.moveTo(d,.5*c-l);a.arcTo(k,l,0,0,1,.5*b+k,e);a.arcTo(k,l,0,0,1,d,.5*c+l);a.arcTo(k,l,0,0,1,.5*b-k,e);a.arcTo(k,l,0,0,1,d,.5*c-l);a.close();a.moveTo(d,.5*c-m);a.arcTo(h,m,0,0,0,.5*b-h,e);a.arcTo(h,m,0,0,0,d,.5*c+m);a.arcTo(h,m,0,0,0,.5*b+h,e);a.arcTo(h,m,0,0,0,d,.5*c-m);a.close();a.fill()};
|
||||
mxCellRenderer.registerShape(mxShapeInfographicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE,mxShapeInfographicPartConcEllipse);
|
||||
Graph.handleFactory[mxShapeInfographicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE]=function(a){var d=[Graph.createHandle(a,["startAngle"],function(a){var b=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"startAngle",this.startAngle))));return new mxPoint(a.x+.5*a.width+Math.sin(b)*a.width*.5,a.y+.5*a.height-Math.cos(b)*a.height*.5)},function(a,c){var b=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(c.x-a.x-.5*a.width)/(.5*a.width))))/100,-Math.round(100*Math.max(-1,
|
||||
Math.min(1,(c.y-a.y-.5*a.height)/(.5*a.height))))/100)/Math.PI;0>b&&(b=1+b);this.state.style.startAngle=b})],e=Graph.createHandle(a,["endAngle"],function(a){var b=2*Math.PI*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"endAngle",this.endAngle))));return new mxPoint(a.x+.5*a.width+Math.sin(b)*a.width*.5,a.y+.5*a.height-Math.cos(b)*a.height*.5)},function(a,c){var b=.5*Math.atan2(Math.round(100*Math.max(-1,Math.min(1,(c.x-a.x-.5*a.width)/(.5*a.width))))/100,-Math.round(100*Math.max(-1,
|
||||
Math.min(1,(c.y-a.y-.5*a.height)/(.5*a.height))))/100)/Math.PI;0>b&&(b=1+b);this.state.style.endAngle=b});d.push(e);a=Graph.createHandle(a,["arcWidth"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"arcWidth",this.arcWidth))));return new mxPoint(a.x+a.width/2,a.y+b*a.height*.5)},function(a,c){this.state.style.arcWidth=Math.round(100*Math.max(0,Math.min(a.height/2,a.width/2,(c.y-a.y)/(.5*a.height))))/100});d.push(a);return d};
|
||||
mxShapeBasicPartConcEllipse.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.145,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
|
||||
mxShapeInfographicPartConcEllipse.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.145,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
|
||||
.5),!1));return a};function mxShapeInfographicBannerHalfFold(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.notch=this.dx2=this.dx=.5}mxUtils.extend(mxShapeInfographicBannerHalfFold,mxActor);mxShapeInfographicBannerHalfFold.prototype.cst={BANNER_HALF_FOLD:"mxgraph.infographic.bannerHalfFold"};
|
||||
mxShapeInfographicBannerHalfFold.prototype.customProperties=[{name:"dx",dispName:"Banner Width",min:0,defVal:40},{name:"dx2",dispName:"Spike Size",min:0,defVal:20},{name:"notch",dispName:"Notch Size",min:0,defVal:15}];
|
||||
mxShapeInfographicBannerHalfFold.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(0,Math.min(b-d,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2))));var f=Math.max(0,Math.min(c-d,parseFloat(mxUtils.getValue(this.style,"notch",this.notch))));a.begin();a.moveTo(e,0);a.lineTo(b-d,0);a.lineTo(b,d);a.lineTo(b,c);a.lineTo(b-.5*d,c-f);a.lineTo(b-d,c);a.lineTo(b-d,d);a.lineTo(e,d);a.lineTo(0,.5*
|
||||
|
|
2
src/main/webapp/js/stencils.min.js
vendored
2
src/main/webapp/js/stencils.min.js
vendored
File diff suppressed because one or more lines are too long
1989
src/main/webapp/js/viewer.min.js
vendored
1989
src/main/webapp/js/viewer.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -238,10 +238,10 @@ errorSavingFileUnknown=Ошибка авторизации на сервере G
|
|||
errorSavingFileForbidden=Ошибка сохранения файла. Не хватает прав доступа.
|
||||
errorSavingFileNameConflict=Невозможно сохранить диаграмму. Страница уже содержит файл с названием '{1}'.
|
||||
errorSavingFileNotFound=Ошибка при сохранении файла. Файл не найден.
|
||||
errorSavingFileReadOnlyMode=Невозможно сохранить диаграмму до выхода из режима только для чтения
|
||||
errorSavingFileReadOnlyMode=Невозможно сохранить диаграмму. Выйдите из режима "только для чтения"
|
||||
errorSavingFileSessionTimeout=Ваша сессия истекла. Для сохранения, пожалуйста, <a target='_blank' href='{1}'>{2}</a> и вернитесь на эту закладку.
|
||||
errorSendingFeedback=Ошибка при отправке сообщения обратной связи.
|
||||
errorUpdatingPreview=Ошибка при обновлении предпросмотра.
|
||||
errorUpdatingPreview=Ошибка при обновлении предварительного просмотра.
|
||||
exit=Выйти
|
||||
exitGroup=Выйти из группы
|
||||
expand=Развернуть
|
||||
|
@ -423,7 +423,7 @@ years=лет
|
|||
restartForChangeRequired=Изменения вступят в силу после обновления страницы.
|
||||
laneColor=Цвет дорожки
|
||||
lastModified=Последнее изменение
|
||||
layout=Расположение
|
||||
layout=Схемы страниц
|
||||
left=Слева
|
||||
leftAlign=По левому краю
|
||||
leftToRight=Слева направо
|
||||
|
@ -664,7 +664,7 @@ sourceSpacing=Отступ от начального узла
|
|||
south=Юг
|
||||
software=Программное обеспечение
|
||||
space=Пространство
|
||||
spacing=Интервал
|
||||
spacing=Поля
|
||||
specialLink=Специальная ссылка
|
||||
standard=Стандарт
|
||||
startDrawing=Start drawing
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* $Id: mxBasic.js,v 1.5 2016/04/1 12:32:06 mate Exp $
|
||||
* $Id: mxInfographic.js,v 1.5 2016/04/1 12:32:06 mate Exp $
|
||||
* Copyright (c) 2006-2018, JGraph Ltd
|
||||
*/
|
||||
//**********************************************************************************************************************************************************
|
||||
|
@ -1765,7 +1765,7 @@ mxShapeInfographicBannerSingleFold.prototype.getConstraints = function(style, w,
|
|||
/**
|
||||
* Extends mxShape.
|
||||
*/
|
||||
function mxShapeBasicShadedCube(bounds, fill, stroke, strokewidth)
|
||||
function mxShapeInfographicShadedCube(bounds, fill, stroke, strokewidth)
|
||||
{
|
||||
mxShape.call(this);
|
||||
this.bounds = bounds;
|
||||
|
@ -1778,11 +1778,11 @@ function mxShapeBasicShadedCube(bounds, fill, stroke, strokewidth)
|
|||
/**
|
||||
* Extends mxShape.
|
||||
*/
|
||||
mxUtils.extend(mxShapeBasicShadedCube, mxActor);
|
||||
mxUtils.extend(mxShapeInfographicShadedCube, mxActor);
|
||||
|
||||
mxShapeBasicShadedCube.prototype.cst = {SHADED_CUBE : 'mxgraph.infographic.shadedCube'};
|
||||
mxShapeInfographicShadedCube.prototype.cst = {SHADED_CUBE : 'mxgraph.infographic.shadedCube'};
|
||||
|
||||
mxShapeBasicShadedCube.prototype.customProperties = [
|
||||
mxShapeInfographicShadedCube.prototype.customProperties = [
|
||||
{name:'isoAngle', dispName: 'Perspective', type:'float', defVal:15, min:0}
|
||||
];
|
||||
|
||||
|
@ -1791,7 +1791,7 @@ mxShapeBasicShadedCube.prototype.customProperties = [
|
|||
*
|
||||
* Paints the vertex shape.
|
||||
*/
|
||||
mxShapeBasicShadedCube.prototype.paintVertexShape = function(c, x, y, w, h)
|
||||
mxShapeInfographicShadedCube.prototype.paintVertexShape = function(c, x, y, w, h)
|
||||
{
|
||||
c.translate(x, y);
|
||||
|
||||
|
@ -1830,9 +1830,9 @@ mxShapeBasicShadedCube.prototype.paintVertexShape = function(c, x, y, w, h)
|
|||
c.fill();
|
||||
};
|
||||
|
||||
mxCellRenderer.registerShape(mxShapeBasicShadedCube.prototype.cst.SHADED_CUBE, mxShapeBasicShadedCube);
|
||||
mxCellRenderer.registerShape(mxShapeInfographicShadedCube.prototype.cst.SHADED_CUBE, mxShapeInfographicShadedCube);
|
||||
|
||||
Graph.handleFactory[mxShapeBasicShadedCube.prototype.cst.SHADED_CUBE] = function(state)
|
||||
Graph.handleFactory[mxShapeInfographicShadedCube.prototype.cst.SHADED_CUBE] = function(state)
|
||||
{
|
||||
var handles = [Graph.createHandle(state, ['isoAngle'], function(bounds)
|
||||
{
|
||||
|
@ -1848,7 +1848,7 @@ Graph.handleFactory[mxShapeBasicShadedCube.prototype.cst.SHADED_CUBE] = function
|
|||
return handles;
|
||||
};
|
||||
|
||||
mxShapeBasicShadedCube.prototype.getConstraints = function(style, w, h)
|
||||
mxShapeInfographicShadedCube.prototype.getConstraints = function(style, w, h)
|
||||
{
|
||||
var constr = [];
|
||||
var isoAngle = Math.max(0.01, Math.min(94, parseFloat(mxUtils.getValue(this.style, 'isoAngle', this.isoAngle)))) * Math.PI / 200 ;
|
||||
|
@ -1881,7 +1881,7 @@ mxShapeBasicShadedCube.prototype.getConstraints = function(style, w, h)
|
|||
/**
|
||||
* Extends mxShape.
|
||||
*/
|
||||
function mxShapeBasicPartConcEllipse(bounds, fill, stroke, strokewidth)
|
||||
function mxShapeInfographicPartConcEllipse(bounds, fill, stroke, strokewidth)
|
||||
{
|
||||
mxShape.call(this);
|
||||
this.bounds = bounds;
|
||||
|
@ -1896,11 +1896,11 @@ function mxShapeBasicPartConcEllipse(bounds, fill, stroke, strokewidth)
|
|||
/**
|
||||
* Extends mxShape.
|
||||
*/
|
||||
mxUtils.extend(mxShapeBasicPartConcEllipse, mxActor);
|
||||
mxUtils.extend(mxShapeInfographicPartConcEllipse, mxActor);
|
||||
|
||||
mxShapeBasicPartConcEllipse.prototype.cst = {PART_CONC_ELLIPSE : 'mxgraph.infographic.partConcEllipse'};
|
||||
mxShapeInfographicPartConcEllipse.prototype.cst = {PART_CONC_ELLIPSE : 'mxgraph.infographic.partConcEllipse'};
|
||||
|
||||
mxShapeBasicPartConcEllipse.prototype.customProperties = [
|
||||
mxShapeInfographicPartConcEllipse.prototype.customProperties = [
|
||||
{name:'startAngle', dispName:'Start Angle', min:0, max:1, defVal: 0.25},
|
||||
{name:'endAngle', dispName:'End Angle', min:0, max:1, defVal: 0.1},
|
||||
{name:'arcWidth', dispName:'Arc Width', min:0, max:1, defVal: 0.5}
|
||||
|
@ -1911,7 +1911,7 @@ mxShapeBasicPartConcEllipse.prototype.customProperties = [
|
|||
*
|
||||
* Paints the vertex shape.
|
||||
*/
|
||||
mxShapeBasicPartConcEllipse.prototype.paintVertexShape = function(c, x, y, w, h)
|
||||
mxShapeInfographicPartConcEllipse.prototype.paintVertexShape = function(c, x, y, w, h)
|
||||
{
|
||||
c.translate(x, y);
|
||||
|
||||
|
@ -2003,9 +2003,9 @@ mxShapeBasicPartConcEllipse.prototype.paintVertexShape = function(c, x, y, w, h)
|
|||
c.fill();
|
||||
};
|
||||
|
||||
mxCellRenderer.registerShape(mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE, mxShapeBasicPartConcEllipse);
|
||||
mxCellRenderer.registerShape(mxShapeInfographicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE, mxShapeInfographicPartConcEllipse);
|
||||
|
||||
Graph.handleFactory[mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE] = function(state)
|
||||
Graph.handleFactory[mxShapeInfographicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE] = function(state)
|
||||
{
|
||||
var handles = [Graph.createHandle(state, ['startAngle'], function(bounds)
|
||||
{
|
||||
|
@ -2065,7 +2065,7 @@ Graph.handleFactory[mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE]
|
|||
return handles;
|
||||
};
|
||||
|
||||
mxShapeBasicPartConcEllipse.prototype.getConstraints = function(style, w, h)
|
||||
mxShapeInfographicPartConcEllipse.prototype.getConstraints = function(style, w, h)
|
||||
{
|
||||
var constr = [];
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue