@zklogic/draw.io
Version:
Draw.IO - Graph Editor integration in Angular-cli
1 lines • 24 kB
JavaScript
function mxShapeAndroidTabBar(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1}function mxShapeAndroidPhone(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1}function mxShapeAndroidStatusBar(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1}function mxShapeAndroidCheckboxGroup(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1}function mxShapeAndroidRadioGroup(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1}function mxShapeAndroidMenuBar(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1}function mxShapeAndroidTextSelHandles(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1}function mxShapeAndroidIndeterminateSpinner(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1}function mxShapeAndroidAnchor(e,t,r,o){mxShape.call(this),this.bounds=e}function mxShapeAndroidRRect(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1}function mxShapeAndroidCheckbox(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1}function mxShapeAndroidProgressBar(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1,this.dx1=.8,this.dx2=.6}function mxShapeAndroidProgressScrubberDisabled(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1,this.dx=.3}function mxShapeAndroidProgressScrubberFocused(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1,this.dx=.3}function mxShapeAndroidProgressScrubberPressed(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1,this.dx=.3}function mxShapeAndroidQuickscroll2(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1,this.dy=.5}function mxShapeAndroidQuickscroll3(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1,this.dy=.5}function mxShapeAndroidScrollbars2(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1}function mxShapeAndroidSpinner2(e,t,r,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=r,this.strokewidth=null!=o?o:1}mxUtils.extend(mxShapeAndroidTabBar,mxShape),mxShapeAndroidTabBar.prototype.cst={MAIN_TEXT:"mainText",SHAPE_TAB_BAR:"mxgraph.android.tabBar",TEXT_COLOR:"textColor",TEXT_COLOR2:"textColor2",STROKE_COLOR2:"strokeColor2",FILL_COLOR2:"fillColor2",SELECTED:"+",TEXT_SIZE:"textSize"},mxShapeAndroidTabBar.prototype.paintVertexShape=function(e,t,r,o,i){for(var s=mxUtils.getValue(this.style,mxShapeAndroidTabBar.prototype.cst.MAIN_TEXT,"+Tab 1, Tab 2, Tab 3").toString().split(","),a=mxUtils.getValue(this.style,mxShapeAndroidTabBar.prototype.cst.TEXT_COLOR,"none"),n=mxUtils.getValue(this.style,mxShapeAndroidTabBar.prototype.cst.TEXT_COLOR2,"none"),l=mxUtils.getValue(this.style,mxShapeAndroidTabBar.prototype.cst.TEXT_SIZE,"17").toString(),d=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"none"),h=mxUtils.getValue(this.style,mxShapeAndroidTabBar.prototype.cst.STROKE_COLOR2,"none"),p=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"none"),x=mxUtils.getValue(this.style,mxShapeAndroidTabBar.prototype.cst.FILL_COLOR2,"none"),m=s.length,S=new Array(m),c=0,u=-1,A=0;A<m;A++){var g=s[A];g.charAt(0)===mxShapeAndroidTabBar.prototype.cst.SELECTED&&(g=s[A].substring(1),u=A),S[A]=mxUtils.getSizeForString(g,l,mxConstants.DEFAULT_FONTFAMILY).width,c+=S[A]}var T=Math.max(i,1.5*l,7),f=10*m+c,b=Math.max(o,f);e.translate(t,r),this.background(e,b,T,m,S,5,f,d,h,p,x,u),e.setShadow(!1),e.setFontStyle(mxConstants.FONT_BOLD);var y=0;for(A=0;A<m;A++)A===u?e.setFontColor(n):e.setFontColor(a),y+=5,this.buttonText(e,y,T,s[A],S[A],l,f,b),y=y+S[A]+5},mxShapeAndroidTabBar.prototype.background=function(e,t,r,o,i,s,a,n,l,d,h,p){e.begin(),e.setStrokeColor(n),e.setFillColor(d),e.rect(0,0,t,r),e.fillAndStroke(),e.setStrokeColor(l),e.begin();for(var x=1;x<o;x++)if(x!==p&&x!==p+1){for(var m=0,S=0;S<x;S++)m+=i[S]+2*s;m=m*t/a,e.moveTo(m,.2*r),e.lineTo(m,.8*r)}e.stroke();var c=0;for(e.setFillColor(h),x=0;x<p;x++)c+=i[x]+2*s;c=c*t/a;var u=(i[p]+2*s)*t/a;u+=c,e.rect(c,0,u-c,r),e.fill(),e.setAlpha(1),e.setFillColor("#33b5e5"),e.rect(c,.9*r,u-c,.1*r),e.fill()},mxShapeAndroidTabBar.prototype.buttonText=function(e,t,r,o,i,s,a,n){o.charAt(0)===mxShapeAndroidTabBar.prototype.cst.SELECTED&&(o=o.substring(1)),e.begin(),e.setFontSize(s),e.text((t+.5*i)*n/a,.5*r,0,0,o,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)},mxCellRenderer.registerShape(mxShapeAndroidTabBar.prototype.cst.SHAPE_TAB_BAR,mxShapeAndroidTabBar),mxUtils.extend(mxShapeAndroidPhone,mxShape),mxShapeAndroidPhone.prototype.paintVertexShape=function(e,t,r,o,i){e.translate(t,r),e.roundrect(0,0,o,i,25,25),e.fillAndStroke(),e.setShadow(!1),this.foreground(e,t,r,o,i,25)},mxShapeAndroidPhone.prototype.foreground=function(e,t,r,o,i,s){e.rect(.0625*o,.15*i,.875*o,.7*i),e.stroke(),e.ellipse(.4875*o,.04125*i,.025*o,.0125*i),e.stroke(),e.roundrect(.375*o,.075*i,.25*o,.01875*i,.02*o,.01*i),e.stroke(),e.ellipse(.4*o,.875*i,.2*o,.1*i),e.stroke(),e.roundrect(.4575*o,.905*i,.085*o,.04375*i,.00625*i,.00625*i),e.stroke()},mxCellRenderer.registerShape("mxgraph.android.phone",mxShapeAndroidPhone),mxUtils.extend(mxShapeAndroidStatusBar,mxShape),mxShapeAndroidStatusBar.prototype.paintVertexShape=function(e,t,r,o,i){e.translate(t,r),this.background(e,t,r,o,i),e.setShadow(!1),this.foreground(e,t,r,o,i)},mxShapeAndroidStatusBar.prototype.background=function(e,t,r,o,i){e.rect(0,0,o,i),e.fill()},mxShapeAndroidStatusBar.prototype.foreground=function(e,t,r,o,i){e.rect(0,0,o,i),e.fill(),e.setFontColor(mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,"#222222")),e.setFontSize(mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"5")),e.text(o-30,.5*i+1,0,0,"12:00",mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0),e.setFillColor("#444444"),e.begin(),e.moveTo(o-37,.5*i+6),e.lineTo(o-37,.5*i-5),e.lineTo(o-36,.5*i-5),e.lineTo(o-36,.5*i-6),e.lineTo(o-32,.5*i-6),e.lineTo(o-32,.5*i-5),e.lineTo(o-31,.5*i-5),e.lineTo(o-31,.5*i+6),e.close(),e.fill(),e.setFillColor(mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"none")),e.ellipse(o-56,.5*i+2,2,2),e.fillAndStroke(),e.setStrokeWidth(2),e.begin(),e.moveTo(o-52,.5*i+1),e.arcTo(3.5,3.5,0,0,0,o-58,.5*i+1),e.stroke(),e.begin(),e.moveTo(o-50,.5*i-1),e.arcTo(6,6,0,0,0,o-60,.5*i-1),e.stroke(),e.setStrokeWidth(1),e.rect(o-51,.5*i+5,2,1),e.fill(),e.rect(o-48,.5*i+2,2,4),e.fill(),e.rect(o-45,.5*i-1,2,7),e.fill(),e.rect(o-42,.5*i-4,2,10),e.fill(),e.rect(o-37,.5*i-2,6,8),e.fill()},mxCellRenderer.registerShape("mxgraph.android.statusBar",mxShapeAndroidStatusBar),mxUtils.extend(mxShapeAndroidCheckboxGroup,mxShape),mxShapeAndroidCheckboxGroup.prototype.cst={STYLE_TEXTCOLOR2:"textColor2",STYLE_STROKECOLOR2:"strokeColor2",BUTTON_TEXT:"buttonText",SELECTED:"+"},mxShapeAndroidCheckboxGroup.prototype.paintVertexShape=function(e,t,r,o,i){e.translate(t,r);var s=mxUtils.getValue(this.style,mxConstants.STYLE_TEXTCOLOR,"#666666"),a=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8").toString(),n=mxUtils.getValue(this.style,mxShapeAndroidCheckboxGroup.prototype.cst.BUTTON_TEXT,"Option 1").toString().split(","),l=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"none"),d=mxUtils.getValue(this.style,mxShapeAndroidCheckboxGroup.prototype.cst.STYLE_STROKECOLOR2,"none");e.setStrokeColor(d);for(var h=n.length,p=Math.max(1.5*a,5),x=0,m=-1,S=h*p,c=Math.max(i,S),u=0;u<h;u++){(f=n[u]).charAt(0)===mxShapeAndroidCheckboxGroup.prototype.cst.SELECTED&&(f=n[u].substring(1),m=u);var A=mxUtils.getSizeForString(f,a,mxConstants.DEFAULT_FONTFAMILY).width;A>x&&(x=A)}var g=5+x+10,T=Math.max(o,g);for(e.roundrect(0,0,T,c,2.5,2.5),e.fillAndStroke(),e.setShadow(!1),e.setFontSize(a),e.setFontColor(s),e.setStrokeColor(l),u=0;u<h;u++){var f,b=(u*p+.5*p)*c/S;(f=n[u]).charAt(0)===mxShapeAndroidCheckboxGroup.prototype.cst.SELECTED&&(f=n[u].substring(1),m=u),e.text(12.5,b,0,0,f,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);var y=b-2.5;m===u?(e.rect(2.5,y,5,5),e.fillAndStroke(),e.begin(),e.moveTo(3.75,y+2.5),e.lineTo(5,y+3.75),e.lineTo(6.25,y+1.25),e.stroke()):(e.rect(2.5,y,5,5),e.fillAndStroke()),m=-1}},mxCellRenderer.registerShape("mxgraph.android.checkboxGroup",mxShapeAndroidCheckboxGroup),mxUtils.extend(mxShapeAndroidRadioGroup,mxShape),mxShapeAndroidRadioGroup.prototype.cst={STYLE_TEXTCOLOR2:"textColor2",STYLE_STROKECOLOR2:"strokeColor2",BUTTON_TEXT:"buttonText",SELECTED:"+"},mxShapeAndroidRadioGroup.prototype.paintVertexShape=function(e,t,r,o,i){e.translate(t,r);var s=mxUtils.getValue(this.style,mxConstants.STYLE_TEXTCOLOR,"#666666"),a=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"8").toString(),n=mxUtils.getValue(this.style,mxShapeAndroidRadioGroup.prototype.cst.BUTTON_TEXT,"Option 1").toString().split(","),l=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"none"),d=mxUtils.getValue(this.style,mxShapeAndroidRadioGroup.prototype.cst.STYLE_STROKECOLOR2,"none");e.setStrokeColor(d);for(var h=n.length,p=Math.max(1.5*a,5),x=0,m=-1,S=h*p,c=Math.max(i,S),u=0;u<h;u++){(f=n[u]).charAt(0)===mxShapeAndroidRadioGroup.prototype.cst.SELECTED&&(f=n[u].substring(1),m=u);var A=mxUtils.getSizeForString(f,a,mxConstants.DEFAULT_FONTFAMILY).width;A>x&&(x=A)}var g=5+x+10,T=Math.max(o,g);for(e.roundrect(0,0,T,c,2.5,2.5),e.fillAndStroke(),e.setShadow(!1),e.setFontSize(a),e.setFontColor(s),e.setStrokeColor(l),e.setFillColor(l),u=0;u<h;u++){var f,b=(u*p+.5*p)*c/S;(f=n[u]).charAt(0)===mxShapeAndroidRadioGroup.prototype.cst.SELECTED&&(f=n[u].substring(1),m=u),e.text(12.5,b,0,0,f,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);var y=b-2.5;m===u?(e.ellipse(2.5,y,5,5),e.stroke(),e.ellipse(3.75,y+1.25,2.5,2.5),e.fillAndStroke()):(e.ellipse(2.5,y,5,5),e.stroke())}},mxCellRenderer.registerShape("mxgraph.android.radioGroup",mxShapeAndroidRadioGroup),mxUtils.extend(mxShapeAndroidMenuBar,mxShape),mxShapeAndroidMenuBar.prototype.cst={MENU_TEXT:"menuText"},mxShapeAndroidMenuBar.prototype.paintVertexShape=function(e,t,r,o,i){for(var s=mxUtils.getValue(this.style,mxShapeAndroidMenuBar.prototype.cst.MENU_TEXT,"Item 1, Item 2, Item 3").toString().split(","),a=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"12"),n=s.length,l=0,d=0;d<n;d++){var h=s[d],p=mxUtils.getSizeForString(h,a,mxConstants.DEFAULT_FONTFAMILY).width;p>l&&(l=p)}var x=1.5*a,m=n*x,S=Math.max(i,m),c=5+l;for(Math.max(o,c),e.translate(t,r),e.rect(0,0,o,S),e.fillAndStroke(),e.setShadow(!1),e.begin(),d=1;d<n;d++){var u=d*x*S/m;e.moveTo(0,u),e.lineTo(o,u)}for(e.stroke(),d=0;d<n;d++)p+=2.5,u=(d*x+.5*x)*S/m,e.text(10,u,0,0,s[d],mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)},mxCellRenderer.registerShape("mxgraph.android.menuBar",mxShapeAndroidMenuBar),mxUtils.extend(mxShapeAndroidTextSelHandles,mxShape),mxShapeAndroidTextSelHandles.prototype.paintVertexShape=function(e,t,r,o,i){var s=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"none");e.translate(t,r);var a=15,n=Math.max(0,i-22.5);e.setAlpha(.5),e.rect(a,0,o-30,n),e.fill(),e.begin(),e.moveTo(0,i-a),e.lineTo(7.5,i-22.5),e.lineTo(a,i-a),e.close(),e.moveTo(o-a,i-a),e.lineTo(o-7.5,i-22.5),e.lineTo(o,i-a),e.close(),e.fill(),e.setFillColor(s),e.rect(0,i-a,a,a),e.fill(),e.rect(o-a,i-a,a,a),e.fill()},mxCellRenderer.registerShape("mxgraph.android.textSelHandles",mxShapeAndroidTextSelHandles),mxUtils.extend(mxShapeAndroidIndeterminateSpinner,mxShape),mxShapeAndroidIndeterminateSpinner.prototype.paintVertexShape=function(e,t,r,o,i){e.translate(t,r),this.background(e,t,r,o,i)},mxShapeAndroidIndeterminateSpinner.prototype.background=function(e,t,r,o,i){e.setGradient("#aaaaaa","#dddddd",.325*o,0,.675*o,.5*i,mxConstants.DIRECTION_SOUTH,1,1),e.begin(),e.moveTo(.5*o,.1*i),e.arcTo(.4*o,.4*i,0,0,0,.5*o,.9*i),e.lineTo(.5*o,i),e.arcTo(.5*o,.5*i,0,0,1,.5*o,0),e.close(),e.fill(),e.setGradient("#ffffff","#dddddd",.325*o,0,.675*o,.5*i,mxConstants.DIRECTION_SOUTH,1,1),e.begin(),e.moveTo(.5*o,.1*i),e.arcTo(.4*o,.4*i,0,0,1,.5*o,.9*i),e.lineTo(.5*o,i),e.arcTo(.5*o,.5*i,0,0,0,.5*o,0),e.close(),e.fill()},mxCellRenderer.registerShape("mxgraph.android.indeterminateSpinner",mxShapeAndroidIndeterminateSpinner),mxUtils.extend(mxShapeAndroidAnchor,mxShape),mxShapeAndroidAnchor.prototype.cst={ANCHOR:"mxgraph.android.anchor"},mxShapeAndroidAnchor.prototype.paintVertexShape=function(e,t,r,o,i){},mxCellRenderer.registerShape(mxShapeAndroidAnchor.prototype.cst.ANCHOR,mxShapeAndroidAnchor),mxUtils.extend(mxShapeAndroidRRect,mxShape),mxShapeAndroidRRect.prototype.cst={RRECT:"mxgraph.android.rrect",R_SIZE:"rSize"},mxShapeAndroidRRect.prototype.paintVertexShape=function(e,t,r,o,i){e.translate(t,r);var s=parseInt(mxUtils.getValue(this.style,mxShapeAndroidRRect.prototype.cst.R_SIZE,"10"));e.roundrect(0,0,o,i,s),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeAndroidRRect.prototype.cst.RRECT,mxShapeAndroidRRect),mxUtils.extend(mxShapeAndroidCheckbox,mxShape),mxShapeAndroidCheckbox.prototype.cst={CHECKBOX:"mxgraph.android.checkbox"},mxShapeAndroidCheckbox.prototype.paintVertexShape=function(e,t,r,o,i){e.translate(t,r),e.rect(0,0,o,i),e.fillAndStroke(),e.begin(),e.moveTo(.8*o,.2*i),e.lineTo(.4*o,.8*i),e.lineTo(.25*o,.6*i),e.stroke()},mxCellRenderer.registerShape(mxShapeAndroidCheckbox.prototype.cst.CHECKBOX,mxShapeAndroidCheckbox),mxUtils.extend(mxShapeAndroidProgressBar,mxShape),mxShapeAndroidProgressBar.prototype.customProperties=[{name:"dx1",dispName:"Middle Bar Length",type:"float",min:0,max:1,defVal:.8},{name:"dx2",dispName:"Left Bar Length",type:"float",min:0,max:1,defVal:.6}],mxShapeAndroidProgressBar.prototype.cst={PROGRESS_BAR:"mxgraph.android.progressBar"},mxShapeAndroidProgressBar.prototype.paintVertexShape=function(e,t,r,o,i){var s=o*Math.max(0,Math.min(o,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1)))),a=o*Math.max(0,Math.min(o,parseFloat(mxUtils.getValue(this.style,"dx2",this.dx2))));e.translate(t,r),e.save(),e.save(),e.setStrokeColor("#444444"),e.begin(),e.moveTo(0,.5*i),e.lineTo(o,.5*i),e.stroke(),e.restore(),e.setShadow(!1),e.begin(),e.moveTo(0,.5*i),e.lineTo(s,.5*i),e.stroke(),e.setStrokeColor("#000000"),e.setAlpha("0.2"),e.begin(),e.moveTo(0,.5*i),e.lineTo(s,.5*i),e.stroke(),e.restore(),e.setShadow(!1),e.begin(),e.moveTo(0,.5*i),e.lineTo(a,.5*i),e.stroke()},mxCellRenderer.registerShape(mxShapeAndroidProgressBar.prototype.cst.PROGRESS_BAR,mxShapeAndroidProgressBar),mxShapeAndroidProgressBar.prototype.constraints=null,Graph.handleFactory[mxShapeAndroidProgressBar.prototype.cst.PROGRESS_BAR]=function(e){var t=[Graph.createHandle(e,["dx1"],(function(e){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx1",this.dx1))));return new mxPoint(e.x+t*e.width,e.y+e.height/2)}),(function(e,t){this.state.style.dx1=Math.round(100*Math.max(0,Math.min(1,(t.x-e.x)/e.width)))/100}))],r=Graph.createHandle(e,["dx2"],(function(e){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx2",this.dx1))));return new mxPoint(e.x+t*e.width,e.y+e.height/2)}),(function(e,t){this.state.style.dx2=Math.round(100*Math.max(0,Math.min(1,(t.x-e.x)/e.width)))/100}));return t.push(r),t},mxUtils.extend(mxShapeAndroidProgressScrubberDisabled,mxShape),mxShapeAndroidProgressScrubberDisabled.prototype.customProperties=[{name:"dx",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.3}],mxShapeAndroidProgressScrubberDisabled.prototype.cst={PROGRESS_SCRUBBER_DISABLED:"mxgraph.android.progressScrubberDisabled"},mxShapeAndroidProgressScrubberDisabled.prototype.paintVertexShape=function(e,t,r,o,i){var s=o*Math.max(0,Math.min(o,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e.translate(t,r),e.save(),e.save(),e.setStrokeColor("#444444"),e.begin(),e.moveTo(0,.5*i),e.lineTo(o,.5*i),e.stroke(),e.restore(),e.setShadow(!1),e.setAlpha("0.5"),e.setFillColor("#666666"),e.begin();var a=Math.min(i,.1*o)/2;e.ellipse(s-a,.5*i-a,2*a,2*a),e.fill(),e.restore(),e.setShadow(!1),e.begin(),a=Math.min(i,.1*o)/8,e.ellipse(s-a,.5*i-a,2*a,2*a),e.fill()},mxCellRenderer.registerShape(mxShapeAndroidProgressScrubberDisabled.prototype.cst.PROGRESS_SCRUBBER_DISABLED,mxShapeAndroidProgressScrubberDisabled),mxShapeAndroidProgressScrubberDisabled.prototype.constraints=null,Graph.handleFactory[mxShapeAndroidProgressScrubberDisabled.prototype.cst.PROGRESS_SCRUBBER_DISABLED]=function(e){return[Graph.createHandle(e,["dx"],(function(e){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(e.x+t*e.width,e.y+e.height/2)}),(function(e,t){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(t.x-e.x)/e.width)))/100}))]},mxUtils.extend(mxShapeAndroidProgressScrubberFocused,mxShape),mxShapeAndroidProgressScrubberFocused.prototype.customProperties=[{name:"dx",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.3}],mxShapeAndroidProgressScrubberFocused.prototype.cst={PROGRESS_SCRUBBER_FOCUSED:"mxgraph.android.progressScrubberFocused"},mxShapeAndroidProgressScrubberFocused.prototype.paintVertexShape=function(e,t,r,o,i){var s=o*Math.max(0,Math.min(o,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),a=mxUtils.getValue(this.style,"fillColor","#ffffff");e.translate(t,r),e.save(),e.save(),e.setStrokeColor("#444444"),e.begin(),e.moveTo(0,.5*i),e.lineTo(o,.5*i),e.stroke(),e.restore(),e.setShadow(!1),e.setAlpha("0.75"),e.begin();var n=Math.min(i,.1*o)/2;e.ellipse(s-n,.5*i-n,2*n,2*n),e.fill(),e.restore(),e.setShadow(!1),e.setStrokeColor(a),e.begin(),e.moveTo(0,.5*i),e.lineTo(s,.5*i),e.stroke(),e.begin(),n=Math.min(i,.1*o)/8,e.ellipse(s-n,.5*i-n,2*n,2*n),e.fill()},mxCellRenderer.registerShape(mxShapeAndroidProgressScrubberFocused.prototype.cst.PROGRESS_SCRUBBER_FOCUSED,mxShapeAndroidProgressScrubberFocused),mxShapeAndroidProgressScrubberFocused.prototype.constraints=null,Graph.handleFactory[mxShapeAndroidProgressScrubberFocused.prototype.cst.PROGRESS_SCRUBBER_FOCUSED]=function(e){return[Graph.createHandle(e,["dx"],(function(e){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(e.x+t*e.width,e.y+e.height/2)}),(function(e,t){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(t.x-e.x)/e.width)))/100}))]},mxUtils.extend(mxShapeAndroidProgressScrubberPressed,mxShape),mxShapeAndroidProgressScrubberPressed.prototype.customProperties=[{name:"dx",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.3}],mxShapeAndroidProgressScrubberPressed.prototype.cst={PROGRESS_SCRUBBER_PRESSED:"mxgraph.android.progressScrubberPressed"},mxShapeAndroidProgressScrubberPressed.prototype.paintVertexShape=function(e,t,r,o,i){var s=o*Math.max(0,Math.min(o,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),a=mxUtils.getValue(this.style,"fillColor","#ffffff");e.translate(t,r),e.save(),e.save(),e.setStrokeColor("#444444"),e.begin(),e.moveTo(0,.5*i),e.lineTo(o,.5*i),e.stroke(),e.restore(),e.setShadow(!1),e.setStrokeColor(a),e.setAlpha("0.5"),e.begin();var n=Math.min(i,.1*o)/2;e.ellipse(s-n,.5*i-n,2*n,2*n),e.fillAndStroke(),e.restore(),e.setShadow(!1),e.setStrokeColor(a),e.begin(),e.moveTo(0,.5*i),e.lineTo(s,.5*i),e.stroke(),e.begin(),n=Math.min(i,.1*o)/8,e.ellipse(s-n,.5*i-n,2*n,2*n),e.fill()},mxCellRenderer.registerShape(mxShapeAndroidProgressScrubberPressed.prototype.cst.PROGRESS_SCRUBBER_PRESSED,mxShapeAndroidProgressScrubberPressed),mxShapeAndroidProgressScrubberPressed.prototype.constraints=null,Graph.handleFactory[mxShapeAndroidProgressScrubberPressed.prototype.cst.PROGRESS_SCRUBBER_PRESSED]=function(e){return[Graph.createHandle(e,["dx"],(function(e){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(e.x+t*e.width,e.y+e.height/2)}),(function(e,t){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(t.x-e.x)/e.width)))/100}))]},mxUtils.extend(mxShapeAndroidQuickscroll2,mxShape),mxShapeAndroidQuickscroll2.prototype.customProperties=[{name:"dy",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.5}],mxShapeAndroidQuickscroll2.prototype.cst={QUICKSCROLL:"mxgraph.android.quickscroll2"},mxShapeAndroidQuickscroll2.prototype.paintVertexShape=function(e,t,r,o,i){var s=Math.min(i-20,Math.max(20,i*Math.max(0,Math.min(i,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))))));mxUtils.getValue(this.style,"fillColor","#ffffff"),e.translate(t,r),e.save(),e.save(),e.setStrokeColor("#cccccc"),e.begin(),e.moveTo(o-3,0),e.lineTo(o-3,i),e.stroke(),e.restore(),e.begin(),e.roundrect(o-6,s-10,6,20,1,1),e.fillAndStroke(),e.setFillColor("#cccccc"),e.begin(),e.rect(0,s-20,o-18,40),e.fill(),e.setFillColor("#666666"),e.begin(),e.moveTo(o-18,s-20),e.lineTo(o-6,s),e.lineTo(o-18,s+20),e.close(),e.fill(),e.setFontSize("12"),e.text(.5*(o-18),s,0,0,"Aa",mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)},mxCellRenderer.registerShape(mxShapeAndroidQuickscroll2.prototype.cst.QUICKSCROLL,mxShapeAndroidQuickscroll2),mxShapeAndroidQuickscroll2.prototype.constraints=null,Graph.handleFactory[mxShapeAndroidQuickscroll2.prototype.cst.QUICKSCROLL]=function(e){return[Graph.createHandle(e,["dy"],(function(e){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(e.x+e.width-3,e.y+Math.min(e.height-20,Math.max(20,t*e.height)))}),(function(e,t){this.state.style.dy=Math.round(1e3*Math.max(0,Math.min(1,(t.y-e.y)/e.height)))/1e3}))]},mxUtils.extend(mxShapeAndroidQuickscroll3,mxShape),mxShapeAndroidQuickscroll3.prototype.customProperties=[{name:"dy",dispName:"Handle Position",type:"float",min:0,max:1,defVal:.5}],mxShapeAndroidQuickscroll3.prototype.cst={QUICKSCROLL:"mxgraph.android.quickscroll3"},mxShapeAndroidQuickscroll3.prototype.paintVertexShape=function(e,t,r,o,i){var s=Math.min(i-10,Math.max(10,i*Math.max(0,Math.min(i,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))))));mxUtils.getValue(this.style,"fillColor","#ffffff"),e.translate(t,r),e.save(),e.setStrokeColor("#cccccc"),e.begin(),e.moveTo(.5*o,0),e.lineTo(.5*o,i),e.stroke(),e.restore(),e.begin(),e.roundrect(.5*o-3,s-10,6,20,1,1),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeAndroidQuickscroll3.prototype.cst.QUICKSCROLL,mxShapeAndroidQuickscroll3),mxShapeAndroidQuickscroll3.prototype.constraints=null,Graph.handleFactory[mxShapeAndroidQuickscroll3.prototype.cst.QUICKSCROLL]=function(e){return[Graph.createHandle(e,["dy"],(function(e){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dy",this.dy))));return new mxPoint(e.x+.5*e.width,e.y+Math.min(e.height-10,Math.max(10,t*e.height)))}),(function(e,t){this.state.style.dy=Math.round(1e3*Math.max(0,Math.min(1,(t.y-e.y)/e.height)))/1e3}))]},mxUtils.extend(mxShapeAndroidScrollbars2,mxShape),mxShapeAndroidScrollbars2.prototype.cst={SCROLLBARS:"mxgraph.android.scrollbars2"},mxShapeAndroidScrollbars2.prototype.paintVertexShape=function(e,t,r,o,i){e.translate(t,r),e.begin(),e.rect(o-5,0,5,i-7),e.fillAndStroke(),e.begin(),e.rect(0,i-5,o-7,5),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeAndroidScrollbars2.prototype.cst.SCROLLBARS,mxShapeAndroidScrollbars2),mxShapeAndroidScrollbars2.prototype.constraints=null,mxUtils.extend(mxShapeAndroidSpinner2,mxShape),mxShapeAndroidSpinner2.prototype.cst={SPINNER:"mxgraph.android.spinner2"},mxShapeAndroidSpinner2.prototype.paintVertexShape=function(e,t,r,o,i){e.translate(t,r),e.begin(),e.moveTo(0,i),e.lineTo(o,i),e.stroke();var s=Math.min(o/10,i);e.begin(),e.moveTo(o-s,i),e.lineTo(o,i-s),e.lineTo(o,i),e.close(),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeAndroidSpinner2.prototype.cst.SPINNER,mxShapeAndroidSpinner2),mxShapeAndroidSpinner2.prototype.constraints=null;