<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
.KEYW {color: yellow;}
.COMM {color: #bbb; font-style: italic;}
.NUMB {color: #393;}
.STRN {color: #393;}
.REGX {color: #339;}
.NAME {color: white;}
.PUNC {color: #5ca29c;}
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
</style></head><body><pre><span class='line'> 1</span> <span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">global</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// BEGIN CLOSURE</span><span class="WHIT">
<span class='line'> 2</span>
<span class='line'> 3</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">Joint</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">global.Joint</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 4</span> </span><span class="WHIT"> </span><span class="NAME">Element</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Joint.dia.Element</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 5</span> </span><span class="WHIT"> </span><span class="NAME">point</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Joint.point</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 6</span>
<span class='line'> 7</span> </span><span class="COMM">/**
<span class='line'> 8</span> * @name Joint.dia.fsa
<span class='line'> 9</span> * @namespace Holds functionality related to FSA diagrams.
<span class='line'> 10</span> */</span><span class="WHIT">
<span class='line'> 11</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">fsa</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Joint.dia.fsa</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 12</span>
<span class='line'> 13</span> </span><span class="COMM">/**
<span class='line'> 14</span> * Predefined arrow. You are free to use this arrow as the option parameter to joint method.
<span class='line'> 15</span> * @name arrow
<span class='line'> 16</span> * @memberOf Joint.dia.fsa
<span class='line'> 17</span> * @example
<span class='line'> 18</span> * var arrow = Joint.dia.fsa.arrow;
<span class='line'> 19</span> * s1.joint(s2, (arrow.label = "anEvent", arrow));
<span class='line'> 20</span> */</span><span class="WHIT">
<span class='line'> 21</span> </span><span class="NAME">fsa.arrow</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 22</span> </span><span class="WHIT"> </span><span class="NAME">startArrow</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">type</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"none"</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 23</span> </span><span class="WHIT"> </span><span class="NAME">endArrow</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">type</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"basic"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">size</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="STRN">"stroke-dasharray"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"none"</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 26</span>
<span class='line'> 27</span> </span><span class="COMM">/**
<span class='line'> 28</span> * Finite state machine state.
<span class='line'> 29</span> * @name State.create
<span class='line'> 30</span> * @methodOf Joint.dia.fsa
<span class='line'> 31</span> * @param {Object} properties
<span class='line'> 32</span> * @param {Object} properties.position Position of the State (e.g. {x: 50, y: 100}).
<span class='line'> 33</span> * @param {Number} [properties.radius] Radius of the circle of the state.
<span class='line'> 34</span> * @param {String} [properties.label] The name of the state.
<span class='line'> 35</span> * @param {Number} [properties.labelOffsetX] Offset in x-axis of the label from the state circle origin.
<span class='line'> 36</span> * @param {Number} [properties.labelOffsetY] Offset in y-axis of the label from the state circle origin.
<span class='line'> 37</span> * @param {Object} [properties.attrs] SVG attributes of the appearance of the state.
<span class='line'> 38</span> * @example
<span class='line'> 39</span> var s1 = Joint.dia.fsa.State.create({
<span class='line'> 40</span> position: {x: 120, y: 70},
<span class='line'> 41</span> label: "state 1",
<span class='line'> 42</span> radius: 40,
<span class='line'> 43</span> attrs: {
<span class='line'> 44</span> stroke: "blue",
<span class='line'> 45</span> fill: "yellow"
<span class='line'> 46</span> }
<span class='line'> 47</span> });
<span class='line'> 48</span> */</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="NAME">fsa.State</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Element.extend</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="WHIT"> </span><span class="NAME">object</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"State"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="NAME">module</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"fsa"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="NAME">init</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">properties</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 53</span> </span><span class="WHIT"> </span><span class="COMM">// options</span><span class="WHIT">
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Joint.DeepSupplement</span><span class="PUNC">(</span><span class="NAME">this.properties</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">properties</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 55</span> </span><span class="WHIT"> </span><span class="NAME">position</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">point</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 56</span> </span><span class="WHIT"> </span><span class="NAME">radius</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">30</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 57</span> </span><span class="WHIT"> </span><span class="NAME">label</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'State'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="WHIT"> </span><span class="NAME">labelOffsetX</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">30</span><span class="PUNC">/</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 59</span> </span><span class="WHIT"> </span><span class="NAME">labelOffsetY</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">30</span><span class="PUNC">/</span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">8</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 60</span> </span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">fill</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'white'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="COMM">// wrapper</span><span class="WHIT">
<span class='line'> 63</span> </span><span class="WHIT"> </span><span class="NAME">this.setWrapper</span><span class="PUNC">(</span><span class="NAME">this.paper.circle</span><span class="PUNC">(</span><span class="NAME">p.position.x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">p.position.y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">p.radius</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="NAME">p.attrs</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 64</span> </span><span class="WHIT"> </span><span class="COMM">// inner</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT"> </span><span class="NAME">this.addInner</span><span class="PUNC">(</span><span class="NAME">this.getLabelElement</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 66</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="NAME">getLabelElement</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.properties</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT"> </span><span class="NAME">bb</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.wrapper.getBBox</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT"> </span><span class="NAME">t</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.paper.text</span><span class="PUNC">(</span><span class="NAME">bb.x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">bb.y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">p.label</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="NAME">tbb</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">t.getBBox</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT"> </span><span class="NAME">t.translate</span><span class="PUNC">(</span><span class="NAME">bb.x</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">tbb.x</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">p.labelOffsetX</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT"> </span><span class="NAME">bb.y</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">tbb.y</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">p.labelOffsetY</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">t</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 78</span>
<span class='line'> 79</span> </span><span class="COMM">/**
<span class='line'> 80</span> * Finite state machine start state.
<span class='line'> 81</span> * @name StartState.create
<span class='line'> 82</span> * @methodOf Joint.dia.fsa
<span class='line'> 83</span> * @param {Object} properties
<span class='line'> 84</span> * @param {Object} properties.position Position of the start state (e.g. {x: 50, y: 100}).
<span class='line'> 85</span> * @param {Number} [properties.radius] Radius of the circle of the start state.
<span class='line'> 86</span> * @param {Object} [properties.attrs] SVG attributes of the appearance of the start state.
<span class='line'> 87</span> * @example
<span class='line'> 88</span> var s0 = Joint.dia.fsa.StartState.create({
<span class='line'> 89</span> position: {x: 120, y: 70},
<span class='line'> 90</span> radius: 15,
<span class='line'> 91</span> attrs: {
<span class='line'> 92</span> stroke: "blue",
<span class='line'> 93</span> fill: "yellow"
<span class='line'> 94</span> }
<span class='line'> 95</span> });
<span class='line'> 96</span> */</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="NAME">fsa.StartState</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Element.extend</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 98</span> </span><span class="WHIT"> </span><span class="NAME">object</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"StartState"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="WHIT"> </span><span class="NAME">module</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"fsa"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT"> </span><span class="NAME">init</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">properties</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT"> </span><span class="COMM">// options</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Joint.DeepSupplement</span><span class="PUNC">(</span><span class="NAME">this.properties</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">properties</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT"> </span><span class="NAME">position</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">point</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>104</span> </span><span class="WHIT"> </span><span class="NAME">radius</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">fill</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'black'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT"> </span><span class="COMM">// wrapper</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT"> </span><span class="NAME">this.setWrapper</span><span class="PUNC">(</span><span class="NAME">this.paper.circle</span><span class="PUNC">(</span><span class="NAME">p.position.x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">p.position.y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">p.radius</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="NAME">p.attrs</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>110</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>111</span>
<span class='line'>112</span> </span><span class="COMM">/**
<span class='line'>113</span> * Finite state machine end state.
<span class='line'>114</span> * @name EndState.create
<span class='line'>115</span> * @methodOf Joint.dia.fsa
<span class='line'>116</span> * @param {Object} properties
<span class='line'>117</span> * @param {Object} properties.position Position of the end state (e.g. {x: 50, y: 100}).
<span class='line'>118</span> * @param {Number} [properties.radius] Radius of the circle of the end state.
<span class='line'>119</span> * @param {Number} [properties.innerRadius] Radius of the inner circle of the end state.
<span class='line'>120</span> * @param {Object} [properties.attrs] SVG attributes of the appearance of the end state.
<span class='line'>121</span> * @param {Object} [properties.innerAttrs] SVG attributes of the appearance of the inner circle of the end state.
<span class='line'>122</span> * @example
<span class='line'>123</span> var s0 = Joint.dia.fsa.EndState.create({
<span class='line'>124</span> position: {x: 120, y: 70},
<span class='line'>125</span> radius: 15,
<span class='line'>126</span> innerRadius: 8,
<span class='line'>127</span> attrs: {
<span class='line'>128</span> stroke: "blue",
<span class='line'>129</span> fill: "yellow"
<span class='line'>130</span> },
<span class='line'>131</span> innerAttrs: {
<span class='line'>132</span> fill: "red"
<span class='line'>133</span> }
<span class='line'>134</span> });
<span class='line'>135</span> */</span><span class="WHIT">
<span class='line'>136</span> </span><span class="NAME">fsa.EndState</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Element.extend</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT"> </span><span class="NAME">object</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"EndState"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT"> </span><span class="NAME">module</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"fsa"</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT"> </span><span class="NAME">init</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">properties</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT"> </span><span class="COMM">// options</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Joint.DeepSupplement</span><span class="PUNC">(</span><span class="NAME">this.properties</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">properties</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT"> </span><span class="NAME">position</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">point</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>143</span> </span><span class="WHIT"> </span><span class="NAME">radius</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">10</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>144</span> </span><span class="WHIT"> </span><span class="NAME">innerRadius</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">properties.radius</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">properties.radius</span><span class="WHIT"> </span><span class="PUNC">/</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NUMB">5</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>145</span> </span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">fill</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'white'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>146</span> </span><span class="WHIT"> </span><span class="NAME">innerAttrs</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">fill</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'black'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>147</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>148</span> </span><span class="WHIT"> </span><span class="COMM">// wrapper</span><span class="WHIT">
<span class='line'>149</span> </span><span class="WHIT"> </span><span class="NAME">this.setWrapper</span><span class="PUNC">(</span><span class="NAME">this.paper.circle</span><span class="PUNC">(</span><span class="NAME">p.position.x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">p.position.y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">p.radius</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="NAME">p.attrs</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>150</span> </span><span class="WHIT"> </span><span class="COMM">// inner</span><span class="WHIT">
<span class='line'>151</span> </span><span class="WHIT"> </span><span class="NAME">this.addInner</span><span class="PUNC">(</span><span class="NAME">this.paper.circle</span><span class="PUNC">(</span><span class="NAME">p.position.x</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">p.position.y</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">p.innerRadius</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="NAME">p.innerAttrs</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>152</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT"> </span><span class="NAME">zoom</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>154</span> </span><span class="WHIT"> </span><span class="NAME">this.inner</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">scale.apply</span><span class="PUNC">(</span><span class="NAME">this.inner</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>155</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>156</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>157</span>
<span class='line'>158</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// END CLOSURE</span><span class="WHIT">
<span class='line'>159</span> </span></pre></body></html>