UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

1 lines 17.8 kB
function mxShapeGmdlPlayer(e,t,l,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=l,this.strokewidth=null!=a?a:1}function mxShapeGmdlSwitch(e,t,l,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=l,this.strokewidth=null!=a?a:1}function mxShapeGmdlMarginRect(e,t,l,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=l,this.strokewidth=null!=a?a:1}function mxShapeGmdlSliderNormal(e,t,l,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=l,this.strokewidth=null!=a?a:1}function mxShapeGmdlSlider2(e,t,l,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=l,this.strokewidth=null!=a?a:1}function mxShapeGmdlSliderFocused(e,t,l,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=l,this.strokewidth=null!=a?a:1}function mxShapeGmdlSliderDisabled(e,t,l,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=l,this.strokewidth=null!=a?a:1}function mxShapeGmdlSliderDisabled2(e,t,l,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=l,this.strokewidth=null!=a?a:1}function mxShapeGmdlSliderDiscrete(e,t,l,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=l,this.strokewidth=null!=a?a:1}function mxShapeGmdlSliderDiscreteDots(e,t,l,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=l,this.strokewidth=null!=a?a:1}function mxShapeGmdlProgressBar(e,t,l,a){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=l,this.strokewidth=null!=a?a:1,this.dx1=.8}mxUtils.extend(mxShapeGmdlPlayer,mxShape),mxShapeGmdlPlayer.prototype.cst={SHAPE_PLAYER:"mxgraph.gmdl.player"},mxShapeGmdlPlayer.prototype.paintVertexShape=function(e,t,l,a,i){e.translate(t,l),e.begin(),e.rect(0,0,a,i),e.fill(),e.setShadow(!1),this.foreground(e,t,l,a,i)},mxShapeGmdlPlayer.prototype.foreground=function(e,t,l,a,i){i>=4&&(e.setFillColor("#FFED00"),e.begin(),e.rect(0,0,.8*a,4),e.fill()),i>=14&&a>=33&&(e.setFillColor("#717171"),e.begin(),e.rect(a-33,.5*i-7,4,14),e.fill(),e.begin(),e.rect(a-25,.5*i-7,4,14),e.fill())},mxCellRenderer.registerShape(mxShapeGmdlPlayer.prototype.cst.SHAPE_PLAYER,mxShapeGmdlPlayer),mxUtils.extend(mxShapeGmdlSwitch,mxShape),mxShapeGmdlSwitch.prototype.cst={SHAPE_SWITCH:"mxgraph.gmdl.switch",STATE:"switchState",STATE_ON:"on",STATE_OFF:"off"},mxShapeGmdlSwitch.prototype.customProperties=[{name:"switchState",dispName:"State",type:"enum",defVal:"on",enumList:[{val:"on",dispName:"On"},{val:"off",dispName:"Off"}]}],mxShapeGmdlSwitch.prototype.paintVertexShape=function(e,t,l,a,i){e.translate(t,l);var r=mxUtils.getValue(this.style,mxShapeGmdlSwitch.prototype.cst.STATE,mxShapeGmdlSwitch.prototype.cst.STATE_ON);this.background(e,t,l,a,i,r),e.setShadow(!0),this.foreground(e,t,l,a,i,r)},mxShapeGmdlSwitch.prototype.background=function(e,t,l,a,i,r){e.begin(),r===mxShapeGmdlSwitch.prototype.cst.STATE_ON?(e.save(),e.setAlpha("0.5"),e.moveTo(.135*a,.8*i),e.arcTo(.135*a,.3*i,0,0,1,.135*a,.2*i),e.lineTo(.675*a,.2*i),e.arcTo(.135*a,.3*i,0,0,1,.675*a,.8*i),e.close(),e.fillAndStroke(),e.restore()):(e.setFillColor("#BCBBBB"),e.moveTo(.225*a,.8*i),e.arcTo(.135*a,.3*i,0,0,1,.225*a,.2*i),e.lineTo(.865*a,.2*i),e.arcTo(.135*a,.3*i,0,0,1,.865*a,.8*i),e.close(),e.fillAndStroke())},mxShapeGmdlSwitch.prototype.foreground=function(e,t,l,a,i,r){e.begin(),r===mxShapeGmdlSwitch.prototype.cst.STATE_ON?e.ellipse(.36*a,0,.64*a,i):(e.setFillColor("#F1F1F1"),e.ellipse(0,0,.64*a,i)),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeGmdlSwitch.prototype.cst.SHAPE_SWITCH,mxShapeGmdlSwitch),mxUtils.extend(mxShapeGmdlMarginRect,mxShape),mxShapeGmdlMarginRect.prototype.cst={SHAPE_MARGIN_RECT:"mxgraph.gmdl.marginRect",MARGIN:"rectMargin",MARGIN_TOP:"rectMarginTop",MARGIN_LEFT:"rectMarginLeft",MARGIN_BOTTOM:"rectMarginBottom",MARGIN_RIGHT:"rectMarginRight"},mxShapeGmdlMarginRect.prototype.customProperties=[{name:"rectMargin",dispName:"Margin",type:"float",min:0,defVal:0},{name:"rectMarginTop",dispName:"Margin Top",type:"float",defVal:0},{name:"rectMarginLeft",dispName:"Margin Left",type:"float",defVal:0},{name:"rectMarginBottom",dispName:"Margin Bottom",type:"float",defVal:0},{name:"rectMarginRight",dispName:"Margin Right",type:"float",defVal:0}],mxShapeGmdlMarginRect.prototype.paintVertexShape=function(e,t,l,a,i){e.translate(t,l),this.background(e,t,l,a,i)},mxShapeGmdlMarginRect.prototype.background=function(e,t,l,a,i,r){var o=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlMarginRect.prototype.cst.MARGIN,"0")),s=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlMarginRect.prototype.cst.MARGIN_TOP,"0")),m=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlMarginRect.prototype.cst.MARGIN_LEFT,"0")),n=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlMarginRect.prototype.cst.MARGIN_BOTTOM,"0")),p=o+m,d=o+s,h=a-parseFloat(mxUtils.getValue(this.style,mxShapeGmdlMarginRect.prototype.cst.MARGIN_RIGHT,"0"))-p-o,S=i-n-d-o;h>0&&S>0&&(e.begin(),e.rect(p,d,h,S),e.fillAndStroke())},mxCellRenderer.registerShape(mxShapeGmdlMarginRect.prototype.cst.SHAPE_MARGIN_RECT,mxShapeGmdlMarginRect),mxUtils.extend(mxShapeGmdlSliderNormal,mxShape),mxShapeGmdlSliderNormal.prototype.cst={SHAPE_SLIDER_NORMAL:"mxgraph.gmdl.sliderNormal",HANDLE_SIZE:"handleSize"},mxShapeGmdlSliderNormal.prototype.customProperties=[{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:10}],mxShapeGmdlSliderNormal.prototype.paintVertexShape=function(e,t,l,a,i){e.translate(t,l),this.background(e,t,l,a,i),e.setShadow(!0)},mxShapeGmdlSliderNormal.prototype.background=function(e,t,l,a,i){var r=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderNormal.prototype.cst.HANDLE_SIZE,"10"));e.ellipse(0,.5*i-.5*r,r,r),e.stroke(),e.begin(),e.moveTo(r,.5*i),e.lineTo(a,.5*i),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeGmdlSliderNormal.prototype.cst.SHAPE_SLIDER_NORMAL,mxShapeGmdlSliderNormal),mxUtils.extend(mxShapeGmdlSlider2,mxShape),mxShapeGmdlSlider2.prototype.cst={SHAPE_SLIDER:"mxgraph.gmdl.slider2",BAR_POS:"barPos",HANDLE_SIZE:"handleSize"},mxShapeGmdlSlider2.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"float",min:0,defVal:40},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:10}],mxShapeGmdlSlider2.prototype.paintVertexShape=function(e,t,l,a,i){e.translate(t,l),this.background(e,t,l,a,i),e.setShadow(!0)},mxShapeGmdlSlider2.prototype.background=function(e,t,l,a,i){var r=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSlider2.prototype.cst.HANDLE_SIZE,"10")),o=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSlider2.prototype.cst.BAR_POS,"40"))/100;o=Math.max(0,Math.min(1,o)),e.save(),e.setStrokeColor("#bbbbbb"),e.begin(),e.moveTo(0,.5*i),e.lineTo(a,.5*i),e.fillAndStroke(),e.restore(),e.begin(),e.moveTo(0,.5*i),e.lineTo(o*a,.5*i),e.fillAndStroke(),e.begin(),e.ellipse(o*a-.5*r,.5*i-.5*r,r,r),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeGmdlSlider2.prototype.cst.SHAPE_SLIDER,mxShapeGmdlSlider2),mxShapeGmdlSlider2.prototype.constraints=null,Graph.handleFactory[mxShapeGmdlSlider2.prototype.cst.SHAPE_SLIDER]=function(e){return[Graph.createHandle(e,["barPos"],(function(e){var t=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",.4))));return new mxPoint(e.x+t*e.width/100,e.y+e.height/2)}),(function(e,t){this.state.style.barPos=Math.round(100*Math.max(0,Math.min(100,100*(t.x-e.x)/e.width)))/100}))]},mxUtils.extend(mxShapeGmdlSliderFocused,mxShape),mxShapeGmdlSliderFocused.prototype.cst={SHAPE_SLIDER_FOCUSED:"mxgraph.gmdl.sliderFocused",BAR_POS:"barPos",HANDLE_SIZE:"handleSize"},mxShapeGmdlSliderFocused.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"float",min:0,defVal:40},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:10}],mxShapeGmdlSliderFocused.prototype.paintVertexShape=function(e,t,l,a,i){e.translate(t,l),this.background(e,t,l,a,i),e.setShadow(!0)},mxShapeGmdlSliderFocused.prototype.background=function(e,t,l,a,i){var r=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderFocused.prototype.cst.HANDLE_SIZE,"10")),o=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderFocused.prototype.cst.BAR_POS,"40"))/100,s=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#ffffff");o=Math.max(0,Math.min(1,o)),e.save(),e.setStrokeColor("#bbbbbb"),e.begin(),e.moveTo(0,.5*i),e.lineTo(a,.5*i),e.fillAndStroke(),e.restore(),e.begin(),e.moveTo(0,.5*i),e.lineTo(o*a,.5*i),e.fillAndStroke(),e.begin(),e.ellipse(o*a-.167*r,.5*i-.167*r,.33*r,.33*r),e.fillAndStroke(),e.setFillColor(s),e.setAlpha(.15),e.begin(),e.ellipse(o*a-.5*r,.5*i-.5*r,r,r),e.fill()},mxCellRenderer.registerShape(mxShapeGmdlSliderFocused.prototype.cst.SHAPE_SLIDER_FOCUSED,mxShapeGmdlSliderFocused),mxShapeGmdlSliderFocused.prototype.constraints=null,Graph.handleFactory[mxShapeGmdlSliderFocused.prototype.cst.SHAPE_SLIDER_FOCUSED]=function(e){return[Graph.createHandle(e,["barPos"],(function(e){var t=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",.4))));return new mxPoint(e.x+t*e.width/100,e.y+e.height/2)}),(function(e,t){this.state.style.barPos=Math.round(100*Math.max(0,Math.min(100,100*(t.x-e.x)/e.width)))/100}))]},mxUtils.extend(mxShapeGmdlSliderDisabled,mxShape),mxShapeGmdlSliderDisabled.prototype.cst={SHAPE_SLIDER_DISABLED:"mxgraph.gmdl.sliderDisabled",HANDLE_POSITION:"hPos",HANDLE_SIZE:"handleSize"},mxShapeGmdlSliderDisabled.prototype.customProperties=[{name:"hPos",dispName:"Handle Position",type:"float",min:0,defVal:40},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:10}],mxShapeGmdlSliderDisabled.prototype.paintVertexShape=function(e,t,l,a,i){e.translate(t,l),this.background(e,t,l,a,i),e.setShadow(!0)},mxShapeGmdlSliderDisabled.prototype.background=function(e,t,l,a,i){var r=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDisabled.prototype.cst.HANDLE_SIZE,"10")),o=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDisabled.prototype.cst.HANDLE_POSITION,"50"))/100;o=Math.max(o,0),o=Math.min(o,1),e.ellipse(a*o-.5*r,.5*(i-r),r,r),e.fillAndStroke();var s=a*o-7,m=a*o+7;s>0&&(e.begin(),e.moveTo(0,.5*i),e.lineTo(s,.5*i),e.stroke()),m<a&&(e.begin(),e.moveTo(m,.5*i),e.lineTo(a,.5*i),e.stroke())},mxCellRenderer.registerShape(mxShapeGmdlSliderDisabled.prototype.cst.SHAPE_SLIDER_DISABLED,mxShapeGmdlSliderDisabled),mxUtils.extend(mxShapeGmdlSliderDisabled2,mxShape),mxShapeGmdlSliderDisabled2.prototype.cst={SHAPE_SLIDER_DISABLED:"mxgraph.gmdl.sliderDisabled2",HANDLE_POSITION:"hPos",HANDLE_SIZE:"handleSize"},mxShapeGmdlSliderDisabled2.prototype.customProperties=[{name:"hPos",dispName:"Handle Position",type:"float",min:0,defVal:"40"},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:"10"}],mxShapeGmdlSliderDisabled2.prototype.paintVertexShape=function(e,t,l,a,i){e.translate(t,l),this.background(e,t,l,a,i),e.setShadow(!0)},mxShapeGmdlSliderDisabled2.prototype.background=function(e,t,l,a,i){var r=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDisabled2.prototype.cst.HANDLE_SIZE,"10")),o=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDisabled2.prototype.cst.HANDLE_POSITION,"50"))/100;o=Math.min(Math.max(o,0),1),e.ellipse(a*o-.5*r,.5*(i-r),r,r),e.fillAndStroke();var s=a*o-7,m=a*o+7;s>0&&(e.begin(),e.moveTo(0,.5*i),e.lineTo(s,.5*i),e.stroke()),m<a&&(e.begin(),e.moveTo(m,.5*i),e.lineTo(a,.5*i),e.stroke())},mxCellRenderer.registerShape(mxShapeGmdlSliderDisabled2.prototype.cst.SHAPE_SLIDER_DISABLED,mxShapeGmdlSliderDisabled2),mxShapeGmdlSlider2.prototype.constraints=null,Graph.handleFactory[mxShapeGmdlSliderDisabled2.prototype.cst.SHAPE_SLIDER_DISABLED]=function(e){return[Graph.createHandle(e,["hPos"],(function(e){var t=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"hPos",.4))));return new mxPoint(e.x+t*e.width/100,e.y+e.height/2)}),(function(e,t){this.state.style.hPos=Math.round(100*Math.max(0,Math.min(100,100*(t.x-e.x)/e.width)))/100}))]},mxUtils.extend(mxShapeGmdlSliderDiscrete,mxShape),mxShapeGmdlSliderDiscrete.prototype.cst={SHAPE_DISCRETE:"mxgraph.gmdl.sliderDiscrete",BAR_POS:"barPos",HANDLE_SIZE:"handleSize"},mxShapeGmdlSliderDiscrete.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"int",min:0,defVal:"40"},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:"10"}],mxShapeGmdlSliderDiscrete.prototype.paintVertexShape=function(e,t,l,a,i){e.translate(t,l),this.background(e,t,l,a,i),e.setShadow(!0)},mxShapeGmdlSliderDiscrete.prototype.background=function(e,t,l,a,i){parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDiscrete.prototype.cst.HANDLE_SIZE,"10"));var r=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDiscrete.prototype.cst.BAR_POS,"40"))/100,o=parseFloat(mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"12")),s=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,"#000000");r=Math.max(0,Math.min(1,r)),e.save(),e.setStrokeColor("#bbbbbb"),e.begin(),e.moveTo(0,.5*i+22.5),e.lineTo(a,.5*i+22.5),e.fillAndStroke(),e.restore(),e.begin(),e.moveTo(0,.5*i+22.5),e.lineTo(r*a,.5*i+22.5),e.fillAndStroke(),e.begin(),e.moveTo(r*a,.5*i+15.5),e.lineTo(r*a-10.5,.5*i+2.5),e.arcTo(15,15,0,0,1,r*a,.5*i-22.5),e.arcTo(15,15,0,0,1,r*a+10.5,.5*i+2.5),e.close(),e.fillAndStroke(),e.setFontSize(o),e.setFontColor(s);var m=Math.round(100*r);e.text(r*a,.5*i-9,0,0,m.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)},mxCellRenderer.registerShape(mxShapeGmdlSliderDiscrete.prototype.cst.SHAPE_DISCRETE,mxShapeGmdlSliderDiscrete),mxShapeGmdlSliderDiscrete.prototype.constraints=null,Graph.handleFactory[mxShapeGmdlSliderDiscrete.prototype.cst.SHAPE_DISCRETE]=function(e){return[Graph.createHandle(e,["barPos"],(function(e){var t=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",.4))));return new mxPoint(e.x+t*e.width/100,e.y+e.height/2+22.5)}),(function(e,t){this.state.style.barPos=Math.round(100*Math.max(0,Math.min(100,100*(t.x-e.x)/e.width)))/100}))]},mxUtils.extend(mxShapeGmdlSliderDiscreteDots,mxShape),mxShapeGmdlSliderDiscreteDots.prototype.cst={SHAPE_DISCRETE_DOTS:"mxgraph.gmdl.sliderDiscreteDots",BAR_POS:"barPos",HANDLE_SIZE:"handleSize"},mxShapeGmdlSliderDiscreteDots.prototype.customProperties=[{name:"barPos",dispName:"Handle Position",type:"int",min:0,defVal:"40"},{name:"handleSize",dispName:"Handle Size",type:"float",min:0,defVal:"10"}],mxShapeGmdlSliderDiscreteDots.prototype.paintVertexShape=function(e,t,l,a,i){e.translate(t,l),this.background(e,t,l,a,i),e.setShadow(!0)},mxShapeGmdlSliderDiscreteDots.prototype.background=function(e,t,l,a,i){parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDiscreteDots.prototype.cst.HANDLE_SIZE,"10"));var r=parseFloat(mxUtils.getValue(this.style,mxShapeGmdlSliderDiscreteDots.prototype.cst.BAR_POS,"40"))/100,o=parseFloat(mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,"12")),s=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,"#000000"),m=mxUtils.getValue(this.style,"bright","1");r=Math.max(0,Math.min(1,r)),e.save(),e.setStrokeColor("#bebebe"),e.begin(),e.moveTo(0,.5*i+22.5),e.lineTo(a,.5*i+22.5),e.fillAndStroke(),e.restore(),r<=.1&&e.setFillColor("#bebebe"),e.begin(),e.moveTo(0,.5*i+22.5),e.lineTo(r*a,.5*i+22.5),e.fillAndStroke(),e.begin(),e.moveTo(r*a,.5*i+15.5),e.lineTo(r*a-10.5,.5*i+2.5),e.arcTo(15,15,0,0,1,r*a,.5*i-22.5),e.arcTo(15,15,0,0,1,r*a+10.5,.5*i+2.5),e.close(),e.fill(),"1"==m?e.setFillColor("#000000"):e.setFillColor("#ffffff"),e.ellipse(-1.5,.5*i+21,3,3),e.fill(),e.ellipse(.2*a-1.5,.5*i+21,3,3),e.fill(),e.ellipse(.4*a-1.5,.5*i+21,3,3),e.fill(),e.ellipse(.6*a-1.5,.5*i+21,3,3),e.fill(),e.ellipse(.8*a-1.5,.5*i+21,3,3),e.fill(),e.ellipse(a-1.5,.5*i+21,3,3),e.fill(),e.setFontSize(o),e.setFontColor(s);var n=Math.round(100*r);e.text(r*a,.5*i-9,0,0,n.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0)},mxCellRenderer.registerShape(mxShapeGmdlSliderDiscreteDots.prototype.cst.SHAPE_DISCRETE_DOTS,mxShapeGmdlSliderDiscreteDots),mxShapeGmdlSliderDiscreteDots.prototype.constraints=null,Graph.handleFactory[mxShapeGmdlSliderDiscreteDots.prototype.cst.SHAPE_DISCRETE_DOTS]=function(e){return[Graph.createHandle(e,["barPos"],(function(e){var t=Math.max(0,Math.min(e.width,parseFloat(mxUtils.getValue(this.state.style,"barPos",.4))));return new mxPoint(e.x+t*e.width/100,e.y+e.height/2+22.5)}),(function(e,t){this.state.style.barPos=Math.round(.05*Math.max(0,Math.min(100,100*(t.x-e.x)/e.width)))/.05}))]},mxUtils.extend(mxShapeGmdlProgressBar,mxShape),mxShapeGmdlProgressBar.prototype.cst={PROGRESS_BAR:"mxgraph.gmdl.progressBar"},mxShapeGmdlProgressBar.prototype.customProperties=[{name:"dx1",dispName:"Handle Position",type:"int",min:0,defVal:.8}],mxShapeGmdlProgressBar.prototype.paintVertexShape=function(e,t,l,a,i){var r=a*Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.style,"dx1",this.dx1))));e.translate(t,l),e.save(),e.setStrokeColor("#aaaaaa"),e.begin(),e.moveTo(0,.5*i),e.lineTo(a,.5*i),e.stroke(),e.restore(),e.setShadow(!1),e.begin(),e.moveTo(0,.5*i),e.lineTo(r,.5*i),e.stroke()},mxCellRenderer.registerShape(mxShapeGmdlProgressBar.prototype.cst.PROGRESS_BAR,mxShapeGmdlProgressBar),mxShapeGmdlProgressBar.prototype.constraints=null,Graph.handleFactory[mxShapeGmdlProgressBar.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}))],l=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(l),t};