/**
* Joint 0.4 - JavaScript diagramming library.
* Copyright (c) David Durman 2009 - 2011
* Licensed under the MIT license: (http://www.opensource.org/licenses/mit-license.php)
*/(function(c){var b=c.Joint;c=b.dia.Element;var f=b.point,d=b.dia.fsa={};d.arrow={startArrow:{type:"none"},endArrow:{type:"basic",size:5},attrs:{"stroke-dasharray":"none"}};d.State=c.extend({object:"State",module:"fsa",init:function(a){a=b.DeepSupplement(this.properties,a,{position:f(0,0),radius:30,label:"State",labelOffsetX:15,labelOffsetY:23,attrs:{fill:"white"}});this.setWrapper(this.paper.circle(a.position.x,a.position.y,a.radius).attr(a.attrs));this.addInner(this.getLabelElement())},getLabelElement:function(){var a= this.properties,e=this.wrapper.getBBox(),g=this.paper.text(e.x,e.y,a.label),h=g.getBBox();g.translate(e.x-h.x+a.labelOffsetX,e.y-h.y+a.labelOffsetY);return g}});d.StartState=c.extend({object:"StartState",module:"fsa",init:function(a){a=b.DeepSupplement(this.properties,a,{position:f(0,0),radius:10,attrs:{fill:"black"}});this.setWrapper(this.paper.circle(a.position.x,a.position.y,a.radius).attr(a.attrs))}});d.EndState=c.extend({object:"EndState",module:"fsa",init:function(a){a=b.DeepSupplement(this.properties, a,{position:f(0,0),radius:10,innerRadius:a.radius&&a.radius/2||5,attrs:{fill:"white"},innerAttrs:{fill:"black"}});this.setWrapper(this.paper.circle(a.position.x,a.position.y,a.radius).attr(a.attrs));this.addInner(this.paper.circle(a.position.x,a.position.y,a.innerRadius).attr(a.innerAttrs))},zoom:function(){this.inner[0].scale.apply(this.inner[0],arguments)}})})(this);