Commit 609fffbbf9ea14f761d3bf487f21ccc16850a0cd

Authored by ww
1 parent 135caac0

chore: 格式化代码

@@ -9,8 +9,7 @@ @@ -9,8 +9,7 @@
9 /** 9 /**
10 * Extends mxShape. 10 * Extends mxShape.
11 */ 11 */
12 -function mxShapeArrows2Arrow(bounds, fill, stroke, strokewidth)  
13 -{ 12 +function mxShapeArrows2Arrow(bounds, fill, stroke, strokewidth) {
14 mxShape.call(this); 13 mxShape.call(this);
15 this.bounds = bounds; 14 this.bounds = bounds;
16 this.fill = fill; 15 this.fill = fill;
@@ -27,15 +26,15 @@ function mxShapeArrows2Arrow(bounds, fill, stroke, strokewidth) @@ -27,15 +26,15 @@ function mxShapeArrows2Arrow(bounds, fill, stroke, strokewidth)
27 mxUtils.extend(mxShapeArrows2Arrow, mxActor); 26 mxUtils.extend(mxShapeArrows2Arrow, mxActor);
28 27
29 mxShapeArrows2Arrow.prototype.customProperties = [ 28 mxShapeArrows2Arrow.prototype.customProperties = [
30 - {name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 40},  
31 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, max:1, defVal: 0.6},  
32 - {name: 'notch', dispName: 'Notch', type: 'float', min:0, defVal: 0},  
33 - {name: 'headCrossline', dispName: 'Head Crossline', type: 'bool', defVal: false},  
34 - {name: 'tailCrossline', dispName: 'Tail Crossline', type: 'bool', defVal: false} 29 + { name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 40 },
  30 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, max: 1, defVal: 0.6 },
  31 + { name: 'notch', dispName: 'Notch', type: 'float', min: 0, defVal: 0 },
  32 + { name: 'headCrossline', dispName: 'Head Crossline', type: 'bool', defVal: false },
  33 + { name: 'tailCrossline', dispName: 'Tail Crossline', type: 'bool', defVal: false }
35 ]; 34 ];
36 35
37 mxShapeArrows2Arrow.prototype.cst = { 36 mxShapeArrows2Arrow.prototype.cst = {
38 - ARROW : 'mxgraph.arrows2.arrow' 37 + ARROW: 'mxgraph.arrows2.arrow'
39 }; 38 };
40 39
41 /** 40 /**
@@ -43,8 +42,7 @@ mxShapeArrows2Arrow.prototype.cst = { @@ -43,8 +42,7 @@ mxShapeArrows2Arrow.prototype.cst = {
43 * 42 *
44 * Paints the vertex shape. 43 * Paints the vertex shape.
45 */ 44 */
46 -mxShapeArrows2Arrow.prototype.paintVertexShape = function(c, x, y, w, h)  
47 -{ 45 +mxShapeArrows2Arrow.prototype.paintVertexShape = function (c, x, y, w, h) {
48 c.translate(x, y); 46 c.translate(x, y);
49 47
50 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 48 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -64,19 +62,17 @@ mxShapeArrows2Arrow.prototype.paintVertexShape = function(c, x, y, w, h) @@ -64,19 +62,17 @@ mxShapeArrows2Arrow.prototype.paintVertexShape = function(c, x, y, w, h)
64 c.lineTo(notch, h * 0.5); 62 c.lineTo(notch, h * 0.5);
65 c.close(); 63 c.close();
66 c.fillAndStroke(); 64 c.fillAndStroke();
67 - 65 +
68 c.setShadow(false); 66 c.setShadow(false);
69 -  
70 - if (headCrossline)  
71 - { 67 +
  68 + if (headCrossline) {
72 c.begin(); 69 c.begin();
73 c.moveTo(w - dx, dy); 70 c.moveTo(w - dx, dy);
74 c.lineTo(w - dx, h - dy); 71 c.lineTo(w - dx, h - dy);
75 c.stroke(); 72 c.stroke();
76 } 73 }
77 -  
78 - if (tailCrossline)  
79 - { 74 +
  75 + if (tailCrossline) {
80 c.begin(); 76 c.begin();
81 c.moveTo(notch, dy); 77 c.moveTo(notch, dy);
82 c.lineTo(notch, h - dy); 78 c.lineTo(notch, h - dy);
@@ -84,99 +80,83 @@ mxShapeArrows2Arrow.prototype.paintVertexShape = function(c, x, y, w, h) @@ -84,99 +80,83 @@ mxShapeArrows2Arrow.prototype.paintVertexShape = function(c, x, y, w, h)
84 } 80 }
85 }; 81 };
86 82
87 -mxShapeArrows2Arrow.prototype.getLabelBounds = function(rect)  
88 -{  
89 - if (mxUtils.getValue(this.style, 'boundedLbl', false))  
90 - { 83 +mxShapeArrows2Arrow.prototype.getLabelBounds = function (rect) {
  84 + if (mxUtils.getValue(this.style, 'boundedLbl', false)) {
91 var w = rect.width; 85 var w = rect.width;
92 var h = rect.height; 86 var h = rect.height;
93 - 87 +
94 var dy, dx; 88 var dy, dx;
95 var direction = this.direction || mxConstants.DIRECTION_EAST; 89 var direction = this.direction || mxConstants.DIRECTION_EAST;
96 -  
97 - if (mxUtils.getValue(this.style, 'flipH', false))  
98 - { 90 +
  91 + if (mxUtils.getValue(this.style, 'flipH', false)) {
99 if (direction == mxConstants.DIRECTION_WEST) 92 if (direction == mxConstants.DIRECTION_WEST)
100 direction = mxConstants.DIRECTION_EAST; 93 direction = mxConstants.DIRECTION_EAST;
101 else if (direction == mxConstants.DIRECTION_EAST) 94 else if (direction == mxConstants.DIRECTION_EAST)
102 direction = mxConstants.DIRECTION_WEST; 95 direction = mxConstants.DIRECTION_WEST;
103 } 96 }
104 -  
105 - if (mxUtils.getValue(this.style, 'flipV', false))  
106 - { 97 +
  98 + if (mxUtils.getValue(this.style, 'flipV', false)) {
107 if (direction == mxConstants.DIRECTION_NORTH) 99 if (direction == mxConstants.DIRECTION_NORTH)
108 direction = mxConstants.DIRECTION_SOUTH; 100 direction = mxConstants.DIRECTION_SOUTH;
109 else if (direction == mxConstants.DIRECTION_SOUTH) 101 else if (direction == mxConstants.DIRECTION_SOUTH)
110 direction = mxConstants.DIRECTION_NORTH; 102 direction = mxConstants.DIRECTION_NORTH;
111 } 103 }
112 - 104 +
113 if (direction == mxConstants.DIRECTION_NORTH 105 if (direction == mxConstants.DIRECTION_NORTH
114 - || direction == mxConstants.DIRECTION_SOUTH)  
115 - { 106 + || direction == mxConstants.DIRECTION_SOUTH) {
116 dy = w * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 107 dy = w * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
117 dx = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 108 dx = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
118 } 109 }
119 - else  
120 - { 110 + else {
121 dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 111 dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
122 dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 112 dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
123 } 113 }
124 -  
125 - if (direction == mxConstants.DIRECTION_EAST)  
126 - { 114 +
  115 + if (direction == mxConstants.DIRECTION_EAST) {
127 return new mxRectangle(rect.x, rect.y + dy, w - dx, h - 2 * dy); 116 return new mxRectangle(rect.x, rect.y + dy, w - dx, h - 2 * dy);
128 } 117 }
129 - else if (direction == mxConstants.DIRECTION_WEST)  
130 - { 118 + else if (direction == mxConstants.DIRECTION_WEST) {
131 return new mxRectangle(rect.x + dx, rect.y + dy, w - dx, h - 2 * dy); 119 return new mxRectangle(rect.x + dx, rect.y + dy, w - dx, h - 2 * dy);
132 } 120 }
133 - else if (direction == mxConstants.DIRECTION_NORTH)  
134 - { 121 + else if (direction == mxConstants.DIRECTION_NORTH) {
135 return new mxRectangle(rect.x + dy, rect.y + dx, w - 2 * dy, h - dx); 122 return new mxRectangle(rect.x + dy, rect.y + dx, w - 2 * dy, h - dx);
136 } 123 }
137 - else  
138 - { 124 + else {
139 return new mxRectangle(rect.x + dy, rect.y, w - 2 * dy, h - dx); 125 return new mxRectangle(rect.x + dy, rect.y, w - 2 * dy, h - dx);
140 } 126 }
141 } 127 }
142 - 128 +
143 return rect; 129 return rect;
144 }; 130 };
145 131
146 mxCellRenderer.registerShape(mxShapeArrows2Arrow.prototype.cst.ARROW, mxShapeArrows2Arrow); 132 mxCellRenderer.registerShape(mxShapeArrows2Arrow.prototype.cst.ARROW, mxShapeArrows2Arrow);
147 133
148 -Graph.handleFactory[mxShapeArrows2Arrow.prototype.cst.ARROW] = function(state)  
149 -{  
150 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
151 - {  
152 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
153 - var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
154 -  
155 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + dy * bounds.height / 2);  
156 - }, function(bounds, pt)  
157 - {  
158 - this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;  
159 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;  
160 - })];  
161 -  
162 - var handle2 = Graph.createHandle(state, ['notch'], function(bounds)  
163 - {  
164 - var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));  
165 -  
166 - return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);  
167 - }, function(bounds, pt)  
168 - {  
169 - this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.x - bounds.x))) / 100;  
170 - });  
171 - 134 +Graph.handleFactory[mxShapeArrows2Arrow.prototype.cst.ARROW] = function (state) {
  135 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
  136 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  137 + var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  138 +
  139 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + dy * bounds.height / 2);
  140 + }, function (bounds, pt) {
  141 + this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;
  142 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;
  143 + })];
  144 +
  145 + var handle2 = Graph.createHandle(state, ['notch'], function (bounds) {
  146 + var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));
  147 +
  148 + return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);
  149 + }, function (bounds, pt) {
  150 + this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.x - bounds.x))) / 100;
  151 + });
  152 +
172 handles.push(handle2); 153 handles.push(handle2);
173 - 154 +
174 return handles; 155 return handles;
175 156
176 } 157 }
177 158
178 -mxShapeArrows2Arrow.prototype.getConstraints = function(style, w, h)  
179 -{ 159 +mxShapeArrows2Arrow.prototype.getConstraints = function (style, w, h) {
180 var constr = []; 160 var constr = [];
181 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 161 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
182 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 162 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -202,8 +182,7 @@ mxShapeArrows2Arrow.prototype.getConstraints = function(style, w, h) @@ -202,8 +182,7 @@ mxShapeArrows2Arrow.prototype.getConstraints = function(style, w, h)
202 /** 182 /**
203 * Extends mxShape. 183 * Extends mxShape.
204 */ 184 */
205 -function mxShapeArrows2TwoWayArrow(bounds, fill, stroke, strokewidth)  
206 -{ 185 +function mxShapeArrows2TwoWayArrow(bounds, fill, stroke, strokewidth) {
207 mxShape.call(this); 186 mxShape.call(this);
208 this.bounds = bounds; 187 this.bounds = bounds;
209 this.fill = fill; 188 this.fill = fill;
@@ -219,12 +198,12 @@ function mxShapeArrows2TwoWayArrow(bounds, fill, stroke, strokewidth) @@ -219,12 +198,12 @@ function mxShapeArrows2TwoWayArrow(bounds, fill, stroke, strokewidth)
219 mxUtils.extend(mxShapeArrows2TwoWayArrow, mxActor); 198 mxUtils.extend(mxShapeArrows2TwoWayArrow, mxActor);
220 199
221 mxShapeArrows2TwoWayArrow.prototype.cst = { 200 mxShapeArrows2TwoWayArrow.prototype.cst = {
222 - TWO_WAY_ARROW : 'mxgraph.arrows2.twoWayArrow' 201 + TWO_WAY_ARROW: 'mxgraph.arrows2.twoWayArrow'
223 }; 202 };
224 203
225 mxShapeArrows2TwoWayArrow.prototype.customProperties = [ 204 mxShapeArrows2TwoWayArrow.prototype.customProperties = [
226 - {name: 'dx', dispName: 'Arrowhead Length', type: 'float', min:0, defVal: 35},  
227 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, max:1, defVal: 0.6} 205 + { name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 35 },
  206 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, max: 1, defVal: 0.6 }
228 ]; 207 ];
229 208
230 /** 209 /**
@@ -232,8 +211,7 @@ mxShapeArrows2TwoWayArrow.prototype.customProperties = [ @@ -232,8 +211,7 @@ mxShapeArrows2TwoWayArrow.prototype.customProperties = [
232 * 211 *
233 * Paints the vertex shape. 212 * Paints the vertex shape.
234 */ 213 */
235 -mxShapeArrows2TwoWayArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
236 -{ 214 +mxShapeArrows2TwoWayArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
237 c.translate(x, y); 215 c.translate(x, y);
238 216
239 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 217 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -254,38 +232,32 @@ mxShapeArrows2TwoWayArrow.prototype.paintVertexShape = function(c, x, y, w, h) @@ -254,38 +232,32 @@ mxShapeArrows2TwoWayArrow.prototype.paintVertexShape = function(c, x, y, w, h)
254 c.fillAndStroke(); 232 c.fillAndStroke();
255 }; 233 };
256 234
257 -mxShapeArrows2TwoWayArrow.prototype.getLabelBounds = function(rect)  
258 -{  
259 - if (mxUtils.getValue(this.style, 'boundedLbl', false))  
260 - { 235 +mxShapeArrows2TwoWayArrow.prototype.getLabelBounds = function (rect) {
  236 + if (mxUtils.getValue(this.style, 'boundedLbl', false)) {
261 var w = rect.width; 237 var w = rect.width;
262 var h = rect.height; 238 var h = rect.height;
263 var vertical = this.direction == mxConstants.DIRECTION_NORTH 239 var vertical = this.direction == mxConstants.DIRECTION_NORTH
264 - || this.direction == mxConstants.DIRECTION_SOUTH; 240 + || this.direction == mxConstants.DIRECTION_SOUTH;
265 241
266 var dy, dx; 242 var dy, dx;
267 -  
268 - if (vertical)  
269 - { 243 +
  244 + if (vertical) {
270 dy = w * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 245 dy = w * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
271 dx = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 246 dx = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
272 } 247 }
273 - else  
274 - { 248 + else {
275 dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 249 dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
276 dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 250 dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
277 } 251 }
278 -  
279 - if (vertical)  
280 - { 252 +
  253 + if (vertical) {
281 return new mxRectangle(rect.x + dy, rect.y + dx, w - 2 * dy, h - 2 * dx); 254 return new mxRectangle(rect.x + dy, rect.y + dx, w - 2 * dy, h - 2 * dx);
282 } 255 }
283 - else  
284 - { 256 + else {
285 return new mxRectangle(rect.x + dx, rect.y + dy, w - 2 * dx, h - 2 * dy); 257 return new mxRectangle(rect.x + dx, rect.y + dy, w - 2 * dx, h - 2 * dy);
286 } 258 }
287 } 259 }
288 - 260 +
289 return rect; 261 return rect;
290 }; 262 };
291 263
@@ -293,26 +265,22 @@ mxCellRenderer.registerShape(mxShapeArrows2TwoWayArrow.prototype.cst.TWO_WAY_ARR @@ -293,26 +265,22 @@ mxCellRenderer.registerShape(mxShapeArrows2TwoWayArrow.prototype.cst.TWO_WAY_ARR
293 265
294 mxShapeArrows2TwoWayArrow.prototype.constraints = null; 266 mxShapeArrows2TwoWayArrow.prototype.constraints = null;
295 267
296 -Graph.handleFactory[mxShapeArrows2TwoWayArrow.prototype.cst.TWO_WAY_ARROW] = function(state)  
297 -{  
298 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
299 - {  
300 - var dx = Math.max(0, Math.min(bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
301 - var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
302 -  
303 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + dy * bounds.height / 2);  
304 - }, function(bounds, pt)  
305 - {  
306 - this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width / 2, bounds.x + bounds.width - pt.x))) / 100;  
307 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;  
308 - })];  
309 - 268 +Graph.handleFactory[mxShapeArrows2TwoWayArrow.prototype.cst.TWO_WAY_ARROW] = function (state) {
  269 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
  270 + var dx = Math.max(0, Math.min(bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  271 + var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  272 +
  273 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + dy * bounds.height / 2);
  274 + }, function (bounds, pt) {
  275 + this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width / 2, bounds.x + bounds.width - pt.x))) / 100;
  276 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;
  277 + })];
  278 +
310 return handles; 279 return handles;
311 280
312 } 281 }
313 282
314 -mxShapeArrows2TwoWayArrow.prototype.getConstraints = function(style, w, h)  
315 -{ 283 +mxShapeArrows2TwoWayArrow.prototype.getConstraints = function (style, w, h) {
316 var constr = []; 284 var constr = [];
317 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 285 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
318 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 286 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -339,8 +307,7 @@ mxShapeArrows2TwoWayArrow.prototype.getConstraints = function(style, w, h) @@ -339,8 +307,7 @@ mxShapeArrows2TwoWayArrow.prototype.getConstraints = function(style, w, h)
339 /** 307 /**
340 * Extends mxShape. 308 * Extends mxShape.
341 */ 309 */
342 -function mxShapeArrows2StylisedArrow(bounds, fill, stroke, strokewidth)  
343 -{ 310 +function mxShapeArrows2StylisedArrow(bounds, fill, stroke, strokewidth) {
344 mxShape.call(this); 311 mxShape.call(this);
345 this.bounds = bounds; 312 this.bounds = bounds;
346 this.fill = fill; 313 this.fill = fill;
@@ -358,14 +325,14 @@ function mxShapeArrows2StylisedArrow(bounds, fill, stroke, strokewidth) @@ -358,14 +325,14 @@ function mxShapeArrows2StylisedArrow(bounds, fill, stroke, strokewidth)
358 mxUtils.extend(mxShapeArrows2StylisedArrow, mxActor); 325 mxUtils.extend(mxShapeArrows2StylisedArrow, mxActor);
359 326
360 mxShapeArrows2StylisedArrow.prototype.customProperties = [ 327 mxShapeArrows2StylisedArrow.prototype.customProperties = [
361 - {name: 'dx', dispName: 'Arrowhead Length', type: 'float', min:0, defVal:40},  
362 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, max:1, defVal:0.6},  
363 - {name: 'notch', dispName: 'Notch', type: 'float', min:0, defVal:0},  
364 - {name: 'feather', dispName: 'Feather', type: 'float', min:0, max:1, defVal:0.4}, 328 + { name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 40 },
  329 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, max: 1, defVal: 0.6 },
  330 + { name: 'notch', dispName: 'Notch', type: 'float', min: 0, defVal: 0 },
  331 + { name: 'feather', dispName: 'Feather', type: 'float', min: 0, max: 1, defVal: 0.4 },
365 ]; 332 ];
366 333
367 mxShapeArrows2StylisedArrow.prototype.cst = { 334 mxShapeArrows2StylisedArrow.prototype.cst = {
368 - STYLISED_ARROW : 'mxgraph.arrows2.stylisedArrow' 335 + STYLISED_ARROW: 'mxgraph.arrows2.stylisedArrow'
369 }; 336 };
370 337
371 /** 338 /**
@@ -373,8 +340,7 @@ mxShapeArrows2StylisedArrow.prototype.cst = { @@ -373,8 +340,7 @@ mxShapeArrows2StylisedArrow.prototype.cst = {
373 * 340 *
374 * Paints the vertex shape. 341 * Paints the vertex shape.
375 */ 342 */
376 -mxShapeArrows2StylisedArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
377 -{ 343 +mxShapeArrows2StylisedArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
378 c.translate(x, y); 344 c.translate(x, y);
379 345
380 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 346 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -399,50 +365,42 @@ mxCellRenderer.registerShape(mxShapeArrows2StylisedArrow.prototype.cst.STYLISED_ @@ -399,50 +365,42 @@ mxCellRenderer.registerShape(mxShapeArrows2StylisedArrow.prototype.cst.STYLISED_
399 365
400 mxShapeArrows2StylisedArrow.prototype.constraints = null; 366 mxShapeArrows2StylisedArrow.prototype.constraints = null;
401 367
402 -Graph.handleFactory[mxShapeArrows2StylisedArrow.prototype.cst.STYLISED_ARROW] = function(state)  
403 -{  
404 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
405 - {  
406 - var dx = Math.max(0, Math.min(bounds.width - 10, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
407 - var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
408 -  
409 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + dy * bounds.height / 2);  
410 - }, function(bounds, pt)  
411 - {  
412 - this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width - 10, bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;  
413 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;  
414 - })];  
415 -  
416 - var handle2 = Graph.createHandle(state, ['notch'], function(bounds)  
417 - {  
418 - var notch = Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));  
419 -  
420 - return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);  
421 - }, function(bounds, pt)  
422 - {  
423 - this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.x - bounds.x))) / 100;  
424 - });  
425 - 368 +Graph.handleFactory[mxShapeArrows2StylisedArrow.prototype.cst.STYLISED_ARROW] = function (state) {
  369 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
  370 + var dx = Math.max(0, Math.min(bounds.width - 10, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  371 + var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  372 +
  373 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + dy * bounds.height / 2);
  374 + }, function (bounds, pt) {
  375 + this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width - 10, bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;
  376 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;
  377 + })];
  378 +
  379 + var handle2 = Graph.createHandle(state, ['notch'], function (bounds) {
  380 + var notch = Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));
  381 +
  382 + return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);
  383 + }, function (bounds, pt) {
  384 + this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.x - bounds.x))) / 100;
  385 + });
  386 +
426 handles.push(handle2); 387 handles.push(handle2);
427 -  
428 - var handle3 = Graph.createHandle(state, ['feather'], function(bounds)  
429 - {  
430 - var feather = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'feather', this.dy))));  
431 -  
432 - return new mxPoint(bounds.x, bounds.y + feather * bounds.height / 2);  
433 - }, function(bounds, pt)  
434 - {  
435 - this.state.style['feather'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;  
436 - });  
437 - 388 +
  389 + var handle3 = Graph.createHandle(state, ['feather'], function (bounds) {
  390 + var feather = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'feather', this.dy))));
  391 +
  392 + return new mxPoint(bounds.x, bounds.y + feather * bounds.height / 2);
  393 + }, function (bounds, pt) {
  394 + this.state.style['feather'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;
  395 + });
  396 +
438 handles.push(handle3); 397 handles.push(handle3);
439 - 398 +
440 return handles; 399 return handles;
441 400
442 } 401 }
443 402
444 -mxShapeArrows2StylisedArrow.prototype.getConstraints = function(style, w, h)  
445 -{ 403 +mxShapeArrows2StylisedArrow.prototype.getConstraints = function (style, w, h) {
446 var constr = []; 404 var constr = [];
447 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 405 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
448 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 406 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -469,8 +427,7 @@ mxShapeArrows2StylisedArrow.prototype.getConstraints = function(style, w, h) @@ -469,8 +427,7 @@ mxShapeArrows2StylisedArrow.prototype.getConstraints = function(style, w, h)
469 /** 427 /**
470 * Extends mxShape. 428 * Extends mxShape.
471 */ 429 */
472 -function mxShapeArrows2SharpArrow(bounds, fill, stroke, strokewidth)  
473 -{ 430 +function mxShapeArrows2SharpArrow(bounds, fill, stroke, strokewidth) {
474 mxShape.call(this); 431 mxShape.call(this);
475 this.bounds = bounds; 432 this.bounds = bounds;
476 this.fill = fill; 433 this.fill = fill;
@@ -488,14 +445,14 @@ function mxShapeArrows2SharpArrow(bounds, fill, stroke, strokewidth) @@ -488,14 +445,14 @@ function mxShapeArrows2SharpArrow(bounds, fill, stroke, strokewidth)
488 mxUtils.extend(mxShapeArrows2SharpArrow, mxActor); 445 mxUtils.extend(mxShapeArrows2SharpArrow, mxActor);
489 446
490 mxShapeArrows2SharpArrow.prototype.cst = { 447 mxShapeArrows2SharpArrow.prototype.cst = {
491 - SHARP_ARROW : 'mxgraph.arrows2.sharpArrow' 448 + SHARP_ARROW: 'mxgraph.arrows2.sharpArrow'
492 }; 449 };
493 450
494 mxShapeArrows2SharpArrow.prototype.customProperties = [ 451 mxShapeArrows2SharpArrow.prototype.customProperties = [
495 - {name: 'dx1', dispName: 'Arrowhead Arrow Width', type: 'float', min:0, defVal:18},  
496 - {name: 'dy1', dispName: 'Arrow Arrow Width', type: 'float', min:0, max:1, defVal:0.67},  
497 - {name: 'dx2', dispName: 'Arrowhead Angle', type: 'float', min:0, defVal:18},  
498 - {name: 'notch', dispName: 'Notch', type: 'float', min:0, defVal:0} 452 + { name: 'dx1', dispName: 'Arrowhead Arrow Width', type: 'float', min: 0, defVal: 18 },
  453 + { name: 'dy1', dispName: 'Arrow Arrow Width', type: 'float', min: 0, max: 1, defVal: 0.67 },
  454 + { name: 'dx2', dispName: 'Arrowhead Angle', type: 'float', min: 0, defVal: 18 },
  455 + { name: 'notch', dispName: 'Notch', type: 'float', min: 0, defVal: 0 }
499 ]; 456 ];
500 457
501 /** 458 /**
@@ -503,8 +460,7 @@ mxShapeArrows2SharpArrow.prototype.customProperties = [ @@ -503,8 +460,7 @@ mxShapeArrows2SharpArrow.prototype.customProperties = [
503 * 460 *
504 * Paints the vertex shape. 461 * Paints the vertex shape.
505 */ 462 */
506 -mxShapeArrows2SharpArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
507 -{ 463 +mxShapeArrows2SharpArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
508 c.translate(x, y); 464 c.translate(x, y);
509 465
510 var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 466 var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
@@ -514,12 +470,11 @@ mxShapeArrows2SharpArrow.prototype.paintVertexShape = function(c, x, y, w, h) @@ -514,12 +470,11 @@ mxShapeArrows2SharpArrow.prototype.paintVertexShape = function(c, x, y, w, h)
514 var dx1a = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1)))); 470 var dx1a = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
515 var dy1a = h * 0.5 * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 471 var dy1a = h * 0.5 * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
516 var x2 = 0; 472 var x2 = 0;
517 -  
518 - if (h != 0)  
519 - { 473 +
  474 + if (h != 0) {
520 x2 = dx1a + dx2 * dy1a * 2 / h; 475 x2 = dx1a + dx2 * dy1a * 2 / h;
521 } 476 }
522 - 477 +
523 c.begin(); 478 c.begin();
524 c.moveTo(0, dy1); 479 c.moveTo(0, dy1);
525 c.lineTo(w - dx1, dy1); 480 c.lineTo(w - dx1, dy1);
@@ -539,49 +494,41 @@ mxCellRenderer.registerShape(mxShapeArrows2SharpArrow.prototype.cst.SHARP_ARROW, @@ -539,49 +494,41 @@ mxCellRenderer.registerShape(mxShapeArrows2SharpArrow.prototype.cst.SHARP_ARROW,
539 494
540 mxShapeArrows2SharpArrow.prototype.constraints = null; 495 mxShapeArrows2SharpArrow.prototype.constraints = null;
541 496
542 -Graph.handleFactory[mxShapeArrows2SharpArrow.prototype.cst.SHARP_ARROW] = function(state)  
543 -{  
544 - var handles = [Graph.createHandle(state, ['dx1', 'dy1'], function(bounds)  
545 - {  
546 - var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));  
547 - var dy1 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));  
548 -  
549 - return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + dy1 * bounds.height / 2);  
550 - }, function(bounds, pt)  
551 - {  
552 - this.state.style['dx1'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;  
553 - this.state.style['dy1'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;  
554 - })];  
555 -  
556 - var handle2 = Graph.createHandle(state, ['notch'], function(bounds)  
557 - {  
558 - var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));  
559 -  
560 - return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);  
561 - }, function(bounds, pt)  
562 - {  
563 - this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), pt.x - bounds.x))) / 100;  
564 - });  
565 - 497 +Graph.handleFactory[mxShapeArrows2SharpArrow.prototype.cst.SHARP_ARROW] = function (state) {
  498 + var handles = [Graph.createHandle(state, ['dx1', 'dy1'], function (bounds) {
  499 + var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));
  500 + var dy1 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));
  501 +
  502 + return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + dy1 * bounds.height / 2);
  503 + }, function (bounds, pt) {
  504 + this.state.style['dx1'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;
  505 + this.state.style['dy1'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;
  506 + })];
  507 +
  508 + var handle2 = Graph.createHandle(state, ['notch'], function (bounds) {
  509 + var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));
  510 +
  511 + return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);
  512 + }, function (bounds, pt) {
  513 + this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), pt.x - bounds.x))) / 100;
  514 + });
  515 +
566 handles.push(handle2); 516 handles.push(handle2);
567 -  
568 - var handle3 = Graph.createHandle(state, ['dx2'], function(bounds)  
569 - {  
570 - var dx2 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));  
571 -  
572 - return new mxPoint(bounds.x + bounds.width - dx2, bounds.y);  
573 - }, function(bounds, pt)  
574 - {  
575 - this.state.style['dx2'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;  
576 - });  
577 - 517 +
  518 + var handle3 = Graph.createHandle(state, ['dx2'], function (bounds) {
  519 + var dx2 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));
  520 +
  521 + return new mxPoint(bounds.x + bounds.width - dx2, bounds.y);
  522 + }, function (bounds, pt) {
  523 + this.state.style['dx2'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;
  524 + });
  525 +
578 handles.push(handle3); 526 handles.push(handle3);
579 - 527 +
580 return handles; 528 return handles;
581 }; 529 };
582 530
583 -mxShapeArrows2SharpArrow.prototype.getConstraints = function(style, w, h)  
584 -{ 531 +mxShapeArrows2SharpArrow.prototype.getConstraints = function (style, w, h) {
585 var constr = []; 532 var constr = [];
586 var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 533 var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
587 var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1)))); 534 var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
@@ -590,12 +537,11 @@ mxShapeArrows2SharpArrow.prototype.getConstraints = function(style, w, h) @@ -590,12 +537,11 @@ mxShapeArrows2SharpArrow.prototype.getConstraints = function(style, w, h)
590 var dx1a = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1)))); 537 var dx1a = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
591 var dy1a = h * 0.5 * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 538 var dy1a = h * 0.5 * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
592 var x2 = 0; 539 var x2 = 0;
593 -  
594 - if (h != 0)  
595 - { 540 +
  541 + if (h != 0) {
596 x2 = dx1a + dx2 * dy1a * 2 / h; 542 x2 = dx1a + dx2 * dy1a * 2 / h;
597 } 543 }
598 - 544 +
599 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false)); 545 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
600 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, notch, 0)); 546 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, notch, 0));
601 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy1)); 547 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy1));
@@ -618,8 +564,7 @@ mxShapeArrows2SharpArrow.prototype.getConstraints = function(style, w, h) @@ -618,8 +564,7 @@ mxShapeArrows2SharpArrow.prototype.getConstraints = function(style, w, h)
618 /** 564 /**
619 * Extends mxShape. 565 * Extends mxShape.
620 */ 566 */
621 -function mxShapeArrows2SharpArrow2(bounds, fill, stroke, strokewidth)  
622 -{ 567 +function mxShapeArrows2SharpArrow2(bounds, fill, stroke, strokewidth) {
623 mxShape.call(this); 568 mxShape.call(this);
624 this.bounds = bounds; 569 this.bounds = bounds;
625 this.fill = fill; 570 this.fill = fill;
@@ -640,16 +585,16 @@ function mxShapeArrows2SharpArrow2(bounds, fill, stroke, strokewidth) @@ -640,16 +585,16 @@ function mxShapeArrows2SharpArrow2(bounds, fill, stroke, strokewidth)
640 mxUtils.extend(mxShapeArrows2SharpArrow2, mxActor); 585 mxUtils.extend(mxShapeArrows2SharpArrow2, mxActor);
641 586
642 mxShapeArrows2SharpArrow2.prototype.customProperties = [ 587 mxShapeArrows2SharpArrow2.prototype.customProperties = [
643 - {name: 'dx1', dispName: 'Arrowhead Arrow Width', type: 'float', min:0, defVal:18},  
644 - {name: 'dy1', dispName: 'Arrow Width', type: 'float', min:0, max:1, defVal:0.67},  
645 - {name: 'dx2', dispName: 'Arrowhead Angle', type: 'float', min:0, defVal:18},  
646 - {name: 'dx3', dispName: 'Arrowhead Edge X', type: 'float', min:0, defVal:27},  
647 - {name: 'dy3', dispName: 'Arrowhead Edge Y', type: 'float', min:0, max:1, defVal:0.15},  
648 - {name: 'notch', dispName: 'Notch', type: 'float', min:0, defVal:0} 588 + { name: 'dx1', dispName: 'Arrowhead Arrow Width', type: 'float', min: 0, defVal: 18 },
  589 + { name: 'dy1', dispName: 'Arrow Width', type: 'float', min: 0, max: 1, defVal: 0.67 },
  590 + { name: 'dx2', dispName: 'Arrowhead Angle', type: 'float', min: 0, defVal: 18 },
  591 + { name: 'dx3', dispName: 'Arrowhead Edge X', type: 'float', min: 0, defVal: 27 },
  592 + { name: 'dy3', dispName: 'Arrowhead Edge Y', type: 'float', min: 0, max: 1, defVal: 0.15 },
  593 + { name: 'notch', dispName: 'Notch', type: 'float', min: 0, defVal: 0 }
649 ]; 594 ];
650 595
651 mxShapeArrows2SharpArrow2.prototype.cst = { 596 mxShapeArrows2SharpArrow2.prototype.cst = {
652 - SHARP_ARROW2 : 'mxgraph.arrows2.sharpArrow2' 597 + SHARP_ARROW2: 'mxgraph.arrows2.sharpArrow2'
653 }; 598 };
654 599
655 /** 600 /**
@@ -657,8 +602,7 @@ mxShapeArrows2SharpArrow2.prototype.cst = { @@ -657,8 +602,7 @@ mxShapeArrows2SharpArrow2.prototype.cst = {
657 * 602 *
658 * Paints the vertex shape. 603 * Paints the vertex shape.
659 */ 604 */
660 -mxShapeArrows2SharpArrow2.prototype.paintVertexShape = function(c, x, y, w, h)  
661 -{ 605 +mxShapeArrows2SharpArrow2.prototype.paintVertexShape = function (c, x, y, w, h) {
662 c.translate(x, y); 606 c.translate(x, y);
663 607
664 var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 608 var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
@@ -689,63 +633,53 @@ mxCellRenderer.registerShape(mxShapeArrows2SharpArrow2.prototype.cst.SHARP_ARROW @@ -689,63 +633,53 @@ mxCellRenderer.registerShape(mxShapeArrows2SharpArrow2.prototype.cst.SHARP_ARROW
689 633
690 mxShapeArrows2SharpArrow2.prototype.constraints = null; 634 mxShapeArrows2SharpArrow2.prototype.constraints = null;
691 635
692 -Graph.handleFactory[mxShapeArrows2SharpArrow2.prototype.cst.SHARP_ARROW2] = function(state)  
693 -{  
694 - var handles = [Graph.createHandle(state, ['dx1', 'dy1'], function(bounds)  
695 - {  
696 - var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));  
697 - var dy1 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));  
698 -  
699 - return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + dy1 * bounds.height / 2);  
700 - }, function(bounds, pt)  
701 - {  
702 - this.state.style['dx1'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;  
703 - this.state.style['dy1'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;  
704 - })];  
705 -  
706 - var handle2 = Graph.createHandle(state, ['notch'], function(bounds)  
707 - {  
708 - var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));  
709 -  
710 - return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);  
711 - }, function(bounds, pt)  
712 - {  
713 - this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), pt.x - bounds.x))) / 100;  
714 - });  
715 - 636 +Graph.handleFactory[mxShapeArrows2SharpArrow2.prototype.cst.SHARP_ARROW2] = function (state) {
  637 + var handles = [Graph.createHandle(state, ['dx1', 'dy1'], function (bounds) {
  638 + var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));
  639 + var dy1 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));
  640 +
  641 + return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + dy1 * bounds.height / 2);
  642 + }, function (bounds, pt) {
  643 + this.state.style['dx1'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;
  644 + this.state.style['dy1'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;
  645 + })];
  646 +
  647 + var handle2 = Graph.createHandle(state, ['notch'], function (bounds) {
  648 + var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));
  649 +
  650 + return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);
  651 + }, function (bounds, pt) {
  652 + this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), pt.x - bounds.x))) / 100;
  653 + });
  654 +
716 handles.push(handle2); 655 handles.push(handle2);
717 -  
718 - var handle3 = Graph.createHandle(state, ['dx2'], function(bounds)  
719 - {  
720 - var dx2 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));  
721 -  
722 - return new mxPoint(bounds.x + bounds.width - dx2, bounds.y);  
723 - }, function(bounds, pt)  
724 - {  
725 - this.state.style['dx2'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;  
726 - });  
727 - 656 +
  657 + var handle3 = Graph.createHandle(state, ['dx2'], function (bounds) {
  658 + var dx2 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));
  659 +
  660 + return new mxPoint(bounds.x + bounds.width - dx2, bounds.y);
  661 + }, function (bounds, pt) {
  662 + this.state.style['dx2'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;
  663 + });
  664 +
728 handles.push(handle3); 665 handles.push(handle3);
729 666
730 - var handle4 = Graph.createHandle(state, ['dx3', 'dy3'], function(bounds)  
731 - {  
732 - var dx3 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx3', this.dx3))));  
733 - var dy3 = Math.max(0, Math.min(1 - parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy3', this.dy3)))); 667 + var handle4 = Graph.createHandle(state, ['dx3', 'dy3'], function (bounds) {
  668 + var dx3 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx3', this.dx3))));
  669 + var dy3 = Math.max(0, Math.min(1 - parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy3', this.dy3))));
734 670
735 - return new mxPoint(bounds.x + bounds.width - dx3, bounds.y + dy3 * bounds.height / 2);  
736 - }, function(bounds, pt)  
737 - {  
738 - this.state.style['dx3'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)), Math.min(bounds.width, bounds.x + bounds.width - pt.x))) / 100;  
739 - this.state.style['dy3'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;  
740 - }); 671 + return new mxPoint(bounds.x + bounds.width - dx3, bounds.y + dy3 * bounds.height / 2);
  672 + }, function (bounds, pt) {
  673 + this.state.style['dx3'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)), Math.min(bounds.width, bounds.x + bounds.width - pt.x))) / 100;
  674 + this.state.style['dy3'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;
  675 + });
741 676
742 handles.push(handle4); 677 handles.push(handle4);
743 678
744 return handles; 679 return handles;
745 }; 680 };
746 681
747 -mxShapeArrows2SharpArrow2.prototype.getConstraints = function(style, w, h)  
748 -{ 682 +mxShapeArrows2SharpArrow2.prototype.getConstraints = function (style, w, h) {
749 var constr = []; 683 var constr = [];
750 var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 684 var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
751 var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1)))); 685 var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
@@ -778,8 +712,7 @@ mxShapeArrows2SharpArrow2.prototype.getConstraints = function(style, w, h) @@ -778,8 +712,7 @@ mxShapeArrows2SharpArrow2.prototype.getConstraints = function(style, w, h)
778 /** 712 /**
779 * Extends mxShape. 713 * Extends mxShape.
780 */ 714 */
781 -function mxShapeArrows2CalloutArrow(bounds, fill, stroke, strokewidth)  
782 -{ 715 +function mxShapeArrows2CalloutArrow(bounds, fill, stroke, strokewidth) {
783 mxShape.call(this); 716 mxShape.call(this);
784 this.bounds = bounds; 717 this.bounds = bounds;
785 this.fill = fill; 718 this.fill = fill;
@@ -797,14 +730,14 @@ function mxShapeArrows2CalloutArrow(bounds, fill, stroke, strokewidth) @@ -797,14 +730,14 @@ function mxShapeArrows2CalloutArrow(bounds, fill, stroke, strokewidth)
797 mxUtils.extend(mxShapeArrows2CalloutArrow, mxActor); 730 mxUtils.extend(mxShapeArrows2CalloutArrow, mxActor);
798 731
799 mxShapeArrows2CalloutArrow.prototype.customProperties = [ 732 mxShapeArrows2CalloutArrow.prototype.customProperties = [
800 - {name: 'dx', dispName: 'Arrowhead Length', type: 'float', min:0, defVal:20},  
801 - {name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min:0, defVal:10},  
802 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, defVal:10},  
803 - {name: 'notch', dispName: 'Rectangle Width', type: 'float', min:0, defVal:60} 733 + { name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 20 },
  734 + { name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min: 0, defVal: 10 },
  735 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, defVal: 10 },
  736 + { name: 'notch', dispName: 'Rectangle Width', type: 'float', min: 0, defVal: 60 }
804 ]; 737 ];
805 738
806 mxShapeArrows2CalloutArrow.prototype.cst = { 739 mxShapeArrows2CalloutArrow.prototype.cst = {
807 - CALLOUT_ARROW : 'mxgraph.arrows2.calloutArrow' 740 + CALLOUT_ARROW: 'mxgraph.arrows2.calloutArrow'
808 }; 741 };
809 742
810 /** 743 /**
@@ -812,8 +745,7 @@ mxShapeArrows2CalloutArrow.prototype.cst = { @@ -812,8 +745,7 @@ mxShapeArrows2CalloutArrow.prototype.cst = {
812 * 745 *
813 * Paints the vertex shape. 746 * Paints the vertex shape.
814 */ 747 */
815 -mxShapeArrows2CalloutArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
816 -{ 748 +mxShapeArrows2CalloutArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
817 c.translate(x, y); 749 c.translate(x, y);
818 750
819 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 751 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -841,53 +773,45 @@ mxCellRenderer.registerShape(mxShapeArrows2CalloutArrow.prototype.cst.CALLOUT_AR @@ -841,53 +773,45 @@ mxCellRenderer.registerShape(mxShapeArrows2CalloutArrow.prototype.cst.CALLOUT_AR
841 773
842 mxShapeArrows2CalloutArrow.prototype.constraints = null; 774 mxShapeArrows2CalloutArrow.prototype.constraints = null;
843 775
844 -Graph.handleFactory[mxShapeArrows2CalloutArrow.prototype.cst.CALLOUT_ARROW] = function(state)  
845 -{  
846 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
847 - {  
848 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
849 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
850 - var dy = Math.max(0, Math.min(bounds.height / 2 - arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
851 -  
852 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy);  
853 - }, function(bounds, pt)  
854 - {  
855 - this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;  
856 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.y + bounds.height / 2 - pt.y))) / 100;  
857 -  
858 - })];  
859 -  
860 - var handle2 = Graph.createHandle(state, ['notch'], function(bounds)  
861 - {  
862 - var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));  
863 -  
864 - return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);  
865 - }, function(bounds, pt)  
866 - {  
867 - this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.x - bounds.x))) / 100;  
868 - }); 776 +Graph.handleFactory[mxShapeArrows2CalloutArrow.prototype.cst.CALLOUT_ARROW] = function (state) {
  777 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
  778 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  779 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  780 + var dy = Math.max(0, Math.min(bounds.height / 2 - arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  781 +
  782 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy);
  783 + }, function (bounds, pt) {
  784 + this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;
  785 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.y + bounds.height / 2 - pt.y))) / 100;
  786 +
  787 + })];
  788 +
  789 + var handle2 = Graph.createHandle(state, ['notch'], function (bounds) {
  790 + var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));
  791 +
  792 + return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);
  793 + }, function (bounds, pt) {
  794 + this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.x - bounds.x))) / 100;
  795 + });
869 796
870 handles.push(handle2); 797 handles.push(handle2);
871 -  
872 - var handle3 = Graph.createHandle(state, ['arrowHead'], function(bounds)  
873 - {  
874 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
875 - var dy = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
876 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
877 -  
878 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy - arrowHead);  
879 - }, function(bounds, pt)  
880 - {  
881 - this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), bounds.y + bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) - pt.y))) / 100;  
882 - }); 798 +
  799 + var handle3 = Graph.createHandle(state, ['arrowHead'], function (bounds) {
  800 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  801 + var dy = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  802 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  803 +
  804 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy - arrowHead);
  805 + }, function (bounds, pt) {
  806 + this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), bounds.y + bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) - pt.y))) / 100;
  807 + });
883 808
884 handles.push(handle3); 809 handles.push(handle3);
885 - 810 +
886 return handles; 811 return handles;
887 }; 812 };
888 813
889 -mxShapeArrows2CalloutArrow.prototype.getConstraints = function(style, w, h)  
890 -{ 814 +mxShapeArrows2CalloutArrow.prototype.getConstraints = function (style, w, h) {
891 var constr = []; 815 var constr = [];
892 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 816 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
893 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 817 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -896,7 +820,7 @@ mxShapeArrows2CalloutArrow.prototype.getConstraints = function(style, w, h) @@ -896,7 +820,7 @@ mxShapeArrows2CalloutArrow.prototype.getConstraints = function(style, w, h)
896 820
897 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false)); 821 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
898 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch, 0)); 822 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch, 0));
899 - constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null,notch, h * 0.5 - dy)); 823 + constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch, h * 0.5 - dy));
900 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 - dy)); 824 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 - dy));
901 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 - dy - arrowHead)); 825 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 - dy - arrowHead));
902 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, h * 0.5)); 826 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, h * 0.5));
@@ -905,8 +829,8 @@ mxShapeArrows2CalloutArrow.prototype.getConstraints = function(style, w, h) @@ -905,8 +829,8 @@ mxShapeArrows2CalloutArrow.prototype.getConstraints = function(style, w, h)
905 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch, h * 0.5 + dy)); 829 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch, h * 0.5 + dy));
906 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch, h)); 830 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch, h));
907 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h)); 831 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h));
908 - constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch * 0.5 , 0));  
909 - constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch * 0.5 , h)); 832 + constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch * 0.5, 0));
  833 + constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch * 0.5, h));
910 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, (notch + w - dx) * 0.5, -dy)); 834 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, (notch + w - dx) * 0.5, -dy));
911 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, (notch + w - dx) * 0.5, dy)); 835 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, (notch + w - dx) * 0.5, dy));
912 836
@@ -919,8 +843,7 @@ mxShapeArrows2CalloutArrow.prototype.getConstraints = function(style, w, h) @@ -919,8 +843,7 @@ mxShapeArrows2CalloutArrow.prototype.getConstraints = function(style, w, h)
919 /** 843 /**
920 * Extends mxShape. 844 * Extends mxShape.
921 */ 845 */
922 -function mxShapeArrows2BendArrow(bounds, fill, stroke, strokewidth)  
923 -{ 846 +function mxShapeArrows2BendArrow(bounds, fill, stroke, strokewidth) {
924 mxShape.call(this); 847 mxShape.call(this);
925 this.bounds = bounds; 848 this.bounds = bounds;
926 this.fill = fill; 849 this.fill = fill;
@@ -938,15 +861,15 @@ function mxShapeArrows2BendArrow(bounds, fill, stroke, strokewidth) @@ -938,15 +861,15 @@ function mxShapeArrows2BendArrow(bounds, fill, stroke, strokewidth)
938 mxUtils.extend(mxShapeArrows2BendArrow, mxActor); 861 mxUtils.extend(mxShapeArrows2BendArrow, mxActor);
939 862
940 mxShapeArrows2BendArrow.prototype.customProperties = [ 863 mxShapeArrows2BendArrow.prototype.customProperties = [
941 - {name: 'dx', dispName: 'Arrowhead Length', type: 'float', min:0, defVal: 38},  
942 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, defVal: 15},  
943 - {name: 'notch', dispName: 'Notch', type: 'float', min:0, defVal: 0},  
944 - {name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min:0, defVal:55},  
945 - {name: 'rounded', dispName: 'Rounded', type: 'boolean', defVal: false} 864 + { name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 38 },
  865 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, defVal: 15 },
  866 + { name: 'notch', dispName: 'Notch', type: 'float', min: 0, defVal: 0 },
  867 + { name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min: 0, defVal: 55 },
  868 + { name: 'rounded', dispName: 'Rounded', type: 'boolean', defVal: false }
946 ]; 869 ];
947 870
948 mxShapeArrows2BendArrow.prototype.cst = { 871 mxShapeArrows2BendArrow.prototype.cst = {
949 - BEND_ARROW : 'mxgraph.arrows2.bendArrow' 872 + BEND_ARROW: 'mxgraph.arrows2.bendArrow'
950 }; 873 };
951 874
952 /** 875 /**
@@ -954,8 +877,7 @@ mxShapeArrows2BendArrow.prototype.cst = { @@ -954,8 +877,7 @@ mxShapeArrows2BendArrow.prototype.cst = {
954 * 877 *
955 * Paints the vertex shape. 878 * Paints the vertex shape.
956 */ 879 */
957 -mxShapeArrows2BendArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
958 -{ 880 +mxShapeArrows2BendArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
959 c.translate(x, y); 881 c.translate(x, y);
960 882
961 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 883 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -969,28 +891,24 @@ mxShapeArrows2BendArrow.prototype.paintVertexShape = function(c, x, y, w, h) @@ -969,28 +891,24 @@ mxShapeArrows2BendArrow.prototype.paintVertexShape = function(c, x, y, w, h)
969 c.lineTo(w, arrowHead * 0.5); 891 c.lineTo(w, arrowHead * 0.5);
970 c.lineTo(w - dx, arrowHead); 892 c.lineTo(w - dx, arrowHead);
971 c.lineTo(w - dx, arrowHead / 2 + dy); 893 c.lineTo(w - dx, arrowHead / 2 + dy);
972 -  
973 - if (rounded == '1')  
974 - { 894 +
  895 + if (rounded == '1') {
975 c.lineTo(dy * 2.2, arrowHead / 2 + dy); 896 c.lineTo(dy * 2.2, arrowHead / 2 + dy);
976 c.arcTo(dy * 0.2, dy * 0.2, 0, 0, 0, dy * 2, arrowHead / 2 + dy * 1.2); 897 c.arcTo(dy * 0.2, dy * 0.2, 0, 0, 0, dy * 2, arrowHead / 2 + dy * 1.2);
977 } 898 }
978 - else  
979 - { 899 + else {
980 c.lineTo(dy * 2, arrowHead / 2 + dy); 900 c.lineTo(dy * 2, arrowHead / 2 + dy);
981 } 901 }
982 - 902 +
983 c.lineTo(dy * 2, h); 903 c.lineTo(dy * 2, h);
984 c.lineTo(dy, h - notch); 904 c.lineTo(dy, h - notch);
985 c.lineTo(0, h); 905 c.lineTo(0, h);
986 -  
987 - if (rounded == '1')  
988 - { 906 +
  907 + if (rounded == '1') {
989 c.lineTo(0, arrowHead / 2 + dy); 908 c.lineTo(0, arrowHead / 2 + dy);
990 c.arcTo(dy * 2, dy * 2, 0, 0, 1, dy * 2, arrowHead / 2 - dy); 909 c.arcTo(dy * 2, dy * 2, 0, 0, 1, dy * 2, arrowHead / 2 - dy);
991 } 910 }
992 - else  
993 - { 911 + else {
994 c.lineTo(0, arrowHead / 2 - dy); 912 c.lineTo(0, arrowHead / 2 - dy);
995 } 913 }
996 914
@@ -1003,55 +921,47 @@ mxCellRenderer.registerShape(mxShapeArrows2BendArrow.prototype.cst.BEND_ARROW, m @@ -1003,55 +921,47 @@ mxCellRenderer.registerShape(mxShapeArrows2BendArrow.prototype.cst.BEND_ARROW, m
1003 921
1004 mxShapeArrows2BendArrow.prototype.constraints = null; 922 mxShapeArrows2BendArrow.prototype.constraints = null;
1005 923
1006 -Graph.handleFactory[mxShapeArrows2BendArrow.prototype.cst.BEND_ARROW] = function(state)  
1007 -{  
1008 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
1009 - {  
1010 - var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1011 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
1012 - var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
1013 -  
1014 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + arrowHead / 2 - dy);  
1015 - }, function(bounds, pt)  
1016 - {  
1017 - this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) * 2.2, bounds.x + bounds.width - pt.x))) / 100;  
1018 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2, bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2 - pt.y))) / 100;  
1019 -  
1020 - })];  
1021 -  
1022 - var handle2 = Graph.createHandle(state, ['notch'], function(bounds)  
1023 - {  
1024 - var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1025 - var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
1026 -  
1027 - var notch = Math.max(0, Math.min(bounds.height - arrowHead / 2 - dy, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));  
1028 -  
1029 - return new mxPoint(bounds.x + dy, bounds.y + bounds.height - notch);  
1030 - }, function(bounds, pt)  
1031 - {  
1032 - this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.height - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), bounds.y + bounds.height - pt.y))) / 100;  
1033 - });  
1034 - 924 +Graph.handleFactory[mxShapeArrows2BendArrow.prototype.cst.BEND_ARROW] = function (state) {
  925 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
  926 + var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  927 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  928 + var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  929 +
  930 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + arrowHead / 2 - dy);
  931 + }, function (bounds, pt) {
  932 + this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) * 2.2, bounds.x + bounds.width - pt.x))) / 100;
  933 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2, bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2 - pt.y))) / 100;
  934 +
  935 + })];
  936 +
  937 + var handle2 = Graph.createHandle(state, ['notch'], function (bounds) {
  938 + var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  939 + var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  940 +
  941 + var notch = Math.max(0, Math.min(bounds.height - arrowHead / 2 - dy, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));
  942 +
  943 + return new mxPoint(bounds.x + dy, bounds.y + bounds.height - notch);
  944 + }, function (bounds, pt) {
  945 + this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.height - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), bounds.y + bounds.height - pt.y))) / 100;
  946 + });
  947 +
1035 handles.push(handle2); 948 handles.push(handle2);
1036 949
1037 - var handle3 = Graph.createHandle(state, ['arrowHead'], function(bounds)  
1038 - {  
1039 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
1040 - var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1041 -  
1042 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + arrowHead);  
1043 - }, function(bounds, pt)  
1044 - {  
1045 - this.state.style['arrowHead'] = Math.round(100 * Math.max(2 * parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(bounds.height, pt.y - bounds.y))) / 100;  
1046 - });  
1047 - 950 + var handle3 = Graph.createHandle(state, ['arrowHead'], function (bounds) {
  951 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  952 + var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  953 +
  954 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + arrowHead);
  955 + }, function (bounds, pt) {
  956 + this.state.style['arrowHead'] = Math.round(100 * Math.max(2 * parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(bounds.height, pt.y - bounds.y))) / 100;
  957 + });
  958 +
1048 handles.push(handle3); 959 handles.push(handle3);
1049 960
1050 return handles; 961 return handles;
1051 }; 962 };
1052 963
1053 -mxShapeArrows2BendArrow.prototype.getConstraints = function(style, w, h)  
1054 -{ 964 +mxShapeArrows2BendArrow.prototype.getConstraints = function (style, w, h) {
1055 var constr = []; 965 var constr = [];
1056 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 966 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
1057 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 967 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -1072,17 +982,15 @@ mxShapeArrows2BendArrow.prototype.getConstraints = function(style, w, h) @@ -1072,17 +982,15 @@ mxShapeArrows2BendArrow.prototype.getConstraints = function(style, w, h)
1072 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h)); 982 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h));
1073 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h - arrowHead / 2 - dy) * 0.5 + arrowHead / 2 + dy)); 983 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h - arrowHead / 2 - dy) * 0.5 + arrowHead / 2 + dy));
1074 984
1075 - if (rounded == '1')  
1076 - { 985 + if (rounded == '1') {
1077 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dy * 0.586, arrowHead / 2 - dy * 0.414)); 986 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dy * 0.586, arrowHead / 2 - dy * 0.414));
1078 - constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 2 * dy + dy * 0.0586, arrowHead / 2 + dy + dy * 0.0586)); 987 + constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 2 * dy + dy * 0.0586, arrowHead / 2 + dy + dy * 0.0586));
1079 } 988 }
1080 - else  
1081 - { 989 + else {
1082 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, arrowHead / 2 - dy)); 990 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, arrowHead / 2 - dy));
1083 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dy * 2, arrowHead / 2 + dy)); 991 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dy * 2, arrowHead / 2 + dy));
1084 } 992 }
1085 - 993 +
1086 return (constr); 994 return (constr);
1087 }; 995 };
1088 996
@@ -1092,8 +1000,7 @@ mxShapeArrows2BendArrow.prototype.getConstraints = function(style, w, h) @@ -1092,8 +1000,7 @@ mxShapeArrows2BendArrow.prototype.getConstraints = function(style, w, h)
1092 /** 1000 /**
1093 * Extends mxShape. 1001 * Extends mxShape.
1094 */ 1002 */
1095 -function mxShapeArrows2BendDoubleArrow(bounds, fill, stroke, strokewidth)  
1096 -{ 1003 +function mxShapeArrows2BendDoubleArrow(bounds, fill, stroke, strokewidth) {
1097 mxShape.call(this); 1004 mxShape.call(this);
1098 this.bounds = bounds; 1005 this.bounds = bounds;
1099 this.fill = fill; 1006 this.fill = fill;
@@ -1111,14 +1018,14 @@ function mxShapeArrows2BendDoubleArrow(bounds, fill, stroke, strokewidth) @@ -1111,14 +1018,14 @@ function mxShapeArrows2BendDoubleArrow(bounds, fill, stroke, strokewidth)
1111 mxUtils.extend(mxShapeArrows2BendDoubleArrow, mxActor); 1018 mxUtils.extend(mxShapeArrows2BendDoubleArrow, mxActor);
1112 1019
1113 mxShapeArrows2BendDoubleArrow.prototype.customProperties = [ 1020 mxShapeArrows2BendDoubleArrow.prototype.customProperties = [
1114 - {name: 'dx', dispName: 'Arrowhead Length', type: 'float', min:0, defVal:38},  
1115 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, defVal:15},  
1116 - {name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min:0, defVal:55},  
1117 - {name: 'rounded', dispName: 'Rounded', type: 'boolean', defVal:false} 1021 + { name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 38 },
  1022 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, defVal: 15 },
  1023 + { name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min: 0, defVal: 55 },
  1024 + { name: 'rounded', dispName: 'Rounded', type: 'boolean', defVal: false }
1118 ]; 1025 ];
1119 1026
1120 mxShapeArrows2BendDoubleArrow.prototype.cst = { 1027 mxShapeArrows2BendDoubleArrow.prototype.cst = {
1121 - BEND_DOUBLE_ARROW : 'mxgraph.arrows2.bendDoubleArrow' 1028 + BEND_DOUBLE_ARROW: 'mxgraph.arrows2.bendDoubleArrow'
1122 }; 1029 };
1123 1030
1124 /** 1031 /**
@@ -1126,8 +1033,7 @@ mxShapeArrows2BendDoubleArrow.prototype.cst = { @@ -1126,8 +1033,7 @@ mxShapeArrows2BendDoubleArrow.prototype.cst = {
1126 * 1033 *
1127 * Paints the vertex shape. 1034 * Paints the vertex shape.
1128 */ 1035 */
1129 -mxShapeArrows2BendDoubleArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
1130 -{ 1036 +mxShapeArrows2BendDoubleArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
1131 c.translate(x, y); 1037 c.translate(x, y);
1132 1038
1133 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 1039 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -1141,29 +1047,25 @@ mxShapeArrows2BendDoubleArrow.prototype.paintVertexShape = function(c, x, y, w, @@ -1141,29 +1047,25 @@ mxShapeArrows2BendDoubleArrow.prototype.paintVertexShape = function(c, x, y, w,
1141 c.lineTo(w - dx, arrowHead); 1047 c.lineTo(w - dx, arrowHead);
1142 c.lineTo(w - dx, arrowHead / 2 + dy); 1048 c.lineTo(w - dx, arrowHead / 2 + dy);
1143 1049
1144 - if (rounded == '1')  
1145 - { 1050 + if (rounded == '1') {
1146 c.lineTo(arrowHead / 2 + dy * 1.2, arrowHead / 2 + dy); 1051 c.lineTo(arrowHead / 2 + dy * 1.2, arrowHead / 2 + dy);
1147 - c.arcTo(dy * 0.2, dy * 0.2, 0, 0, 0, arrowHead /2 + dy, arrowHead / 2 + dy * 1.2); 1052 + c.arcTo(dy * 0.2, dy * 0.2, 0, 0, 0, arrowHead / 2 + dy, arrowHead / 2 + dy * 1.2);
1148 } 1053 }
1149 - else  
1150 - { 1054 + else {
1151 c.lineTo(arrowHead / 2 + dy, arrowHead / 2 + dy); 1055 c.lineTo(arrowHead / 2 + dy, arrowHead / 2 + dy);
1152 } 1056 }
1153 - 1057 +
1154 c.lineTo(arrowHead / 2 + dy, h - dx); 1058 c.lineTo(arrowHead / 2 + dy, h - dx);
1155 c.lineTo(arrowHead, h - dx); 1059 c.lineTo(arrowHead, h - dx);
1156 c.lineTo(arrowHead / 2, h); 1060 c.lineTo(arrowHead / 2, h);
1157 c.lineTo(0, h - dx); 1061 c.lineTo(0, h - dx);
1158 c.lineTo(arrowHead / 2 - dy, h - dx); 1062 c.lineTo(arrowHead / 2 - dy, h - dx);
1159 -  
1160 - if (rounded == '1')  
1161 - { 1063 +
  1064 + if (rounded == '1') {
1162 c.lineTo(arrowHead / 2 - dy, arrowHead / 2 + dy); 1065 c.lineTo(arrowHead / 2 - dy, arrowHead / 2 + dy);
1163 c.arcTo(dy * 2, dy * 2, 0, 0, 1, arrowHead / 2 + dy, arrowHead / 2 - dy); 1066 c.arcTo(dy * 2, dy * 2, 0, 0, 1, arrowHead / 2 + dy, arrowHead / 2 - dy);
1164 } 1067 }
1165 - else  
1166 - { 1068 + else {
1167 c.lineTo(arrowHead / 2 - dy, arrowHead / 2 - dy); 1069 c.lineTo(arrowHead / 2 - dy, arrowHead / 2 - dy);
1168 } 1070 }
1169 1071
@@ -1176,47 +1078,41 @@ mxCellRenderer.registerShape(mxShapeArrows2BendDoubleArrow.prototype.cst.BEND_DO @@ -1176,47 +1078,41 @@ mxCellRenderer.registerShape(mxShapeArrows2BendDoubleArrow.prototype.cst.BEND_DO
1176 1078
1177 mxShapeArrows2BendDoubleArrow.prototype.constraints = null; 1079 mxShapeArrows2BendDoubleArrow.prototype.constraints = null;
1178 1080
1179 -Graph.handleFactory[mxShapeArrows2BendDoubleArrow.prototype.cst.BEND_DOUBLE_ARROW] = function(state)  
1180 -{  
1181 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
1182 - {  
1183 - var arrowHead = Math.max(0, Math.min(Math.min(bounds.height, bounds.width) - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1184 - var dx = Math.max(0, Math.min(Math.min(bounds.width, bounds.height) - arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
1185 - var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
1186 -  
1187 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + arrowHead / 2 - dy);  
1188 - }, function(bounds, pt)  
1189 - {  
1190 - this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(Math.min(bounds.width, bounds.height) - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.x + bounds.width - pt.x))) / 100;  
1191 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2, bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2 - pt.y))) / 100;  
1192 -  
1193 - })];  
1194 -  
1195 - var handle2 = Graph.createHandle(state, ['arrowHead'], function(bounds)  
1196 - {  
1197 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
1198 - var arrowHead = Math.max(0, Math.min(Math.min(bounds.height, bounds.width) - dx, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1199 -  
1200 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + arrowHead);  
1201 - }, function(bounds, pt)  
1202 - {  
1203 - this.state.style['arrowHead'] = Math.round(100 * Math.max(2 * parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(Math.min(bounds.height, bounds.width) - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.y - bounds.y))) / 100;  
1204 - });  
1205 - 1081 +Graph.handleFactory[mxShapeArrows2BendDoubleArrow.prototype.cst.BEND_DOUBLE_ARROW] = function (state) {
  1082 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
  1083 + var arrowHead = Math.max(0, Math.min(Math.min(bounds.height, bounds.width) - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1084 + var dx = Math.max(0, Math.min(Math.min(bounds.width, bounds.height) - arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  1085 + var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  1086 +
  1087 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + arrowHead / 2 - dy);
  1088 + }, function (bounds, pt) {
  1089 + this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(Math.min(bounds.width, bounds.height) - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.x + bounds.width - pt.x))) / 100;
  1090 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2, bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2 - pt.y))) / 100;
  1091 +
  1092 + })];
  1093 +
  1094 + var handle2 = Graph.createHandle(state, ['arrowHead'], function (bounds) {
  1095 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  1096 + var arrowHead = Math.max(0, Math.min(Math.min(bounds.height, bounds.width) - dx, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1097 +
  1098 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + arrowHead);
  1099 + }, function (bounds, pt) {
  1100 + this.state.style['arrowHead'] = Math.round(100 * Math.max(2 * parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(Math.min(bounds.height, bounds.width) - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.y - bounds.y))) / 100;
  1101 + });
  1102 +
1206 handles.push(handle2); 1103 handles.push(handle2);
1207 1104
1208 return handles; 1105 return handles;
1209 }; 1106 };
1210 1107
1211 -mxShapeArrows2BendDoubleArrow.prototype.getConstraints = function(style, w, h)  
1212 -{ 1108 +mxShapeArrows2BendDoubleArrow.prototype.getConstraints = function (style, w, h) {
1213 var constr = []; 1109 var constr = [];
1214 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 1110 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
1215 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1111 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1216 var arrowHead = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead)))); 1112 var arrowHead = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
1217 var rounded = mxUtils.getValue(this.style, 'rounded', '0'); 1113 var rounded = mxUtils.getValue(this.style, 'rounded', '0');
1218 1114
1219 - constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx , 0)); 1115 + constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, 0));
1220 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, arrowHead * 0.5)); 1116 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, arrowHead * 0.5));
1221 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead)); 1117 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead));
1222 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead / 2 + dy)); 1118 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead / 2 + dy));
@@ -1230,17 +1126,15 @@ mxShapeArrows2BendDoubleArrow.prototype.getConstraints = function(style, w, h) @@ -1230,17 +1126,15 @@ mxShapeArrows2BendDoubleArrow.prototype.getConstraints = function(style, w, h)
1230 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - dx)); 1126 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - dx));
1231 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 - dy, h - dx)); 1127 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 - dy, h - dx));
1232 1128
1233 - if (rounded == '1')  
1234 - { 1129 + if (rounded == '1') {
1235 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 - dy * 0.414, arrowHead / 2 - dy * 0.414)); 1130 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 - dy * 0.414, arrowHead / 2 - dy * 0.414));
1236 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 + dy + dy * 0.0586, arrowHead / 2 + dy + dy * 0.0586)); 1131 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 + dy + dy * 0.0586, arrowHead / 2 + dy + dy * 0.0586));
1237 } 1132 }
1238 - else  
1239 - { 1133 + else {
1240 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 - dy, arrowHead / 2 - dy)); 1134 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 - dy, arrowHead / 2 - dy));
1241 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 + dy, arrowHead / 2 + dy)); 1135 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 + dy, arrowHead / 2 + dy));
1242 } 1136 }
1243 - 1137 +
1244 return (constr); 1138 return (constr);
1245 }; 1139 };
1246 1140
@@ -1250,8 +1144,7 @@ mxShapeArrows2BendDoubleArrow.prototype.getConstraints = function(style, w, h) @@ -1250,8 +1144,7 @@ mxShapeArrows2BendDoubleArrow.prototype.getConstraints = function(style, w, h)
1250 /** 1144 /**
1251 * Extends mxShape. 1145 * Extends mxShape.
1252 */ 1146 */
1253 -function mxShapeArrows2CalloutDoubleArrow(bounds, fill, stroke, strokewidth)  
1254 -{ 1147 +function mxShapeArrows2CalloutDoubleArrow(bounds, fill, stroke, strokewidth) {
1255 mxShape.call(this); 1148 mxShape.call(this);
1256 this.bounds = bounds; 1149 this.bounds = bounds;
1257 this.fill = fill; 1150 this.fill = fill;
@@ -1269,14 +1162,14 @@ function mxShapeArrows2CalloutDoubleArrow(bounds, fill, stroke, strokewidth) @@ -1269,14 +1162,14 @@ function mxShapeArrows2CalloutDoubleArrow(bounds, fill, stroke, strokewidth)
1269 mxUtils.extend(mxShapeArrows2CalloutDoubleArrow, mxActor); 1162 mxUtils.extend(mxShapeArrows2CalloutDoubleArrow, mxActor);
1270 1163
1271 mxShapeArrows2CalloutDoubleArrow.prototype.customProperties = [ 1164 mxShapeArrows2CalloutDoubleArrow.prototype.customProperties = [
1272 - {name: 'dx', dispName: 'Arrowhead Length', type: 'float', min:0, defVal:20},  
1273 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, defVal:10},  
1274 - {name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min:0, defVal:10},  
1275 - {name: 'notch', dispName: 'Rect Size', type: 'float', min:0, defVal:24} 1165 + { name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 20 },
  1166 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, defVal: 10 },
  1167 + { name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min: 0, defVal: 10 },
  1168 + { name: 'notch', dispName: 'Rect Size', type: 'float', min: 0, defVal: 24 }
1276 ]; 1169 ];
1277 1170
1278 mxShapeArrows2CalloutDoubleArrow.prototype.cst = { 1171 mxShapeArrows2CalloutDoubleArrow.prototype.cst = {
1279 - CALLOUT_DOUBLE_ARROW : 'mxgraph.arrows2.calloutDoubleArrow' 1172 + CALLOUT_DOUBLE_ARROW: 'mxgraph.arrows2.calloutDoubleArrow'
1280 }; 1173 };
1281 1174
1282 /** 1175 /**
@@ -1284,8 +1177,7 @@ mxShapeArrows2CalloutDoubleArrow.prototype.cst = { @@ -1284,8 +1177,7 @@ mxShapeArrows2CalloutDoubleArrow.prototype.cst = {
1284 * 1177 *
1285 * Paints the vertex shape. 1178 * Paints the vertex shape.
1286 */ 1179 */
1287 -mxShapeArrows2CalloutDoubleArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
1288 -{ 1180 +mxShapeArrows2CalloutDoubleArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
1289 c.translate(x, y); 1181 c.translate(x, y);
1290 1182
1291 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 1183 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -1320,53 +1212,45 @@ mxCellRenderer.registerShape(mxShapeArrows2CalloutDoubleArrow.prototype.cst.CALL @@ -1320,53 +1212,45 @@ mxCellRenderer.registerShape(mxShapeArrows2CalloutDoubleArrow.prototype.cst.CALL
1320 1212
1321 mxShapeArrows2CalloutDoubleArrow.prototype.constraints = null; 1213 mxShapeArrows2CalloutDoubleArrow.prototype.constraints = null;
1322 1214
1323 -Graph.handleFactory[mxShapeArrows2CalloutDoubleArrow.prototype.cst.CALLOUT_DOUBLE_ARROW] = function(state)  
1324 -{  
1325 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
1326 - {  
1327 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1328 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
1329 - var dy = Math.max(0, Math.min(bounds.height / 2 - arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
1330 -  
1331 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy);  
1332 - }, function(bounds, pt)  
1333 - {  
1334 - this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width / 2 - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;  
1335 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.y + bounds.height / 2 - pt.y))) / 100;  
1336 -  
1337 - })];  
1338 -  
1339 - var handle2 = Graph.createHandle(state, ['notch'], function(bounds)  
1340 - {  
1341 - var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));  
1342 -  
1343 - return new mxPoint(bounds.x + bounds.width / 2 + notch, bounds.y + bounds.height / 2);  
1344 - }, function(bounds, pt)  
1345 - {  
1346 - this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.x - bounds.x - bounds.width / 2))) / 100;  
1347 - }); 1215 +Graph.handleFactory[mxShapeArrows2CalloutDoubleArrow.prototype.cst.CALLOUT_DOUBLE_ARROW] = function (state) {
  1216 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
  1217 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1218 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  1219 + var dy = Math.max(0, Math.min(bounds.height / 2 - arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  1220 +
  1221 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy);
  1222 + }, function (bounds, pt) {
  1223 + this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width / 2 - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;
  1224 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.y + bounds.height / 2 - pt.y))) / 100;
  1225 +
  1226 + })];
  1227 +
  1228 + var handle2 = Graph.createHandle(state, ['notch'], function (bounds) {
  1229 + var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));
  1230 +
  1231 + return new mxPoint(bounds.x + bounds.width / 2 + notch, bounds.y + bounds.height / 2);
  1232 + }, function (bounds, pt) {
  1233 + this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.x - bounds.x - bounds.width / 2))) / 100;
  1234 + });
1348 1235
1349 handles.push(handle2); 1236 handles.push(handle2);
1350 -  
1351 - var handle3 = Graph.createHandle(state, ['arrowHead'], function(bounds)  
1352 - {  
1353 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
1354 - var dy = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
1355 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1356 -  
1357 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy - arrowHead);  
1358 - }, function(bounds, pt)  
1359 - {  
1360 - this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), bounds.y + bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) - pt.y))) / 100;  
1361 - }); 1237 +
  1238 + var handle3 = Graph.createHandle(state, ['arrowHead'], function (bounds) {
  1239 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  1240 + var dy = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  1241 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1242 +
  1243 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy - arrowHead);
  1244 + }, function (bounds, pt) {
  1245 + this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), bounds.y + bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) - pt.y))) / 100;
  1246 + });
1362 1247
1363 handles.push(handle3); 1248 handles.push(handle3);
1364 - 1249 +
1365 return handles; 1250 return handles;
1366 }; 1251 };
1367 1252
1368 -mxShapeArrows2CalloutDoubleArrow.prototype.getConstraints = function(style, w, h)  
1369 -{ 1253 +mxShapeArrows2CalloutDoubleArrow.prototype.getConstraints = function (style, w, h) {
1370 var constr = []; 1254 var constr = [];
1371 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 1255 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
1372 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1256 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -1389,7 +1273,7 @@ mxShapeArrows2CalloutDoubleArrow.prototype.getConstraints = function(style, w, h @@ -1389,7 +1273,7 @@ mxShapeArrows2CalloutDoubleArrow.prototype.getConstraints = function(style, w, h
1389 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 1.5 - dx + notch) * 0.5, h * 0.5 + dy)); 1273 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 1.5 - dx + notch) * 0.5, h * 0.5 + dy));
1390 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 0.5 + dx - notch) * 0.5, h * 0.5 - dy)); 1274 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 0.5 + dx - notch) * 0.5, h * 0.5 - dy));
1391 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 0.5 + dx - notch) * 0.5, h * 0.5 + dy)); 1275 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 0.5 + dx - notch) * 0.5, h * 0.5 + dy));
1392 - 1276 +
1393 return (constr); 1277 return (constr);
1394 }; 1278 };
1395 1279
@@ -1399,8 +1283,7 @@ mxShapeArrows2CalloutDoubleArrow.prototype.getConstraints = function(style, w, h @@ -1399,8 +1283,7 @@ mxShapeArrows2CalloutDoubleArrow.prototype.getConstraints = function(style, w, h
1399 /** 1283 /**
1400 * Extends mxShape. 1284 * Extends mxShape.
1401 */ 1285 */
1402 -function mxShapeArrows2CalloutQuadArrow(bounds, fill, stroke, strokewidth)  
1403 -{ 1286 +function mxShapeArrows2CalloutQuadArrow(bounds, fill, stroke, strokewidth) {
1404 mxShape.call(this); 1287 mxShape.call(this);
1405 this.bounds = bounds; 1288 this.bounds = bounds;
1406 this.fill = fill; 1289 this.fill = fill;
@@ -1418,14 +1301,14 @@ function mxShapeArrows2CalloutQuadArrow(bounds, fill, stroke, strokewidth) @@ -1418,14 +1301,14 @@ function mxShapeArrows2CalloutQuadArrow(bounds, fill, stroke, strokewidth)
1418 mxUtils.extend(mxShapeArrows2CalloutQuadArrow, mxActor); 1301 mxUtils.extend(mxShapeArrows2CalloutQuadArrow, mxActor);
1419 1302
1420 mxShapeArrows2CalloutQuadArrow.prototype.customProperties = [ 1303 mxShapeArrows2CalloutQuadArrow.prototype.customProperties = [
1421 - {name: 'dx', dispName: 'Arrowhead Length', type: 'float', min:0, defVal:20},  
1422 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, defVal: 10},  
1423 - {name: 'notch', dispName: 'Rect Size', type: 'float', min:0, defVal:24},  
1424 - {name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min:0, defVal:10} 1304 + { name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 20 },
  1305 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, defVal: 10 },
  1306 + { name: 'notch', dispName: 'Rect Size', type: 'float', min: 0, defVal: 24 },
  1307 + { name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min: 0, defVal: 10 }
1425 ]; 1308 ];
1426 1309
1427 mxShapeArrows2CalloutQuadArrow.prototype.cst = { 1310 mxShapeArrows2CalloutQuadArrow.prototype.cst = {
1428 - CALLOUT_QUAD_ARROW : 'mxgraph.arrows2.calloutQuadArrow' 1311 + CALLOUT_QUAD_ARROW: 'mxgraph.arrows2.calloutQuadArrow'
1429 }; 1312 };
1430 1313
1431 /** 1314 /**
@@ -1433,8 +1316,7 @@ mxShapeArrows2CalloutQuadArrow.prototype.cst = { @@ -1433,8 +1316,7 @@ mxShapeArrows2CalloutQuadArrow.prototype.cst = {
1433 * 1316 *
1434 * Paints the vertex shape. 1317 * Paints the vertex shape.
1435 */ 1318 */
1436 -mxShapeArrows2CalloutQuadArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
1437 -{ 1319 +mxShapeArrows2CalloutQuadArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
1438 c.translate(x, y); 1320 c.translate(x, y);
1439 1321
1440 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 1322 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -1483,53 +1365,45 @@ mxCellRenderer.registerShape(mxShapeArrows2CalloutQuadArrow.prototype.cst.CALLOU @@ -1483,53 +1365,45 @@ mxCellRenderer.registerShape(mxShapeArrows2CalloutQuadArrow.prototype.cst.CALLOU
1483 1365
1484 mxShapeArrows2CalloutQuadArrow.prototype.constraints = null; 1366 mxShapeArrows2CalloutQuadArrow.prototype.constraints = null;
1485 1367
1486 -Graph.handleFactory[mxShapeArrows2CalloutQuadArrow.prototype.cst.CALLOUT_QUAD_ARROW] = function(state)  
1487 -{  
1488 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
1489 - {  
1490 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1491 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
1492 - var dy = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
1493 -  
1494 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy);  
1495 - }, function(bounds, pt)  
1496 - {  
1497 - this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(Math.min(bounds.width, bounds.height) / 2 - Math.max(parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))), bounds.x + bounds.width - pt.x))) / 100;  
1498 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.y + bounds.height / 2 - pt.y))) / 100;  
1499 -  
1500 - })];  
1501 -  
1502 - var handle2 = Graph.createHandle(state, ['notch'], function(bounds)  
1503 - {  
1504 - var notch = Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(Math.min(bounds.width, bounds.height), parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));  
1505 -  
1506 - return new mxPoint(bounds.x + bounds.width / 2 + notch, bounds.y + bounds.height / 2);  
1507 - }, function(bounds, pt)  
1508 - {  
1509 - this.state.style['notch'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(Math.min(bounds.width, bounds.height) / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.x - bounds.x - bounds.width / 2))) / 100;  
1510 - }); 1368 +Graph.handleFactory[mxShapeArrows2CalloutQuadArrow.prototype.cst.CALLOUT_QUAD_ARROW] = function (state) {
  1369 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
  1370 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1371 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  1372 + var dy = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  1373 +
  1374 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy);
  1375 + }, function (bounds, pt) {
  1376 + this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(Math.min(bounds.width, bounds.height) / 2 - Math.max(parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))), bounds.x + bounds.width - pt.x))) / 100;
  1377 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.y + bounds.height / 2 - pt.y))) / 100;
  1378 +
  1379 + })];
  1380 +
  1381 + var handle2 = Graph.createHandle(state, ['notch'], function (bounds) {
  1382 + var notch = Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(Math.min(bounds.width, bounds.height), parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));
  1383 +
  1384 + return new mxPoint(bounds.x + bounds.width / 2 + notch, bounds.y + bounds.height / 2);
  1385 + }, function (bounds, pt) {
  1386 + this.state.style['notch'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(Math.min(bounds.width, bounds.height) / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.x - bounds.x - bounds.width / 2))) / 100;
  1387 + });
1511 1388
1512 handles.push(handle2); 1389 handles.push(handle2);
1513 -  
1514 - var handle3 = Graph.createHandle(state, ['arrowHead'], function(bounds)  
1515 - {  
1516 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
1517 - var dy = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
1518 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1519 -  
1520 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy - arrowHead);  
1521 - }, function(bounds, pt)  
1522 - {  
1523 - this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), bounds.y + bounds.height / 2 - pt.y))) / 100;  
1524 - }); 1390 +
  1391 + var handle3 = Graph.createHandle(state, ['arrowHead'], function (bounds) {
  1392 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  1393 + var dy = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  1394 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1395 +
  1396 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy - arrowHead);
  1397 + }, function (bounds, pt) {
  1398 + this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), bounds.y + bounds.height / 2 - pt.y))) / 100;
  1399 + });
1525 1400
1526 handles.push(handle3); 1401 handles.push(handle3);
1527 - 1402 +
1528 return handles; 1403 return handles;
1529 }; 1404 };
1530 1405
1531 -mxShapeArrows2CalloutQuadArrow.prototype.getConstraints = function(style, w, h)  
1532 -{ 1406 +mxShapeArrows2CalloutQuadArrow.prototype.getConstraints = function (style, w, h) {
1533 var constr = []; 1407 var constr = [];
1534 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 1408 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
1535 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1409 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -1568,7 +1442,7 @@ mxShapeArrows2CalloutQuadArrow.prototype.getConstraints = function(style, w, h) @@ -1568,7 +1442,7 @@ mxShapeArrows2CalloutQuadArrow.prototype.getConstraints = function(style, w, h)
1568 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.25 - (notch - dx) * 0.5, h * 0.5 + dy)); 1442 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.25 - (notch - dx) * 0.5, h * 0.5 + dy));
1569 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy, h * 0.25 - (notch - dx) * 0.5)); 1443 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy, h * 0.25 - (notch - dx) * 0.5));
1570 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + dy, h * 0.25 - (notch - dx) * 0.5)); 1444 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + dy, h * 0.25 - (notch - dx) * 0.5));
1571 - 1445 +
1572 return (constr); 1446 return (constr);
1573 }; 1447 };
1574 1448
@@ -1578,8 +1452,7 @@ mxShapeArrows2CalloutQuadArrow.prototype.getConstraints = function(style, w, h) @@ -1578,8 +1452,7 @@ mxShapeArrows2CalloutQuadArrow.prototype.getConstraints = function(style, w, h)
1578 /** 1452 /**
1579 * Extends mxShape. 1453 * Extends mxShape.
1580 */ 1454 */
1581 -function mxShapeArrows2CalloutDouble90Arrow(bounds, fill, stroke, strokewidth)  
1582 -{ 1455 +function mxShapeArrows2CalloutDouble90Arrow(bounds, fill, stroke, strokewidth) {
1583 mxShape.call(this); 1456 mxShape.call(this);
1584 this.bounds = bounds; 1457 this.bounds = bounds;
1585 this.fill = fill; 1458 this.fill = fill;
@@ -1598,15 +1471,15 @@ function mxShapeArrows2CalloutDouble90Arrow(bounds, fill, stroke, strokewidth) @@ -1598,15 +1471,15 @@ function mxShapeArrows2CalloutDouble90Arrow(bounds, fill, stroke, strokewidth)
1598 mxUtils.extend(mxShapeArrows2CalloutDouble90Arrow, mxActor); 1471 mxUtils.extend(mxShapeArrows2CalloutDouble90Arrow, mxActor);
1599 1472
1600 mxShapeArrows2CalloutDouble90Arrow.prototype.customProperties = [ 1473 mxShapeArrows2CalloutDouble90Arrow.prototype.customProperties = [
1601 - {name: 'dx1', dispName: 'Arrowhead Length', type: 'float', min:0, defVal:20},  
1602 - {name: 'dy1', dispName: 'Arrow Width', type: 'float', min:0, defVal: 10},  
1603 - {name: 'dx2', dispName: 'Callout Width', type: 'float', min:0, defVal:70},  
1604 - {name: 'dy2', dispName: 'Callout Height', type: 'float', min:0, defVal:70},  
1605 - {name: 'arrowHead', dispName: 'ArrowHead Width', type: 'float', min:0, defVal:10} 1474 + { name: 'dx1', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 20 },
  1475 + { name: 'dy1', dispName: 'Arrow Width', type: 'float', min: 0, defVal: 10 },
  1476 + { name: 'dx2', dispName: 'Callout Width', type: 'float', min: 0, defVal: 70 },
  1477 + { name: 'dy2', dispName: 'Callout Height', type: 'float', min: 0, defVal: 70 },
  1478 + { name: 'arrowHead', dispName: 'ArrowHead Width', type: 'float', min: 0, defVal: 10 }
1606 ]; 1479 ];
1607 1480
1608 mxShapeArrows2CalloutDouble90Arrow.prototype.cst = { 1481 mxShapeArrows2CalloutDouble90Arrow.prototype.cst = {
1609 - CALLOUT_DOUBLE_90_ARROW : 'mxgraph.arrows2.calloutDouble90Arrow' 1482 + CALLOUT_DOUBLE_90_ARROW: 'mxgraph.arrows2.calloutDouble90Arrow'
1610 }; 1483 };
1611 1484
1612 /** 1485 /**
@@ -1614,8 +1487,7 @@ mxShapeArrows2CalloutDouble90Arrow.prototype.cst = { @@ -1614,8 +1487,7 @@ mxShapeArrows2CalloutDouble90Arrow.prototype.cst = {
1614 * 1487 *
1615 * Paints the vertex shape. 1488 * Paints the vertex shape.
1616 */ 1489 */
1617 -mxShapeArrows2CalloutDouble90Arrow.prototype.paintVertexShape = function(c, x, y, w, h)  
1618 -{ 1490 +mxShapeArrows2CalloutDouble90Arrow.prototype.paintVertexShape = function (c, x, y, w, h) {
1619 c.translate(x, y); 1491 c.translate(x, y);
1620 1492
1621 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 1493 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
@@ -1651,55 +1523,47 @@ mxCellRenderer.registerShape(mxShapeArrows2CalloutDouble90Arrow.prototype.cst.CA @@ -1651,55 +1523,47 @@ mxCellRenderer.registerShape(mxShapeArrows2CalloutDouble90Arrow.prototype.cst.CA
1651 1523
1652 mxShapeArrows2CalloutDouble90Arrow.prototype.constraints = null; 1524 mxShapeArrows2CalloutDouble90Arrow.prototype.constraints = null;
1653 1525
1654 -Graph.handleFactory[mxShapeArrows2CalloutDouble90Arrow.prototype.cst.CALLOUT_DOUBLE_90_ARROW] = function(state)  
1655 -{  
1656 - var handles = [Graph.createHandle(state, ['dx1', 'dy1'], function(bounds)  
1657 - {  
1658 - var arrowHead = Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1659 - var dx1 = Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)), parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));  
1660 - var dy1 = Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));  
1661 -  
1662 - return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - dy1);  
1663 - }, function(bounds, pt)  
1664 - {  
1665 - this.state.style['dx1'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)), bounds.height - parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)), bounds.x + bounds.width - pt.x))) / 100;  
1666 - this.state.style['dy1'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - pt.y))) / 100;  
1667 -  
1668 - })];  
1669 -  
1670 - var handle2 = Graph.createHandle(state, ['dx2', 'dy2'], function(bounds)  
1671 - {  
1672 - var dx2 = Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));  
1673 - var dy2 = Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), Math.min(bounds.height - parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2))));  
1674 -  
1675 - return new mxPoint(bounds.x + dx2, bounds.y + dy2);  
1676 - }, function(bounds, pt)  
1677 - {  
1678 - this.state.style['dx2'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), pt.x - bounds.x))) / 100;  
1679 - this.state.style['dy2'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), Math.min(bounds.height - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), pt.y - bounds.y))) / 100;  
1680 - }); 1526 +Graph.handleFactory[mxShapeArrows2CalloutDouble90Arrow.prototype.cst.CALLOUT_DOUBLE_90_ARROW] = function (state) {
  1527 + var handles = [Graph.createHandle(state, ['dx1', 'dy1'], function (bounds) {
  1528 + var arrowHead = Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1529 + var dx1 = Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)), parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));
  1530 + var dy1 = Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));
  1531 +
  1532 + return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - dy1);
  1533 + }, function (bounds, pt) {
  1534 + this.state.style['dx1'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)), bounds.height - parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)), bounds.x + bounds.width - pt.x))) / 100;
  1535 + this.state.style['dy1'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - pt.y))) / 100;
  1536 +
  1537 + })];
  1538 +
  1539 + var handle2 = Graph.createHandle(state, ['dx2', 'dy2'], function (bounds) {
  1540 + var dx2 = Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));
  1541 + var dy2 = Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), Math.min(bounds.height - parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2))));
  1542 +
  1543 + return new mxPoint(bounds.x + dx2, bounds.y + dy2);
  1544 + }, function (bounds, pt) {
  1545 + this.state.style['dx2'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), pt.x - bounds.x))) / 100;
  1546 + this.state.style['dy2'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), Math.min(bounds.height - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), pt.y - bounds.y))) / 100;
  1547 + });
1681 1548
1682 handles.push(handle2); 1549 handles.push(handle2);
1683 -  
1684 - var handle3 = Graph.createHandle(state, ['arrowHead'], function(bounds)  
1685 - {  
1686 - var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));  
1687 - var dy1 = Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));  
1688 - var arrowHead = Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1689 -  
1690 - return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - dy1 - arrowHead);  
1691 - }, function(bounds, pt)  
1692 - {  
1693 - this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) - pt.y))) / 100;  
1694 - }); 1550 +
  1551 + var handle3 = Graph.createHandle(state, ['arrowHead'], function (bounds) {
  1552 + var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));
  1553 + var dy1 = Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));
  1554 + var arrowHead = Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1555 +
  1556 + return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - dy1 - arrowHead);
  1557 + }, function (bounds, pt) {
  1558 + this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) - pt.y))) / 100;
  1559 + });
1695 1560
1696 handles.push(handle3); 1561 handles.push(handle3);
1697 - 1562 +
1698 return handles; 1563 return handles;
1699 }; 1564 };
1700 1565
1701 -mxShapeArrows2CalloutDouble90Arrow.prototype.getConstraints = function(style, w, h)  
1702 -{ 1566 +mxShapeArrows2CalloutDouble90Arrow.prototype.getConstraints = function (style, w, h) {
1703 var constr = []; 1567 var constr = [];
1704 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 1568 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
1705 var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1)))); 1569 var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
@@ -1722,7 +1586,7 @@ mxShapeArrows2CalloutDouble90Arrow.prototype.getConstraints = function(style, w, @@ -1722,7 +1586,7 @@ mxShapeArrows2CalloutDouble90Arrow.prototype.getConstraints = function(style, w,
1722 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2 / 2, h)); 1586 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2 / 2, h));
1723 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2 / 2 - dy1 - arrowHead, h - dx1)); 1587 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2 / 2 - dy1 - arrowHead, h - dx1));
1724 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy2)); 1588 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy2));
1725 - 1589 +
1726 return (constr); 1590 return (constr);
1727 }; 1591 };
1728 1592
@@ -1732,8 +1596,7 @@ mxShapeArrows2CalloutDouble90Arrow.prototype.getConstraints = function(style, w, @@ -1732,8 +1596,7 @@ mxShapeArrows2CalloutDouble90Arrow.prototype.getConstraints = function(style, w,
1732 /** 1596 /**
1733 * Extends mxShape. 1597 * Extends mxShape.
1734 */ 1598 */
1735 -function mxShapeArrows2QuadArrow(bounds, fill, stroke, strokewidth)  
1736 -{ 1599 +function mxShapeArrows2QuadArrow(bounds, fill, stroke, strokewidth) {
1737 mxShape.call(this); 1600 mxShape.call(this);
1738 this.bounds = bounds; 1601 this.bounds = bounds;
1739 this.fill = fill; 1602 this.fill = fill;
@@ -1751,13 +1614,13 @@ function mxShapeArrows2QuadArrow(bounds, fill, stroke, strokewidth) @@ -1751,13 +1614,13 @@ function mxShapeArrows2QuadArrow(bounds, fill, stroke, strokewidth)
1751 mxUtils.extend(mxShapeArrows2QuadArrow, mxActor); 1614 mxUtils.extend(mxShapeArrows2QuadArrow, mxActor);
1752 1615
1753 mxShapeArrows2QuadArrow.prototype.customProperties = [ 1616 mxShapeArrows2QuadArrow.prototype.customProperties = [
1754 - {name: 'dx', dispName: 'Arrowhead Length', type: 'float', min:0, defVal:20},  
1755 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, defVal:10},  
1756 - {name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min:0, defVal:10} 1617 + { name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 20 },
  1618 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, defVal: 10 },
  1619 + { name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min: 0, defVal: 10 }
1757 ]; 1620 ];
1758 1621
1759 mxShapeArrows2QuadArrow.prototype.cst = { 1622 mxShapeArrows2QuadArrow.prototype.cst = {
1760 - QUAD_ARROW : 'mxgraph.arrows2.quadArrow' 1623 + QUAD_ARROW: 'mxgraph.arrows2.quadArrow'
1761 }; 1624 };
1762 1625
1763 /** 1626 /**
@@ -1765,8 +1628,7 @@ mxShapeArrows2QuadArrow.prototype.cst = { @@ -1765,8 +1628,7 @@ mxShapeArrows2QuadArrow.prototype.cst = {
1765 * 1628 *
1766 * Paints the vertex shape. 1629 * Paints the vertex shape.
1767 */ 1630 */
1768 -mxShapeArrows2QuadArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
1769 -{ 1631 +mxShapeArrows2QuadArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
1770 c.translate(x, y); 1632 c.translate(x, y);
1771 1633
1772 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 1634 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -1806,41 +1668,35 @@ mxCellRenderer.registerShape(mxShapeArrows2QuadArrow.prototype.cst.QUAD_ARROW, m @@ -1806,41 +1668,35 @@ mxCellRenderer.registerShape(mxShapeArrows2QuadArrow.prototype.cst.QUAD_ARROW, m
1806 1668
1807 mxShapeArrows2QuadArrow.prototype.constraints = null; 1669 mxShapeArrows2QuadArrow.prototype.constraints = null;
1808 1670
1809 -Graph.handleFactory[mxShapeArrows2QuadArrow.prototype.cst.QUAD_ARROW] = function(state)  
1810 -{  
1811 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
1812 - {  
1813 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1814 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
1815 - var dy = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
1816 -  
1817 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy);  
1818 - }, function(bounds, pt)  
1819 - {  
1820 - this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(Math.min(bounds.width, bounds.height) / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.x + bounds.width - pt.x))) / 100;  
1821 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.y + bounds.height / 2 - pt.y))) / 100;  
1822 -  
1823 - })];  
1824 -  
1825 - var handle2 = Graph.createHandle(state, ['arrowHead'], function(bounds)  
1826 - {  
1827 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
1828 - var dy = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
1829 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1830 -  
1831 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy - arrowHead);  
1832 - }, function(bounds, pt)  
1833 - {  
1834 - this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), bounds.y + bounds.height / 2 - pt.y))) / 100;  
1835 - }); 1671 +Graph.handleFactory[mxShapeArrows2QuadArrow.prototype.cst.QUAD_ARROW] = function (state) {
  1672 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
  1673 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1674 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  1675 + var dy = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  1676 +
  1677 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy);
  1678 + }, function (bounds, pt) {
  1679 + this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(Math.min(bounds.width, bounds.height) / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.x + bounds.width - pt.x))) / 100;
  1680 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.y + bounds.height / 2 - pt.y))) / 100;
  1681 +
  1682 + })];
  1683 +
  1684 + var handle2 = Graph.createHandle(state, ['arrowHead'], function (bounds) {
  1685 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  1686 + var dy = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  1687 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1688 +
  1689 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height / 2 - dy - arrowHead);
  1690 + }, function (bounds, pt) {
  1691 + this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), bounds.y + bounds.height / 2 - pt.y))) / 100;
  1692 + });
1836 1693
1837 handles.push(handle2); 1694 handles.push(handle2);
1838 - 1695 +
1839 return handles; 1696 return handles;
1840 }; 1697 };
1841 1698
1842 -mxShapeArrows2QuadArrow.prototype.getConstraints = function(style, w, h)  
1843 -{ 1699 +mxShapeArrows2QuadArrow.prototype.getConstraints = function (style, w, h) {
1844 var constr = []; 1700 var constr = [];
1845 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 1701 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
1846 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1702 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -1866,7 +1722,7 @@ mxShapeArrows2QuadArrow.prototype.getConstraints = function(style, w, h) @@ -1866,7 +1722,7 @@ mxShapeArrows2QuadArrow.prototype.getConstraints = function(style, w, h)
1866 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dx - dy) * 0.5 + w * 0.25, h * 0.5 + dy)); 1722 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dx - dy) * 0.5 + w * 0.25, h * 0.5 + dy));
1867 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dy - dx) * 0.5 + w * 0.75, h * 0.5 - dy)); 1723 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dy - dx) * 0.5 + w * 0.75, h * 0.5 - dy));
1868 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dy - dx) * 0.5 + w * 0.75, h * 0.5 + dy)); 1724 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dy - dx) * 0.5 + w * 0.75, h * 0.5 + dy));
1869 - 1725 +
1870 return (constr); 1726 return (constr);
1871 }; 1727 };
1872 1728
@@ -1876,8 +1732,7 @@ mxShapeArrows2QuadArrow.prototype.getConstraints = function(style, w, h) @@ -1876,8 +1732,7 @@ mxShapeArrows2QuadArrow.prototype.getConstraints = function(style, w, h)
1876 /** 1732 /**
1877 * Extends mxShape. 1733 * Extends mxShape.
1878 */ 1734 */
1879 -function mxShapeArrows2TriadArrow(bounds, fill, stroke, strokewidth)  
1880 -{ 1735 +function mxShapeArrows2TriadArrow(bounds, fill, stroke, strokewidth) {
1881 mxShape.call(this); 1736 mxShape.call(this);
1882 this.bounds = bounds; 1737 this.bounds = bounds;
1883 this.fill = fill; 1738 this.fill = fill;
@@ -1894,13 +1749,13 @@ function mxShapeArrows2TriadArrow(bounds, fill, stroke, strokewidth) @@ -1894,13 +1749,13 @@ function mxShapeArrows2TriadArrow(bounds, fill, stroke, strokewidth)
1894 mxUtils.extend(mxShapeArrows2TriadArrow, mxActor); 1749 mxUtils.extend(mxShapeArrows2TriadArrow, mxActor);
1895 1750
1896 mxShapeArrows2TriadArrow.prototype.customProperties = [ 1751 mxShapeArrows2TriadArrow.prototype.customProperties = [
1897 - {name: 'dx', dispName: 'Arrowhead Length', type: 'float', min:0, defVal:20},  
1898 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, defVal:10},  
1899 - {name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min:0, defVal:40} 1752 + { name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 20 },
  1753 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, defVal: 10 },
  1754 + { name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min: 0, defVal: 40 }
1900 ]; 1755 ];
1901 1756
1902 mxShapeArrows2TriadArrow.prototype.cst = { 1757 mxShapeArrows2TriadArrow.prototype.cst = {
1903 - TRIAD_ARROW : 'mxgraph.arrows2.triadArrow' 1758 + TRIAD_ARROW: 'mxgraph.arrows2.triadArrow'
1904 }; 1759 };
1905 1760
1906 /** 1761 /**
@@ -1908,8 +1763,7 @@ mxShapeArrows2TriadArrow.prototype.cst = { @@ -1908,8 +1763,7 @@ mxShapeArrows2TriadArrow.prototype.cst = {
1908 * 1763 *
1909 * Paints the vertex shape. 1764 * Paints the vertex shape.
1910 */ 1765 */
1911 -mxShapeArrows2TriadArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
1912 -{ 1766 +mxShapeArrows2TriadArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
1913 c.translate(x, y); 1767 c.translate(x, y);
1914 1768
1915 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 1769 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -1942,41 +1796,35 @@ mxCellRenderer.registerShape(mxShapeArrows2TriadArrow.prototype.cst.TRIAD_ARROW, @@ -1942,41 +1796,35 @@ mxCellRenderer.registerShape(mxShapeArrows2TriadArrow.prototype.cst.TRIAD_ARROW,
1942 1796
1943 mxShapeArrows2TriadArrow.prototype.constraints = null; 1797 mxShapeArrows2TriadArrow.prototype.constraints = null;
1944 1798
1945 -Graph.handleFactory[mxShapeArrows2TriadArrow.prototype.cst.TRIAD_ARROW] = function(state)  
1946 -{  
1947 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
1948 - {  
1949 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1950 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
1951 - var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
1952 -  
1953 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height - dy);  
1954 - }, function(bounds, pt)  
1955 - {  
1956 - this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(Math.min(bounds.height - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.width / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2), bounds.x + bounds.width - pt.x))) / 100;  
1957 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2, bounds.y + bounds.height - pt.y))) / 100;  
1958 -  
1959 - })];  
1960 -  
1961 - var handle2 = Graph.createHandle(state, ['arrowHead'], function(bounds)  
1962 - {  
1963 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
1964 - var dy = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
1965 - var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
1966 -  
1967 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height - arrowHead);  
1968 - }, function(bounds, pt)  
1969 - {  
1970 - this.state.style['arrowHead'] = Math.round(100 * Math.max(2 * parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(bounds.height - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)) * 2, bounds.y + bounds.height - pt.y))) / 100;  
1971 - }); 1799 +Graph.handleFactory[mxShapeArrows2TriadArrow.prototype.cst.TRIAD_ARROW] = function (state) {
  1800 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
  1801 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1802 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  1803 + var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  1804 +
  1805 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height - dy);
  1806 + }, function (bounds, pt) {
  1807 + this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(Math.min(bounds.height - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), bounds.width / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2), bounds.x + bounds.width - pt.x))) / 100;
  1808 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2, bounds.y + bounds.height - pt.y))) / 100;
  1809 +
  1810 + })];
  1811 +
  1812 + var handle2 = Graph.createHandle(state, ['arrowHead'], function (bounds) {
  1813 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  1814 + var dy = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  1815 + var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1816 +
  1817 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height - arrowHead);
  1818 + }, function (bounds, pt) {
  1819 + this.state.style['arrowHead'] = Math.round(100 * Math.max(2 * parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(bounds.height - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)) * 2, bounds.y + bounds.height - pt.y))) / 100;
  1820 + });
1972 1821
1973 handles.push(handle2); 1822 handles.push(handle2);
1974 - 1823 +
1975 return handles; 1824 return handles;
1976 }; 1825 };
1977 1826
1978 -mxShapeArrows2TriadArrow.prototype.getConstraints = function(style, w, h)  
1979 -{ 1827 +mxShapeArrows2TriadArrow.prototype.getConstraints = function (style, w, h) {
1980 var constr = []; 1828 var constr = [];
1981 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 1829 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
1982 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1830 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -1998,7 +1846,7 @@ mxShapeArrows2TriadArrow.prototype.getConstraints = function(style, w, h) @@ -1998,7 +1846,7 @@ mxShapeArrows2TriadArrow.prototype.getConstraints = function(style, w, h)
1998 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 0.5 + dx - arrowHead * 0.5 + dy) * 0.5, h - dy)); 1846 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 0.5 + dx - arrowHead * 0.5 + dy) * 0.5, h - dy));
1999 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - arrowHead * 0.5 + dy, (dx + h - arrowHead + dy) * 0.5)); 1847 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - arrowHead * 0.5 + dy, (dx + h - arrowHead + dy) * 0.5));
2000 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + arrowHead * 0.5 - dy, (dx + h - arrowHead + dy) * 0.5)); 1848 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 + arrowHead * 0.5 - dy, (dx + h - arrowHead + dy) * 0.5));
2001 - 1849 +
2002 return (constr); 1850 return (constr);
2003 }; 1851 };
2004 1852
@@ -2008,8 +1856,7 @@ mxShapeArrows2TriadArrow.prototype.getConstraints = function(style, w, h) @@ -2008,8 +1856,7 @@ mxShapeArrows2TriadArrow.prototype.getConstraints = function(style, w, h)
2008 /** 1856 /**
2009 * Extends mxShape. 1857 * Extends mxShape.
2010 */ 1858 */
2011 -function mxShapeArrows2TailedArrow(bounds, fill, stroke, strokewidth)  
2012 -{ 1859 +function mxShapeArrows2TailedArrow(bounds, fill, stroke, strokewidth) {
2013 mxShape.call(this); 1860 mxShape.call(this);
2014 this.bounds = bounds; 1861 this.bounds = bounds;
2015 this.fill = fill; 1862 this.fill = fill;
@@ -2027,16 +1874,16 @@ function mxShapeArrows2TailedArrow(bounds, fill, stroke, strokewidth) @@ -2027,16 +1874,16 @@ function mxShapeArrows2TailedArrow(bounds, fill, stroke, strokewidth)
2027 mxUtils.extend(mxShapeArrows2TailedArrow, mxActor); 1874 mxUtils.extend(mxShapeArrows2TailedArrow, mxActor);
2028 1875
2029 mxShapeArrows2TailedArrow.prototype.customProperties = [ 1876 mxShapeArrows2TailedArrow.prototype.customProperties = [
2030 - {name: 'dx1', dispName: 'Arrowhead Length', type: 'float', min:0, defVal: 20},  
2031 - {name: 'dy1', dispName: 'Arrow Width', type: 'float', min:0, defVal: 10},  
2032 - {name: 'dx2', dispName: 'Tail Length', type: 'float', min:0, defVal: 25},  
2033 - {name: 'dy2', dispName: 'Tail Width', type: 'float', min:0, defVal:30},  
2034 - {name: 'notch', dispName: 'Notch', type: 'float', min:0, defVal: 0},  
2035 - {name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min:0, defVal:20} 1877 + { name: 'dx1', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 20 },
  1878 + { name: 'dy1', dispName: 'Arrow Width', type: 'float', min: 0, defVal: 10 },
  1879 + { name: 'dx2', dispName: 'Tail Length', type: 'float', min: 0, defVal: 25 },
  1880 + { name: 'dy2', dispName: 'Tail Width', type: 'float', min: 0, defVal: 30 },
  1881 + { name: 'notch', dispName: 'Notch', type: 'float', min: 0, defVal: 0 },
  1882 + { name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min: 0, defVal: 20 }
2036 ]; 1883 ];
2037 1884
2038 mxShapeArrows2TailedArrow.prototype.cst = { 1885 mxShapeArrows2TailedArrow.prototype.cst = {
2039 - TAILED_ARROW : 'mxgraph.arrows2.tailedArrow' 1886 + TAILED_ARROW: 'mxgraph.arrows2.tailedArrow'
2040 }; 1887 };
2041 1888
2042 /** 1889 /**
@@ -2044,8 +1891,7 @@ mxShapeArrows2TailedArrow.prototype.cst = { @@ -2044,8 +1891,7 @@ mxShapeArrows2TailedArrow.prototype.cst = {
2044 * 1891 *
2045 * Paints the vertex shape. 1892 * Paints the vertex shape.
2046 */ 1893 */
2047 -mxShapeArrows2TailedArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
2048 -{ 1894 +mxShapeArrows2TailedArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
2049 c.translate(x, y); 1895 c.translate(x, y);
2050 1896
2051 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 1897 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
@@ -2055,9 +1901,8 @@ mxShapeArrows2TailedArrow.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2055,9 +1901,8 @@ mxShapeArrows2TailedArrow.prototype.paintVertexShape = function(c, x, y, w, h)
2055 var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch)))); 1901 var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
2056 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead)))); 1902 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
2057 var x2 = 0; 1903 var x2 = 0;
2058 -  
2059 - if (dy2 != 0)  
2060 - { 1904 +
  1905 + if (dy2 != 0) {
2061 x2 = dx2 + dy2 * (dy2 - dy1) / dy2; 1906 x2 = dx2 + dy2 * (dy2 - dy1) / dy2;
2062 } 1907 }
2063 1908
@@ -2082,68 +1927,58 @@ mxCellRenderer.registerShape(mxShapeArrows2TailedArrow.prototype.cst.TAILED_ARRO @@ -2082,68 +1927,58 @@ mxCellRenderer.registerShape(mxShapeArrows2TailedArrow.prototype.cst.TAILED_ARRO
2082 1927
2083 mxShapeArrows2TailedArrow.prototype.constraints = null; 1928 mxShapeArrows2TailedArrow.prototype.constraints = null;
2084 1929
2085 -Graph.handleFactory[mxShapeArrows2TailedArrow.prototype.cst.TAILED_ARROW] = function(state)  
2086 -{  
2087 - var handles = [Graph.createHandle(state, ['dx1', 'dy1'], function(bounds)  
2088 - {  
2089 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
2090 - var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));  
2091 - var dy1 = Math.max(0, Math.min(bounds.height / 2 - arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));  
2092 -  
2093 - return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + bounds.height / 2 - dy1);  
2094 - }, function(bounds, pt)  
2095 - {  
2096 - this.state.style['dx1'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)), bounds.x + bounds.width - pt.x))) / 100;  
2097 - this.state.style['dy1'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)), bounds.y + bounds.height / 2 - pt.y))) / 100;  
2098 -  
2099 - })];  
2100 -  
2101 - var handle2 = Graph.createHandle(state, ['notch'], function(bounds)  
2102 - {  
2103 - var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));  
2104 -  
2105 - return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);  
2106 - }, function(bounds, pt)  
2107 - {  
2108 - this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)), pt.x - bounds.x))) / 100;  
2109 - }); 1930 +Graph.handleFactory[mxShapeArrows2TailedArrow.prototype.cst.TAILED_ARROW] = function (state) {
  1931 + var handles = [Graph.createHandle(state, ['dx1', 'dy1'], function (bounds) {
  1932 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1933 + var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));
  1934 + var dy1 = Math.max(0, Math.min(bounds.height / 2 - arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));
  1935 +
  1936 + return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + bounds.height / 2 - dy1);
  1937 + }, function (bounds, pt) {
  1938 + this.state.style['dx1'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)), bounds.x + bounds.width - pt.x))) / 100;
  1939 + this.state.style['dy1'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)), bounds.y + bounds.height / 2 - pt.y))) / 100;
  1940 +
  1941 + })];
  1942 +
  1943 + var handle2 = Graph.createHandle(state, ['notch'], function (bounds) {
  1944 + var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));
  1945 +
  1946 + return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);
  1947 + }, function (bounds, pt) {
  1948 + this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)), pt.x - bounds.x))) / 100;
  1949 + });
2110 1950
2111 handles.push(handle2); 1951 handles.push(handle2);
2112 -  
2113 - var handle3 = Graph.createHandle(state, ['arrowHead'], function(bounds)  
2114 - {  
2115 - var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));  
2116 - var dy1 = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));  
2117 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
2118 -  
2119 - return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + bounds.height / 2 - dy1 - arrowHead);  
2120 - }, function(bounds, pt)  
2121 - {  
2122 - this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), bounds.y + bounds.height / 2 - pt.y))) / 100;  
2123 - }); 1952 +
  1953 + var handle3 = Graph.createHandle(state, ['arrowHead'], function (bounds) {
  1954 + var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));
  1955 + var dy1 = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));
  1956 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  1957 +
  1958 + return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + bounds.height / 2 - dy1 - arrowHead);
  1959 + }, function (bounds, pt) {
  1960 + this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), bounds.y + bounds.height / 2 - pt.y))) / 100;
  1961 + });
2124 1962
2125 handles.push(handle3); 1963 handles.push(handle3);
2126 -  
2127 - var handle4 = Graph.createHandle(state, ['dx2', 'dy2'], function(bounds)  
2128 - {  
2129 - var dx2 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));  
2130 - var dy2 = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2))));  
2131 -  
2132 - return new mxPoint(bounds.x + dx2, bounds.y + bounds.height / 2 - dy2);  
2133 - }, function(bounds, pt)  
2134 - {  
2135 - this.state.style['dx2'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)) - parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) + parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) - 1, pt.x - bounds.x))) / 100;  
2136 - this.state.style['dy2'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), Math.min(bounds.height / 2, bounds.y + bounds.height / 2 - pt.y))) / 100;  
2137 -  
2138 - }); 1964 +
  1965 + var handle4 = Graph.createHandle(state, ['dx2', 'dy2'], function (bounds) {
  1966 + var dx2 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));
  1967 + var dy2 = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2))));
  1968 +
  1969 + return new mxPoint(bounds.x + dx2, bounds.y + bounds.height / 2 - dy2);
  1970 + }, function (bounds, pt) {
  1971 + this.state.style['dx2'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)) - parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)) + parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)) - 1, pt.x - bounds.x))) / 100;
  1972 + this.state.style['dy2'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), Math.min(bounds.height / 2, bounds.y + bounds.height / 2 - pt.y))) / 100;
  1973 +
  1974 + });
2139 1975
2140 handles.push(handle4); 1976 handles.push(handle4);
2141 1977
2142 return handles; 1978 return handles;
2143 }; 1979 };
2144 1980
2145 -mxShapeArrows2TailedArrow.prototype.getConstraints = function(style, w, h)  
2146 -{ 1981 +mxShapeArrows2TailedArrow.prototype.getConstraints = function (style, w, h) {
2147 var constr = []; 1982 var constr = [];
2148 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 1983 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
2149 var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1)))); 1984 var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
@@ -2152,9 +1987,8 @@ mxShapeArrows2TailedArrow.prototype.getConstraints = function(style, w, h) @@ -2152,9 +1987,8 @@ mxShapeArrows2TailedArrow.prototype.getConstraints = function(style, w, h)
2152 var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch)))); 1987 var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
2153 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead)))); 1988 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
2154 var x2 = 0; 1989 var x2 = 0;
2155 -  
2156 - if (dy2 != 0)  
2157 - { 1990 +
  1991 + if (dy2 != 0) {
2158 x2 = dx2 + dy2 * (dy2 - dy1) / dy2; 1992 x2 = dx2 + dy2 * (dy2 - dy1) / dy2;
2159 } 1993 }
2160 1994
@@ -2168,7 +2002,7 @@ mxShapeArrows2TailedArrow.prototype.getConstraints = function(style, w, h) @@ -2168,7 +2002,7 @@ mxShapeArrows2TailedArrow.prototype.getConstraints = function(style, w, h)
2168 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1 + x2) * 0.5, h * 0.5 + dy1)); 2002 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1 + x2) * 0.5, h * 0.5 + dy1));
2169 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, h * 0.5 + dy1 + arrowHead)); 2003 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, h * 0.5 + dy1 + arrowHead));
2170 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false)); 2004 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
2171 - 2005 +
2172 return (constr); 2006 return (constr);
2173 }; 2007 };
2174 2008
@@ -2178,8 +2012,7 @@ mxShapeArrows2TailedArrow.prototype.getConstraints = function(style, w, h) @@ -2178,8 +2012,7 @@ mxShapeArrows2TailedArrow.prototype.getConstraints = function(style, w, h)
2178 /** 2012 /**
2179 * Extends mxShape. 2013 * Extends mxShape.
2180 */ 2014 */
2181 -function mxShapeArrows2TailedNotchedArrow(bounds, fill, stroke, strokewidth)  
2182 -{ 2015 +function mxShapeArrows2TailedNotchedArrow(bounds, fill, stroke, strokewidth) {
2183 mxShape.call(this); 2016 mxShape.call(this);
2184 this.bounds = bounds; 2017 this.bounds = bounds;
2185 this.fill = fill; 2018 this.fill = fill;
@@ -2197,16 +2030,16 @@ function mxShapeArrows2TailedNotchedArrow(bounds, fill, stroke, strokewidth) @@ -2197,16 +2030,16 @@ function mxShapeArrows2TailedNotchedArrow(bounds, fill, stroke, strokewidth)
2197 mxUtils.extend(mxShapeArrows2TailedNotchedArrow, mxActor); 2030 mxUtils.extend(mxShapeArrows2TailedNotchedArrow, mxActor);
2198 2031
2199 mxShapeArrows2TailedNotchedArrow.prototype.customProperties = [ 2032 mxShapeArrows2TailedNotchedArrow.prototype.customProperties = [
2200 - {name: 'dx1', dispName: 'Arrowhead Length', type: 'float', mix:0, defVal:20},  
2201 - {name: 'dy1', dispName: 'Arrow Width', type: 'float', min:0, defVal:10},  
2202 - {name: 'dx2', dispName: 'Tail Length', type: 'float', min:0, defVal:25},  
2203 - {name: 'dy2', dispName: 'Tail Width', type: 'float', min:0, defVal:30},  
2204 - {name: 'notch', dispName: 'Notch', type: 'float', min:0, defVal:20},  
2205 - {name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min:0, defVal:20} 2033 + { name: 'dx1', dispName: 'Arrowhead Length', type: 'float', mix: 0, defVal: 20 },
  2034 + { name: 'dy1', dispName: 'Arrow Width', type: 'float', min: 0, defVal: 10 },
  2035 + { name: 'dx2', dispName: 'Tail Length', type: 'float', min: 0, defVal: 25 },
  2036 + { name: 'dy2', dispName: 'Tail Width', type: 'float', min: 0, defVal: 30 },
  2037 + { name: 'notch', dispName: 'Notch', type: 'float', min: 0, defVal: 20 },
  2038 + { name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min: 0, defVal: 20 }
2206 ]; 2039 ];
2207 2040
2208 mxShapeArrows2TailedNotchedArrow.prototype.cst = { 2041 mxShapeArrows2TailedNotchedArrow.prototype.cst = {
2209 - TAILED_NOTCHED_ARROW : 'mxgraph.arrows2.tailedNotchedArrow' 2042 + TAILED_NOTCHED_ARROW: 'mxgraph.arrows2.tailedNotchedArrow'
2210 }; 2043 };
2211 2044
2212 /** 2045 /**
@@ -2214,8 +2047,7 @@ mxShapeArrows2TailedNotchedArrow.prototype.cst = { @@ -2214,8 +2047,7 @@ mxShapeArrows2TailedNotchedArrow.prototype.cst = {
2214 * 2047 *
2215 * Paints the vertex shape. 2048 * Paints the vertex shape.
2216 */ 2049 */
2217 -mxShapeArrows2TailedNotchedArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
2218 -{ 2050 +mxShapeArrows2TailedNotchedArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
2219 c.translate(x, y); 2051 c.translate(x, y);
2220 2052
2221 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 2053 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
@@ -2225,9 +2057,8 @@ mxShapeArrows2TailedNotchedArrow.prototype.paintVertexShape = function(c, x, y, @@ -2225,9 +2057,8 @@ mxShapeArrows2TailedNotchedArrow.prototype.paintVertexShape = function(c, x, y,
2225 var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch)))); 2057 var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
2226 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead)))); 2058 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
2227 var x2 = 0; 2059 var x2 = 0;
2228 -  
2229 - if (dy2 != 0)  
2230 - { 2060 +
  2061 + if (dy2 != 0) {
2231 x2 = dx2 + notch * (dy2 - dy1) / dy2; 2062 x2 = dx2 + notch * (dy2 - dy1) / dy2;
2232 } 2063 }
2233 2064
@@ -2252,68 +2083,58 @@ mxCellRenderer.registerShape(mxShapeArrows2TailedNotchedArrow.prototype.cst.TAIL @@ -2252,68 +2083,58 @@ mxCellRenderer.registerShape(mxShapeArrows2TailedNotchedArrow.prototype.cst.TAIL
2252 2083
2253 mxShapeArrows2TailedNotchedArrow.prototype.constraints = null; 2084 mxShapeArrows2TailedNotchedArrow.prototype.constraints = null;
2254 2085
2255 -Graph.handleFactory[mxShapeArrows2TailedNotchedArrow.prototype.cst.TAILED_NOTCHED_ARROW] = function(state)  
2256 -{  
2257 - var handles = [Graph.createHandle(state, ['dx1', 'dy1'], function(bounds)  
2258 - {  
2259 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
2260 - var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));  
2261 - var dy1 = Math.max(0, Math.min(bounds.height / 2 - arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));  
2262 -  
2263 - return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + bounds.height / 2 - dy1);  
2264 - }, function(bounds, pt)  
2265 - {  
2266 - this.state.style['dx1'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))- parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)), bounds.x + bounds.width - pt.x))) / 100;  
2267 - this.state.style['dy1'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)), bounds.y + bounds.height / 2 - pt.y))) / 100;  
2268 -  
2269 - })];  
2270 -  
2271 - var handle2 = Graph.createHandle(state, ['notch'], function(bounds)  
2272 - {  
2273 - var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));  
2274 -  
2275 - return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);  
2276 - }, function(bounds, pt)  
2277 - {  
2278 - this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), pt.x - bounds.x))) / 100;  
2279 - }); 2086 +Graph.handleFactory[mxShapeArrows2TailedNotchedArrow.prototype.cst.TAILED_NOTCHED_ARROW] = function (state) {
  2087 + var handles = [Graph.createHandle(state, ['dx1', 'dy1'], function (bounds) {
  2088 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  2089 + var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));
  2090 + var dy1 = Math.max(0, Math.min(bounds.height / 2 - arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));
  2091 +
  2092 + return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + bounds.height / 2 - dy1);
  2093 + }, function (bounds, pt) {
  2094 + this.state.style['dx1'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)) - parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)), bounds.x + bounds.width - pt.x))) / 100;
  2095 + this.state.style['dy1'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)), parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)), bounds.y + bounds.height / 2 - pt.y))) / 100;
  2096 +
  2097 + })];
  2098 +
  2099 + var handle2 = Graph.createHandle(state, ['notch'], function (bounds) {
  2100 + var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));
  2101 +
  2102 + return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);
  2103 + }, function (bounds, pt) {
  2104 + this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), pt.x - bounds.x))) / 100;
  2105 + });
2280 2106
2281 handles.push(handle2); 2107 handles.push(handle2);
2282 -  
2283 - var handle3 = Graph.createHandle(state, ['arrowHead'], function(bounds)  
2284 - {  
2285 - var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));  
2286 - var dy1 = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));  
2287 - var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
2288 -  
2289 - return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + bounds.height / 2 - dy1 - arrowHead);  
2290 - }, function(bounds, pt)  
2291 - {  
2292 - this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), bounds.y + bounds.height / 2 - pt.y))) / 100;  
2293 - }); 2108 +
  2109 + var handle3 = Graph.createHandle(state, ['arrowHead'], function (bounds) {
  2110 + var dx1 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));
  2111 + var dy1 = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));
  2112 + var arrowHead = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  2113 +
  2114 + return new mxPoint(bounds.x + bounds.width - dx1, bounds.y + bounds.height / 2 - dy1 - arrowHead);
  2115 + }, function (bounds, pt) {
  2116 + this.state.style['arrowHead'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2 - parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), bounds.y + bounds.height / 2 - pt.y))) / 100;
  2117 + });
2294 2118
2295 handles.push(handle3); 2119 handles.push(handle3);
2296 -  
2297 - var handle4 = Graph.createHandle(state, ['dx2', 'dy2'], function(bounds)  
2298 - {  
2299 - var dx2 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));  
2300 - var dy2 = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2))));  
2301 -  
2302 - return new mxPoint(bounds.x + dx2, bounds.y + bounds.height / 2 - dy2);  
2303 - }, function(bounds, pt)  
2304 - {  
2305 - this.state.style['dx2'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)) - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), pt.x - bounds.x))) / 100;  
2306 - this.state.style['dy2'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), Math.min(bounds.height / 2, bounds.y + bounds.height / 2 - pt.y))) / 100;  
2307 -  
2308 - }); 2120 +
  2121 + var handle4 = Graph.createHandle(state, ['dx2', 'dy2'], function (bounds) {
  2122 + var dx2 = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));
  2123 + var dy2 = Math.max(0, Math.min(bounds.height / 2, parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2))));
  2124 +
  2125 + return new mxPoint(bounds.x + dx2, bounds.y + bounds.height / 2 - dy2);
  2126 + }, function (bounds, pt) {
  2127 + this.state.style['dx2'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)) - parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)), pt.x - bounds.x))) / 100;
  2128 + this.state.style['dy2'] = Math.round(100 * Math.max(parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)), Math.min(bounds.height / 2, bounds.y + bounds.height / 2 - pt.y))) / 100;
  2129 +
  2130 + });
2309 2131
2310 handles.push(handle4); 2132 handles.push(handle4);
2311 2133
2312 return handles; 2134 return handles;
2313 }; 2135 };
2314 2136
2315 -mxShapeArrows2TailedNotchedArrow.prototype.getConstraints = function(style, w, h)  
2316 -{ 2137 +mxShapeArrows2TailedNotchedArrow.prototype.getConstraints = function (style, w, h) {
2317 var constr = []; 2138 var constr = [];
2318 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 2139 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
2319 var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1)))); 2140 var dx1 = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
@@ -2322,9 +2143,8 @@ mxShapeArrows2TailedNotchedArrow.prototype.getConstraints = function(style, w, h @@ -2322,9 +2143,8 @@ mxShapeArrows2TailedNotchedArrow.prototype.getConstraints = function(style, w, h
2322 var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch)))); 2143 var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
2323 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead)))); 2144 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
2324 var x2 = 0; 2145 var x2 = 0;
2325 -  
2326 - if (dy2 != 0)  
2327 - { 2146 +
  2147 + if (dy2 != 0) {
2328 x2 = dx2 + notch * (dy2 - dy1) / dy2; 2148 x2 = dx2 + notch * (dy2 - dy1) / dy2;
2329 } 2149 }
2330 2150
@@ -2338,7 +2158,7 @@ mxShapeArrows2TailedNotchedArrow.prototype.getConstraints = function(style, w, h @@ -2338,7 +2158,7 @@ mxShapeArrows2TailedNotchedArrow.prototype.getConstraints = function(style, w, h
2338 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1 + x2) * 0.5, h * 0.5 + dy1)); 2158 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1 + x2) * 0.5, h * 0.5 + dy1));
2339 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, h * 0.5 + dy1 + arrowHead)); 2159 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, h * 0.5 + dy1 + arrowHead));
2340 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false)); 2160 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
2341 - 2161 +
2342 return (constr); 2162 return (constr);
2343 }; 2163 };
2344 2164
@@ -2348,8 +2168,7 @@ mxShapeArrows2TailedNotchedArrow.prototype.getConstraints = function(style, w, h @@ -2348,8 +2168,7 @@ mxShapeArrows2TailedNotchedArrow.prototype.getConstraints = function(style, w, h
2348 /** 2168 /**
2349 * Extends mxShape. 2169 * Extends mxShape.
2350 */ 2170 */
2351 -function mxShapeArrows2StripedArrow(bounds, fill, stroke, strokewidth)  
2352 -{ 2171 +function mxShapeArrows2StripedArrow(bounds, fill, stroke, strokewidth) {
2353 mxShape.call(this); 2172 mxShape.call(this);
2354 this.bounds = bounds; 2173 this.bounds = bounds;
2355 this.fill = fill; 2174 this.fill = fill;
@@ -2366,13 +2185,13 @@ function mxShapeArrows2StripedArrow(bounds, fill, stroke, strokewidth) @@ -2366,13 +2185,13 @@ function mxShapeArrows2StripedArrow(bounds, fill, stroke, strokewidth)
2366 mxUtils.extend(mxShapeArrows2StripedArrow, mxActor); 2185 mxUtils.extend(mxShapeArrows2StripedArrow, mxActor);
2367 2186
2368 mxShapeArrows2StripedArrow.prototype.customProperties = [ 2187 mxShapeArrows2StripedArrow.prototype.customProperties = [
2369 - {name: 'dx', dispName: 'Arrowhead Length', type: 'float', min:0, defVal:40},  
2370 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, max:1, defVal:0.6},  
2371 - {name: 'notch', dispName: 'Stripes Length', type: 'float', min:0, defVal:25} 2188 + { name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 40 },
  2189 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, max: 1, defVal: 0.6 },
  2190 + { name: 'notch', dispName: 'Stripes Length', type: 'float', min: 0, defVal: 25 }
2372 ]; 2191 ];
2373 2192
2374 mxShapeArrows2StripedArrow.prototype.cst = { 2193 mxShapeArrows2StripedArrow.prototype.cst = {
2375 - STRIPED_ARROW : 'mxgraph.arrows2.stripedArrow' 2194 + STRIPED_ARROW: 'mxgraph.arrows2.stripedArrow'
2376 }; 2195 };
2377 2196
2378 /** 2197 /**
@@ -2380,8 +2199,7 @@ mxShapeArrows2StripedArrow.prototype.cst = { @@ -2380,8 +2199,7 @@ mxShapeArrows2StripedArrow.prototype.cst = {
2380 * 2199 *
2381 * Paints the vertex shape. 2200 * Paints the vertex shape.
2382 */ 2201 */
2383 -mxShapeArrows2StripedArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
2384 -{ 2202 +mxShapeArrows2StripedArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
2385 c.translate(x, y); 2203 c.translate(x, y);
2386 2204
2387 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 2205 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -2414,37 +2232,31 @@ mxCellRenderer.registerShape(mxShapeArrows2StripedArrow.prototype.cst.STRIPED_AR @@ -2414,37 +2232,31 @@ mxCellRenderer.registerShape(mxShapeArrows2StripedArrow.prototype.cst.STRIPED_AR
2414 2232
2415 mxShapeArrows2StripedArrow.prototype.constraints = null; 2233 mxShapeArrows2StripedArrow.prototype.constraints = null;
2416 2234
2417 -Graph.handleFactory[mxShapeArrows2StripedArrow.prototype.cst.STRIPED_ARROW] = function(state)  
2418 -{  
2419 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
2420 - {  
2421 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
2422 - var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
2423 -  
2424 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + dy * bounds.height / 2);  
2425 - }, function(bounds, pt)  
2426 - {  
2427 - this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;  
2428 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;  
2429 - })];  
2430 -  
2431 - var handle2 = Graph.createHandle(state, ['notch'], function(bounds)  
2432 - {  
2433 - var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));  
2434 -  
2435 - return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);  
2436 - }, function(bounds, pt)  
2437 - {  
2438 - this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.x - bounds.x))) / 100;  
2439 - });  
2440 - 2235 +Graph.handleFactory[mxShapeArrows2StripedArrow.prototype.cst.STRIPED_ARROW] = function (state) {
  2236 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
  2237 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  2238 + var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  2239 +
  2240 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + dy * bounds.height / 2);
  2241 + }, function (bounds, pt) {
  2242 + this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch)), bounds.x + bounds.width - pt.x))) / 100;
  2243 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(1, (((pt.y - bounds.y) / bounds.height) * 2)))) / 100;
  2244 + })];
  2245 +
  2246 + var handle2 = Graph.createHandle(state, ['notch'], function (bounds) {
  2247 + var notch = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'notch', this.notch))));
  2248 +
  2249 + return new mxPoint(bounds.x + notch, bounds.y + bounds.height / 2);
  2250 + }, function (bounds, pt) {
  2251 + this.state.style['notch'] = Math.round(100 * Math.max(0, Math.min(bounds.width - parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)), pt.x - bounds.x))) / 100;
  2252 + });
  2253 +
2441 handles.push(handle2); 2254 handles.push(handle2);
2442 - 2255 +
2443 return handles; 2256 return handles;
2444 }; 2257 };
2445 2258
2446 -mxShapeArrows2StripedArrow.prototype.getConstraints = function(style, w, h)  
2447 -{ 2259 +mxShapeArrows2StripedArrow.prototype.getConstraints = function (style, w, h) {
2448 var constr = []; 2260 var constr = [];
2449 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 2261 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
2450 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 2262 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -2460,7 +2272,7 @@ mxShapeArrows2StripedArrow.prototype.getConstraints = function(style, w, h) @@ -2460,7 +2272,7 @@ mxShapeArrows2StripedArrow.prototype.getConstraints = function(style, w, h)
2460 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h)); 2272 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h));
2461 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, dy)); 2273 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, dy));
2462 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, h - dy)); 2274 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, h - dy));
2463 - 2275 +
2464 return (constr); 2276 return (constr);
2465 }; 2277 };
2466 2278
@@ -2470,8 +2282,7 @@ mxShapeArrows2StripedArrow.prototype.getConstraints = function(style, w, h) @@ -2470,8 +2282,7 @@ mxShapeArrows2StripedArrow.prototype.getConstraints = function(style, w, h)
2470 /** 2282 /**
2471 * Extends mxShape. 2283 * Extends mxShape.
2472 */ 2284 */
2473 -function mxShapeArrows2JumpInArrow(bounds, fill, stroke, strokewidth)  
2474 -{ 2285 +function mxShapeArrows2JumpInArrow(bounds, fill, stroke, strokewidth) {
2475 mxShape.call(this); 2286 mxShape.call(this);
2476 this.bounds = bounds; 2287 this.bounds = bounds;
2477 this.fill = fill; 2288 this.fill = fill;
@@ -2488,13 +2299,13 @@ function mxShapeArrows2JumpInArrow(bounds, fill, stroke, strokewidth) @@ -2488,13 +2299,13 @@ function mxShapeArrows2JumpInArrow(bounds, fill, stroke, strokewidth)
2488 mxUtils.extend(mxShapeArrows2JumpInArrow, mxActor); 2299 mxUtils.extend(mxShapeArrows2JumpInArrow, mxActor);
2489 2300
2490 mxShapeArrows2JumpInArrow.prototype.customProperties = [ 2301 mxShapeArrows2JumpInArrow.prototype.customProperties = [
2491 - {name: 'dx', dispName: 'Arrowhead Length', type: 'float', min:0, defVal:38},  
2492 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, defVal:15},  
2493 - {name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min:0, defVal:55} 2302 + { name: 'dx', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 38 },
  2303 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, defVal: 15 },
  2304 + { name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min: 0, defVal: 55 }
2494 ]; 2305 ];
2495 2306
2496 mxShapeArrows2JumpInArrow.prototype.cst = { 2307 mxShapeArrows2JumpInArrow.prototype.cst = {
2497 - JUMP_IN_ARROW : 'mxgraph.arrows2.jumpInArrow' 2308 + JUMP_IN_ARROW: 'mxgraph.arrows2.jumpInArrow'
2498 }; 2309 };
2499 2310
2500 /** 2311 /**
@@ -2502,8 +2313,7 @@ mxShapeArrows2JumpInArrow.prototype.cst = { @@ -2502,8 +2313,7 @@ mxShapeArrows2JumpInArrow.prototype.cst = {
2502 * 2313 *
2503 * Paints the vertex shape. 2314 * Paints the vertex shape.
2504 */ 2315 */
2505 -mxShapeArrows2JumpInArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
2506 -{ 2316 +mxShapeArrows2JumpInArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
2507 c.translate(x, y); 2317 c.translate(x, y);
2508 2318
2509 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 2319 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -2525,40 +2335,34 @@ mxCellRenderer.registerShape(mxShapeArrows2JumpInArrow.prototype.cst.JUMP_IN_ARR @@ -2525,40 +2335,34 @@ mxCellRenderer.registerShape(mxShapeArrows2JumpInArrow.prototype.cst.JUMP_IN_ARR
2525 2335
2526 mxShapeArrows2JumpInArrow.prototype.constraints = null; 2336 mxShapeArrows2JumpInArrow.prototype.constraints = null;
2527 2337
2528 -Graph.handleFactory[mxShapeArrows2JumpInArrow.prototype.cst.JUMP_IN_ARROW] = function(state)  
2529 -{  
2530 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
2531 - {  
2532 - var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
2533 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
2534 - var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
2535 -  
2536 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + arrowHead / 2 - dy);  
2537 - }, function(bounds, pt)  
2538 - {  
2539 - this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width, bounds.x + bounds.width - pt.x))) / 100;  
2540 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2, bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2 - pt.y))) / 100;  
2541 -  
2542 - })];  
2543 -  
2544 - var handle2 = Graph.createHandle(state, ['arrowHead'], function(bounds)  
2545 - {  
2546 - var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));  
2547 - var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
2548 -  
2549 - return new mxPoint(bounds.x + bounds.width - dx, bounds.y + arrowHead);  
2550 - }, function(bounds, pt)  
2551 - {  
2552 - this.state.style['arrowHead'] = Math.round(100 * Math.max(2 * parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(bounds.height, pt.y - bounds.y))) / 100;  
2553 - });  
2554 - 2338 +Graph.handleFactory[mxShapeArrows2JumpInArrow.prototype.cst.JUMP_IN_ARROW] = function (state) {
  2339 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
  2340 + var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  2341 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  2342 + var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  2343 +
  2344 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + arrowHead / 2 - dy);
  2345 + }, function (bounds, pt) {
  2346 + this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.width, bounds.x + bounds.width - pt.x))) / 100;
  2347 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2, bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2 - pt.y))) / 100;
  2348 +
  2349 + })];
  2350 +
  2351 + var handle2 = Graph.createHandle(state, ['arrowHead'], function (bounds) {
  2352 + var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
  2353 + var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  2354 +
  2355 + return new mxPoint(bounds.x + bounds.width - dx, bounds.y + arrowHead);
  2356 + }, function (bounds, pt) {
  2357 + this.state.style['arrowHead'] = Math.round(100 * Math.max(2 * parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(bounds.height, pt.y - bounds.y))) / 100;
  2358 + });
  2359 +
2555 handles.push(handle2); 2360 handles.push(handle2);
2556 2361
2557 return handles; 2362 return handles;
2558 }; 2363 };
2559 2364
2560 -mxShapeArrows2JumpInArrow.prototype.getConstraints = function(style, w, h)  
2561 -{ 2365 +mxShapeArrows2JumpInArrow.prototype.getConstraints = function (style, w, h) {
2562 var constr = []; 2366 var constr = [];
2563 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 2367 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
2564 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 2368 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -2568,7 +2372,7 @@ mxShapeArrows2JumpInArrow.prototype.getConstraints = function(style, w, h) @@ -2568,7 +2372,7 @@ mxShapeArrows2JumpInArrow.prototype.getConstraints = function(style, w, h)
2568 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, 0)); 2372 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, 0));
2569 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, arrowHead * 0.5)); 2373 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, arrowHead * 0.5));
2570 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead)); 2374 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead));
2571 - 2375 +
2572 return (constr); 2376 return (constr);
2573 }; 2377 };
2574 2378
@@ -2578,8 +2382,7 @@ mxShapeArrows2JumpInArrow.prototype.getConstraints = function(style, w, h) @@ -2578,8 +2382,7 @@ mxShapeArrows2JumpInArrow.prototype.getConstraints = function(style, w, h)
2578 /** 2382 /**
2579 * Extends mxShape. 2383 * Extends mxShape.
2580 */ 2384 */
2581 -function mxShapeArrows2UTurnArrow(bounds, fill, stroke, strokewidth)  
2582 -{ 2385 +function mxShapeArrows2UTurnArrow(bounds, fill, stroke, strokewidth) {
2583 mxShape.call(this); 2386 mxShape.call(this);
2584 this.bounds = bounds; 2387 this.bounds = bounds;
2585 this.fill = fill; 2388 this.fill = fill;
@@ -2596,13 +2399,13 @@ function mxShapeArrows2UTurnArrow(bounds, fill, stroke, strokewidth) @@ -2596,13 +2399,13 @@ function mxShapeArrows2UTurnArrow(bounds, fill, stroke, strokewidth)
2596 mxUtils.extend(mxShapeArrows2UTurnArrow, mxActor); 2399 mxUtils.extend(mxShapeArrows2UTurnArrow, mxActor);
2597 2400
2598 mxShapeArrows2UTurnArrow.prototype.customProperties = [ 2401 mxShapeArrows2UTurnArrow.prototype.customProperties = [
2599 - {name: 'dx2', dispName: 'Arrowhead Length', type: 'float', min:0, defVal:25},  
2600 - {name: 'dy', dispName: 'Arrow Width', type: 'float', min:0, defVal:11},  
2601 - {name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min:0, defVal:43} 2402 + { name: 'dx2', dispName: 'Arrowhead Length', type: 'float', min: 0, defVal: 25 },
  2403 + { name: 'dy', dispName: 'Arrow Width', type: 'float', min: 0, defVal: 11 },
  2404 + { name: 'arrowHead', dispName: 'Arrowhead Width', type: 'float', min: 0, defVal: 43 }
2602 ]; 2405 ];
2603 2406
2604 mxShapeArrows2UTurnArrow.prototype.cst = { 2407 mxShapeArrows2UTurnArrow.prototype.cst = {
2605 - U_TURN_ARROW : 'mxgraph.arrows2.uTurnArrow' 2408 + U_TURN_ARROW: 'mxgraph.arrows2.uTurnArrow'
2606 }; 2409 };
2607 2410
2608 /** 2411 /**
@@ -2610,15 +2413,14 @@ mxShapeArrows2UTurnArrow.prototype.cst = { @@ -2610,15 +2413,14 @@ mxShapeArrows2UTurnArrow.prototype.cst = {
2610 * 2413 *
2611 * Paints the vertex shape. 2414 * Paints the vertex shape.
2612 */ 2415 */
2613 -mxShapeArrows2UTurnArrow.prototype.paintVertexShape = function(c, x, y, w, h)  
2614 -{ 2416 +mxShapeArrows2UTurnArrow.prototype.paintVertexShape = function (c, x, y, w, h) {
2615 c.translate(x, y); 2417 c.translate(x, y);
2616 2418
2617 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 2419 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
2618 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead)))); 2420 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
2619 var dx = (h - arrowHead / 2 + dy) / 2; 2421 var dx = (h - arrowHead / 2 + dy) / 2;
2620 var dx2 = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))); 2422 var dx2 = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2)));
2621 - 2423 +
2622 c.begin(); 2424 c.begin();
2623 c.moveTo(dx, 0); 2425 c.moveTo(dx, 0);
2624 c.lineTo(dx + dx2, arrowHead * 0.5); 2426 c.lineTo(dx + dx2, arrowHead * 0.5);
@@ -2637,65 +2439,57 @@ mxCellRenderer.registerShape(mxShapeArrows2UTurnArrow.prototype.cst.U_TURN_ARROW @@ -2637,65 +2439,57 @@ mxCellRenderer.registerShape(mxShapeArrows2UTurnArrow.prototype.cst.U_TURN_ARROW
2637 2439
2638 mxShapeArrows2UTurnArrow.prototype.constraints = null; 2440 mxShapeArrows2UTurnArrow.prototype.constraints = null;
2639 2441
2640 -Graph.handleFactory[mxShapeArrows2UTurnArrow.prototype.cst.U_TURN_ARROW] = function(state)  
2641 -{  
2642 - var handles = [Graph.createHandle(state, ['dy'], function(bounds)  
2643 - {  
2644 - var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
2645 - var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
2646 - var dx = (bounds.height - arrowHead / 2 + dy) / 2;  
2647 -  
2648 - return new mxPoint(bounds.x + dx, bounds.y + arrowHead / 2 - dy);  
2649 - }, function(bounds, pt)  
2650 - {  
2651 - this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2, bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2 - pt.y))) / 100;  
2652 -  
2653 - })];  
2654 -  
2655 - var handle2 = Graph.createHandle(state, ['dx2'], function(bounds)  
2656 - {  
2657 - var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
2658 - var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
2659 - var dx = (bounds.height - arrowHead / 2 + dy) / 2;  
2660 -  
2661 - var dx2 = Math.max(0, Math.min(bounds.width - dx, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));  
2662 -  
2663 - return new mxPoint(bounds.x + dx + dx2, bounds.y + arrowHead / 2);  
2664 - }, function(bounds, pt)  
2665 - {  
2666 - var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
2667 - var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
2668 - var dx = (bounds.height - arrowHead / 2 + dy) / 2;  
2669 - this.state.style['dx2'] = Math.round(100 * Math.max(0, Math.min(Math.max(bounds.width, dx), pt.x - bounds.x - dx))) / 100;  
2670 - });  
2671 - 2442 +Graph.handleFactory[mxShapeArrows2UTurnArrow.prototype.cst.U_TURN_ARROW] = function (state) {
  2443 + var handles = [Graph.createHandle(state, ['dy'], function (bounds) {
  2444 + var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  2445 + var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  2446 + var dx = (bounds.height - arrowHead / 2 + dy) / 2;
  2447 +
  2448 + return new mxPoint(bounds.x + dx, bounds.y + arrowHead / 2 - dy);
  2449 + }, function (bounds, pt) {
  2450 + this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2, bounds.y + parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead)) / 2 - pt.y))) / 100;
  2451 +
  2452 + })];
  2453 +
  2454 + var handle2 = Graph.createHandle(state, ['dx2'], function (bounds) {
  2455 + var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  2456 + var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  2457 + var dx = (bounds.height - arrowHead / 2 + dy) / 2;
  2458 +
  2459 + var dx2 = Math.max(0, Math.min(bounds.width - dx, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));
  2460 +
  2461 + return new mxPoint(bounds.x + dx + dx2, bounds.y + arrowHead / 2);
  2462 + }, function (bounds, pt) {
  2463 + var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  2464 + var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  2465 + var dx = (bounds.height - arrowHead / 2 + dy) / 2;
  2466 + this.state.style['dx2'] = Math.round(100 * Math.max(0, Math.min(Math.max(bounds.width, dx), pt.x - bounds.x - dx))) / 100;
  2467 + });
  2468 +
2672 handles.push(handle2); 2469 handles.push(handle2);
2673 2470
2674 - var handle3 = Graph.createHandle(state, ['arrowHead'], function(bounds)  
2675 - {  
2676 - var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));  
2677 - var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));  
2678 - var dx = (bounds.height - arrowHead / 2 + dy) / 2;  
2679 -  
2680 - return new mxPoint(bounds.x + dx, bounds.y + arrowHead);  
2681 - }, function(bounds, pt)  
2682 - {  
2683 - this.state.style['arrowHead'] = Math.round(100 * Math.max(2 * parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(bounds.height / 2, pt.y - bounds.y))) / 100;  
2684 - });  
2685 - 2471 + var handle3 = Graph.createHandle(state, ['arrowHead'], function (bounds) {
  2472 + var arrowHead = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'arrowHead', this.arrowHead))));
  2473 + var dy = Math.max(0, Math.min(arrowHead, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
  2474 + var dx = (bounds.height - arrowHead / 2 + dy) / 2;
  2475 +
  2476 + return new mxPoint(bounds.x + dx, bounds.y + arrowHead);
  2477 + }, function (bounds, pt) {
  2478 + this.state.style['arrowHead'] = Math.round(100 * Math.max(2 * parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)), Math.min(bounds.height / 2, pt.y - bounds.y))) / 100;
  2479 + });
  2480 +
2686 handles.push(handle3); 2481 handles.push(handle3);
2687 2482
2688 return handles; 2483 return handles;
2689 }; 2484 };
2690 2485
2691 -mxShapeArrows2UTurnArrow.prototype.getConstraints = function(style, w, h)  
2692 -{ 2486 +mxShapeArrows2UTurnArrow.prototype.getConstraints = function (style, w, h) {
2693 var constr = []; 2487 var constr = [];
2694 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 2488 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
2695 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead)))); 2489 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
2696 var dx = (h - arrowHead / 2 + dy) / 2; 2490 var dx = (h - arrowHead / 2 + dy) / 2;
2697 var dx2 = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))); 2491 var dx2 = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2)));
2698 - 2492 +
2699 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, 0)); 2493 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, 0));
2700 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx + dx2, arrowHead * 0.5)); 2494 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx + dx2, arrowHead * 0.5));
2701 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, arrowHead)); 2495 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, arrowHead));
@@ -2707,15 +2501,14 @@ mxShapeArrows2UTurnArrow.prototype.getConstraints = function(style, w, h) @@ -2707,15 +2501,14 @@ mxShapeArrows2UTurnArrow.prototype.getConstraints = function(style, w, h)
2707 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h)); 2501 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h));
2708 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h + arrowHead * 0.5 - dy) * 0.5)); 2502 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h + arrowHead * 0.5 - dy) * 0.5));
2709 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead - 2 * dy, (h + arrowHead * 0.5 - dy) * 0.5)); 2503 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead - 2 * dy, (h + arrowHead * 0.5 - dy) * 0.5));
2710 - 2504 +
2711 return (constr); 2505 return (constr);
2712 }; 2506 };
2713 2507
2714 //********************************************************************************************************************************************************** 2508 //**********************************************************************************************************************************************************
2715 //Wedge Arrow 2509 //Wedge Arrow
2716 //********************************************************************************************************************************************************** 2510 //**********************************************************************************************************************************************************
2717 -function mxShapeArrowsWedgeArrow()  
2718 -{ 2511 +function mxShapeArrowsWedgeArrow() {
2719 mxArrow.call(this); 2512 mxArrow.call(this);
2720 }; 2513 };
2721 2514
@@ -2724,11 +2517,10 @@ mxUtils.extend(mxShapeArrowsWedgeArrow, mxArrow); @@ -2724,11 +2517,10 @@ mxUtils.extend(mxShapeArrowsWedgeArrow, mxArrow);
2724 mxShapeArrowsWedgeArrow.prototype.useSvgBoundingBox = true; 2517 mxShapeArrowsWedgeArrow.prototype.useSvgBoundingBox = true;
2725 2518
2726 mxShapeArrowsWedgeArrow.prototype.customProperties = [ 2519 mxShapeArrowsWedgeArrow.prototype.customProperties = [
2727 - {name: 'startWidth', dispName: 'Wedge Width', type: 'float', min:0, defVal:25} 2520 + { name: 'startWidth', dispName: 'Wedge Width', type: 'float', min: 0, defVal: 25 }
2728 ]; 2521 ];
2729 2522
2730 -mxShapeArrowsWedgeArrow.prototype.paintEdgeShape = function(c, pts)  
2731 -{ 2523 +mxShapeArrowsWedgeArrow.prototype.paintEdgeShape = function (c, pts) {
2732 var sw = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'startWidth', 20))); 2524 var sw = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'startWidth', 20)));
2733 2525
2734 // Base vector (between end points) 2526 // Base vector (between end points)
@@ -2737,7 +2529,7 @@ mxShapeArrowsWedgeArrow.prototype.paintEdgeShape = function(c, pts) @@ -2737,7 +2529,7 @@ mxShapeArrowsWedgeArrow.prototype.paintEdgeShape = function(c, pts)
2737 2529
2738 var dx = pe.x - p0.x; 2530 var dx = pe.x - p0.x;
2739 var dy = pe.y - p0.y; 2531 var dy = pe.y - p0.y;
2740 - var dist = Math.sqrt(dx * dx + dy * dy); 2532 + var dist = Math.sqrt(dx * dx + dy * dy);
2741 var nx = dx * sw / dist; 2533 var nx = dx * sw / dist;
2742 var ny = dy * sw / dist; 2534 var ny = dy * sw / dist;
2743 2535
@@ -2754,8 +2546,7 @@ mxCellRenderer.registerShape('mxgraph.arrows2.wedgeArrow', mxShapeArrowsWedgeArr @@ -2754,8 +2546,7 @@ mxCellRenderer.registerShape('mxgraph.arrows2.wedgeArrow', mxShapeArrowsWedgeArr
2754 //********************************************************************************************************************************************************** 2546 //**********************************************************************************************************************************************************
2755 //Wedge Arrow Dashed 2547 //Wedge Arrow Dashed
2756 //********************************************************************************************************************************************************** 2548 //**********************************************************************************************************************************************************
2757 -function mxShapeArrowsWedgeArrowDashed()  
2758 -{ 2549 +function mxShapeArrowsWedgeArrowDashed() {
2759 mxArrowConnector.call(this); 2550 mxArrowConnector.call(this);
2760 }; 2551 };
2761 2552
@@ -2764,11 +2555,10 @@ mxUtils.extend(mxShapeArrowsWedgeArrowDashed, mxArrow); @@ -2764,11 +2555,10 @@ mxUtils.extend(mxShapeArrowsWedgeArrowDashed, mxArrow);
2764 mxShapeArrowsWedgeArrowDashed.prototype.useSvgBoundingBox = true; 2555 mxShapeArrowsWedgeArrowDashed.prototype.useSvgBoundingBox = true;
2765 2556
2766 mxShapeArrowsWedgeArrowDashed.prototype.customProperties = [ 2557 mxShapeArrowsWedgeArrowDashed.prototype.customProperties = [
2767 - {name: 'startWidth', dispName: 'Wedge Width', type: 'float', min:0, defVal:25} 2558 + { name: 'startWidth', dispName: 'Wedge Width', type: 'float', min: 0, defVal: 25 }
2768 ]; 2559 ];
2769 2560
2770 -mxShapeArrowsWedgeArrowDashed.prototype.paintEdgeShape = function(c, pts)  
2771 -{ 2561 +mxShapeArrowsWedgeArrowDashed.prototype.paintEdgeShape = function (c, pts) {
2772 var startWidth = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'startWidth', 20))); 2562 var startWidth = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'startWidth', 20)));
2773 var steps = 8; 2563 var steps = 8;
2774 // Base vector (between end points) 2564 // Base vector (between end points)
@@ -2777,7 +2567,7 @@ mxShapeArrowsWedgeArrowDashed.prototype.paintEdgeShape = function(c, pts) @@ -2777,7 +2567,7 @@ mxShapeArrowsWedgeArrowDashed.prototype.paintEdgeShape = function(c, pts)
2777 2567
2778 var dx = pe.x - p0.x; 2568 var dx = pe.x - p0.x;
2779 var dy = pe.y - p0.y; 2569 var dy = pe.y - p0.y;
2780 - var dist = Math.sqrt(dx * dx + dy * dy); 2570 + var dist = Math.sqrt(dx * dx + dy * dy);
2781 var nx = dx * startWidth / dist; 2571 var nx = dx * startWidth / dist;
2782 var ny = dy * startWidth / dist; 2572 var ny = dy * startWidth / dist;
2783 var cnx = nx; // current nx 2573 var cnx = nx; // current nx
@@ -2786,30 +2576,28 @@ mxShapeArrowsWedgeArrowDashed.prototype.paintEdgeShape = function(c, pts) @@ -2786,30 +2576,28 @@ mxShapeArrowsWedgeArrowDashed.prototype.paintEdgeShape = function(c, pts)
2786 var pcy = p0.y; // current y on edge 2576 var pcy = p0.y; // current y on edge
2787 2577
2788 c.begin(); 2578 c.begin();
2789 -  
2790 - for (var i = 0; i <= steps; i++)  
2791 - { 2579 +
  2580 + for (var i = 0; i <= steps; i++) {
2792 cnx = nx * (steps - i) / steps; 2581 cnx = nx * (steps - i) / steps;
2793 cny = ny * (steps - i) / steps; 2582 cny = ny * (steps - i) / steps;
2794 2583
2795 - if (i == steps)  
2796 - { 2584 + if (i == steps) {
2797 cnx = nx * (steps - i * 0.98) / steps; 2585 cnx = nx * (steps - i * 0.98) / steps;
2798 cny = ny * (steps - i * 0.98) / steps; 2586 cny = ny * (steps - i * 0.98) / steps;
2799 } 2587 }
2800 - 2588 +
2801 var px1 = pcx + cny; 2589 var px1 = pcx + cny;
2802 var py1 = pcy - cnx; 2590 var py1 = pcy - cnx;
2803 var px2 = pcx - cny; 2591 var px2 = pcx - cny;
2804 var py2 = pcy + cnx; 2592 var py2 = pcy + cnx;
2805 - 2593 +
2806 c.moveTo(px1, py1); 2594 c.moveTo(px1, py1);
2807 c.lineTo(px2, py2); 2595 c.lineTo(px2, py2);
2808 - 2596 +
2809 pcx = pcx + dx / steps; 2597 pcx = pcx + dx / steps;
2810 pcy = pcy + dy / steps; 2598 pcy = pcy + dy / steps;
2811 - }  
2812 - 2599 + }
  2600 +
2813 c.stroke(); 2601 c.stroke();
2814 }; 2602 };
2815 2603
@@ -2818,8 +2606,7 @@ mxCellRenderer.registerShape('mxgraph.arrows2.wedgeArrowDashed', mxShapeArrowsWe @@ -2818,8 +2606,7 @@ mxCellRenderer.registerShape('mxgraph.arrows2.wedgeArrowDashed', mxShapeArrowsWe
2818 //********************************************************************************************************************************************************** 2606 //**********************************************************************************************************************************************************
2819 //Wedge Arrow Dashed v2 2607 //Wedge Arrow Dashed v2
2820 //********************************************************************************************************************************************************** 2608 //**********************************************************************************************************************************************************
2821 -function mxShapeArrowsWedgeArrowDashed2()  
2822 -{ 2609 +function mxShapeArrowsWedgeArrowDashed2() {
2823 mxArrowConnector.call(this); 2610 mxArrowConnector.call(this);
2824 }; 2611 };
2825 2612
@@ -2828,12 +2615,11 @@ mxUtils.extend(mxShapeArrowsWedgeArrowDashed2, mxArrow); @@ -2828,12 +2615,11 @@ mxUtils.extend(mxShapeArrowsWedgeArrowDashed2, mxArrow);
2828 mxShapeArrowsWedgeArrowDashed2.prototype.useSvgBoundingBox = true; 2615 mxShapeArrowsWedgeArrowDashed2.prototype.useSvgBoundingBox = true;
2829 2616
2830 mxShapeArrowsWedgeArrowDashed2.prototype.customProperties = [ 2617 mxShapeArrowsWedgeArrowDashed2.prototype.customProperties = [
2831 - {name: 'startWidth', dispName: 'Wedge Width', type: 'float', min:0, defVal:25},  
2832 - {name: 'stepSize', dispName: 'Step Size', type: 'float', min:0, defVal:25} 2618 + { name: 'startWidth', dispName: 'Wedge Width', type: 'float', min: 0, defVal: 25 },
  2619 + { name: 'stepSize', dispName: 'Step Size', type: 'float', min: 0, defVal: 25 }
2833 ]; 2620 ];
2834 2621
2835 -mxShapeArrowsWedgeArrowDashed2.prototype.paintEdgeShape = function(c, pts)  
2836 -{ 2622 +mxShapeArrowsWedgeArrowDashed2.prototype.paintEdgeShape = function (c, pts) {
2837 var startWidth = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'startWidth', 20))); 2623 var startWidth = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'startWidth', 20)));
2838 var stepSize = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'stepSize', 10))); 2624 var stepSize = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'stepSize', 10)));
2839 2625
@@ -2843,7 +2629,7 @@ mxShapeArrowsWedgeArrowDashed2.prototype.paintEdgeShape = function(c, pts) @@ -2843,7 +2629,7 @@ mxShapeArrowsWedgeArrowDashed2.prototype.paintEdgeShape = function(c, pts)
2843 2629
2844 var dx = pe.x - p0.x; 2630 var dx = pe.x - p0.x;
2845 var dy = pe.y - p0.y; 2631 var dy = pe.y - p0.y;
2846 - var dist = Math.sqrt(dx * dx + dy * dy); 2632 + var dist = Math.sqrt(dx * dx + dy * dy);
2847 var nx = dx * startWidth / dist; 2633 var nx = dx * startWidth / dist;
2848 var ny = dy * startWidth / dist; 2634 var ny = dy * startWidth / dist;
2849 var cnx = nx; // current nx 2635 var cnx = nx; // current nx
@@ -2853,30 +2639,28 @@ mxShapeArrowsWedgeArrowDashed2.prototype.paintEdgeShape = function(c, pts) @@ -2853,30 +2639,28 @@ mxShapeArrowsWedgeArrowDashed2.prototype.paintEdgeShape = function(c, pts)
2853 var steps = Math.floor(dist / stepSize); 2639 var steps = Math.floor(dist / stepSize);
2854 2640
2855 c.begin(); 2641 c.begin();
2856 -  
2857 - for (var i = 0; i <= steps; i++)  
2858 - { 2642 +
  2643 + for (var i = 0; i <= steps; i++) {
2859 cnx = nx * (steps - i) / steps; 2644 cnx = nx * (steps - i) / steps;
2860 cny = ny * (steps - i) / steps; 2645 cny = ny * (steps - i) / steps;
2861 2646
2862 - if (i == steps)  
2863 - { 2647 + if (i == steps) {
2864 cnx = nx * (steps - i * 0.98) / steps; 2648 cnx = nx * (steps - i * 0.98) / steps;
2865 cny = ny * (steps - i * 0.98) / steps; 2649 cny = ny * (steps - i * 0.98) / steps;
2866 } 2650 }
2867 - 2651 +
2868 var px1 = pcx + cny; 2652 var px1 = pcx + cny;
2869 var py1 = pcy - cnx; 2653 var py1 = pcy - cnx;
2870 var px2 = pcx - cny; 2654 var px2 = pcx - cny;
2871 var py2 = pcy + cnx; 2655 var py2 = pcy + cnx;
2872 - 2656 +
2873 c.moveTo(px1, py1); 2657 c.moveTo(px1, py1);
2874 c.lineTo(px2, py2); 2658 c.lineTo(px2, py2);
2875 - 2659 +
2876 pcx = pcx + dx / steps; 2660 pcx = pcx + dx / steps;
2877 pcy = pcy + dy / steps; 2661 pcy = pcy + dy / steps;
2878 - }  
2879 - 2662 + }
  2663 +
2880 c.stroke(); 2664 c.stroke();
2881 }; 2665 };
2882 2666
@@ -8,8 +8,7 @@ @@ -8,8 +8,7 @@
8 /** 8 /**
9 * Extends mxShape. 9 * Extends mxShape.
10 */ 10 */
11 -function mxShapeBasicCross(bounds, fill, stroke, strokewidth)  
12 -{ 11 +function mxShapeBasicCross(bounds, fill, stroke, strokewidth) {
13 mxShape.call(this); 12 mxShape.call(this);
14 this.bounds = bounds; 13 this.bounds = bounds;
15 this.fill = fill; 14 this.fill = fill;
@@ -23,15 +22,14 @@ function mxShapeBasicCross(bounds, fill, stroke, strokewidth) @@ -23,15 +22,14 @@ function mxShapeBasicCross(bounds, fill, stroke, strokewidth)
23 */ 22 */
24 mxUtils.extend(mxShapeBasicCross, mxActor); 23 mxUtils.extend(mxShapeBasicCross, mxActor);
25 24
26 -mxShapeBasicCross.prototype.cst = {CROSS : 'mxgraph.basic.cross2'}; 25 +mxShapeBasicCross.prototype.cst = { CROSS: 'mxgraph.basic.cross2' };
27 26
28 /** 27 /**
29 * Function: paintVertexShape 28 * Function: paintVertexShape
30 * 29 *
31 * Paints the vertex shape. 30 * Paints the vertex shape.
32 */ 31 */
33 -mxShapeBasicCross.prototype.paintVertexShape = function(c, x, y, w, h)  
34 -{ 32 +mxShapeBasicCross.prototype.paintVertexShape = function (c, x, y, w, h) {
35 c.translate(x, y); 33 c.translate(x, y);
36 34
37 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 35 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -57,18 +55,15 @@ mxCellRenderer.registerShape(mxShapeBasicCross.prototype.cst.CROSS, mxShapeBasic @@ -57,18 +55,15 @@ mxCellRenderer.registerShape(mxShapeBasicCross.prototype.cst.CROSS, mxShapeBasic
57 55
58 mxShapeBasicCross.prototype.constraints = null; 56 mxShapeBasicCross.prototype.constraints = null;
59 57
60 -Graph.handleFactory[mxShapeBasicCross.prototype.cst.CROSS] = function(state)  
61 -{  
62 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
63 - { 58 +Graph.handleFactory[mxShapeBasicCross.prototype.cst.CROSS] = function (state) {
  59 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
64 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 60 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
65 61
66 return new mxPoint(bounds.x + bounds.width / 2 + dx, bounds.y + bounds.height / 2 - dx); 62 return new mxPoint(bounds.x + bounds.width / 2 + dx, bounds.y + bounds.height / 2 - dx);
67 - }, function(bounds, pt)  
68 - { 63 + }, function (bounds, pt) {
69 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x - bounds.width / 2))) / 100; 64 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x - bounds.width / 2))) / 100;
70 })]; 65 })];
71 - 66 +
72 return handles; 67 return handles;
73 }; 68 };
74 69
@@ -78,8 +73,7 @@ Graph.handleFactory[mxShapeBasicCross.prototype.cst.CROSS] = function(state) @@ -78,8 +73,7 @@ Graph.handleFactory[mxShapeBasicCross.prototype.cst.CROSS] = function(state)
78 /** 73 /**
79 * Extends mxShape. 74 * Extends mxShape.
80 */ 75 */
81 -function mxShapeBasicRectCallout(bounds, fill, stroke, strokewidth)  
82 -{ 76 +function mxShapeBasicRectCallout(bounds, fill, stroke, strokewidth) {
83 mxShape.call(this); 77 mxShape.call(this);
84 this.bounds = bounds; 78 this.bounds = bounds;
85 this.fill = fill; 79 this.fill = fill;
@@ -95,19 +89,18 @@ function mxShapeBasicRectCallout(bounds, fill, stroke, strokewidth) @@ -95,19 +89,18 @@ function mxShapeBasicRectCallout(bounds, fill, stroke, strokewidth)
95 mxUtils.extend(mxShapeBasicRectCallout, mxActor); 89 mxUtils.extend(mxShapeBasicRectCallout, mxActor);
96 90
97 mxShapeBasicRectCallout.prototype.customProperties = [ 91 mxShapeBasicRectCallout.prototype.customProperties = [
98 - {name: 'dx', dispName: 'Callout Position', type: 'float', min:0, defVal:30},  
99 - {name: 'dy', dispName: 'Callout Size', type: 'float', min:0, defVal:15} 92 + { name: 'dx', dispName: 'Callout Position', type: 'float', min: 0, defVal: 30 },
  93 + { name: 'dy', dispName: 'Callout Size', type: 'float', min: 0, defVal: 15 }
100 ]; 94 ];
101 95
102 -mxShapeBasicRectCallout.prototype.cst = {RECT_CALLOUT : 'mxgraph.basic.rectCallout'}; 96 +mxShapeBasicRectCallout.prototype.cst = { RECT_CALLOUT: 'mxgraph.basic.rectCallout' };
103 97
104 /** 98 /**
105 * Function: paintVertexShape 99 * Function: paintVertexShape
106 * 100 *
107 * Paints the vertex shape. 101 * Paints the vertex shape.
108 */ 102 */
109 -mxShapeBasicRectCallout.prototype.paintVertexShape = function(c, x, y, w, h)  
110 -{ 103 +mxShapeBasicRectCallout.prototype.paintVertexShape = function (c, x, y, w, h) {
111 c.translate(x, y); 104 c.translate(x, y);
112 105
113 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 106 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -125,38 +118,32 @@ mxShapeBasicRectCallout.prototype.paintVertexShape = function(c, x, y, w, h) @@ -125,38 +118,32 @@ mxShapeBasicRectCallout.prototype.paintVertexShape = function(c, x, y, w, h)
125 c.fillAndStroke(); 118 c.fillAndStroke();
126 }; 119 };
127 120
128 -mxShapeBasicRectCallout.prototype.getLabelMargins = function()  
129 -{  
130 - if (mxUtils.getValue(this.style, 'boundedLbl', false))  
131 - { 121 +mxShapeBasicRectCallout.prototype.getLabelMargins = function () {
  122 + if (mxUtils.getValue(this.style, 'boundedLbl', false)) {
132 return new mxRectangle(0, 0, 0, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)) * this.scale); 123 return new mxRectangle(0, 0, 0, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)) * this.scale);
133 } 124 }
134 - 125 +
135 return null; 126 return null;
136 }; 127 };
137 128
138 mxCellRenderer.registerShape(mxShapeBasicRectCallout.prototype.cst.RECT_CALLOUT, mxShapeBasicRectCallout); 129 mxCellRenderer.registerShape(mxShapeBasicRectCallout.prototype.cst.RECT_CALLOUT, mxShapeBasicRectCallout);
139 130
140 -Graph.handleFactory[mxShapeBasicRectCallout.prototype.cst.RECT_CALLOUT] = function(state)  
141 -{  
142 - var handles = [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
143 - { 131 +Graph.handleFactory[mxShapeBasicRectCallout.prototype.cst.RECT_CALLOUT] = function (state) {
  132 + var handles = [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
144 var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 133 var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
145 var dy = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)))); 134 var dy = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
146 135
147 return new mxPoint(bounds.x + dx, bounds.y + bounds.height - dy); 136 return new mxPoint(bounds.x + dx, bounds.y + bounds.height - dy);
148 - }, function(bounds, pt)  
149 - { 137 + }, function (bounds, pt) {
150 var y = parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) * 0.6; 138 var y = parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) * 0.6;
151 this.state.style['dx'] = Math.round(100 * Math.max(y, Math.min(bounds.width - y, pt.x - bounds.x))) / 100; 139 this.state.style['dx'] = Math.round(100 * Math.max(y, Math.min(bounds.width - y, pt.x - bounds.x))) / 100;
152 this.state.style['dy'] = Math.round(Math.max(0, Math.min(bounds.height, bounds.y + bounds.height - pt.y))); 140 this.state.style['dy'] = Math.round(Math.max(0, Math.min(bounds.height, bounds.y + bounds.height - pt.y)));
153 })]; 141 })];
154 - 142 +
155 return handles; 143 return handles;
156 }; 144 };
157 145
158 -mxShapeBasicRectCallout.prototype.getConstraints = function(style, w, h)  
159 -{ 146 +mxShapeBasicRectCallout.prototype.getConstraints = function (style, w, h) {
160 var constr = []; 147 var constr = [];
161 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 148 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
162 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 149 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -181,8 +168,7 @@ mxShapeBasicRectCallout.prototype.getConstraints = function(style, w, h) @@ -181,8 +168,7 @@ mxShapeBasicRectCallout.prototype.getConstraints = function(style, w, h)
181 /** 168 /**
182 * Extends mxShape. 169 * Extends mxShape.
183 */ 170 */
184 -function mxShapeBasicRoundRectCallout(bounds, fill, stroke, strokewidth)  
185 -{ 171 +function mxShapeBasicRoundRectCallout(bounds, fill, stroke, strokewidth) {
186 mxShape.call(this); 172 mxShape.call(this);
187 this.bounds = bounds; 173 this.bounds = bounds;
188 this.fill = fill; 174 this.fill = fill;
@@ -198,14 +184,14 @@ function mxShapeBasicRoundRectCallout(bounds, fill, stroke, strokewidth) @@ -198,14 +184,14 @@ function mxShapeBasicRoundRectCallout(bounds, fill, stroke, strokewidth)
198 */ 184 */
199 mxUtils.extend(mxShapeBasicRoundRectCallout, mxActor); 185 mxUtils.extend(mxShapeBasicRoundRectCallout, mxActor);
200 186
201 -mxShapeBasicRoundRectCallout.prototype.cst = {ROUND_RECT_CALLOUT : 'mxgraph.basic.roundRectCallout'}; 187 +mxShapeBasicRoundRectCallout.prototype.cst = { ROUND_RECT_CALLOUT: 'mxgraph.basic.roundRectCallout' };
202 188
203 mxShapeBasicRoundRectCallout.prototype.getLabelMargins = mxShapeBasicRectCallout.prototype.getLabelMargins; 189 mxShapeBasicRoundRectCallout.prototype.getLabelMargins = mxShapeBasicRectCallout.prototype.getLabelMargins;
204 190
205 mxShapeBasicRoundRectCallout.prototype.customProperties = [ 191 mxShapeBasicRoundRectCallout.prototype.customProperties = [
206 - {name: 'size', dispName: 'Arc Size', type: 'float', min:0, defVal:5},  
207 - {name: 'dx', dispName: 'Callout Position', type: 'float', min:0, defVal:30},  
208 - {name: 'dy', dispName: 'Callout Size', type: 'float', min:0, defVal:15} 192 + { name: 'size', dispName: 'Arc Size', type: 'float', min: 0, defVal: 5 },
  193 + { name: 'dx', dispName: 'Callout Position', type: 'float', min: 0, defVal: 30 },
  194 + { name: 'dy', dispName: 'Callout Size', type: 'float', min: 0, defVal: 15 }
209 ]; 195 ];
210 196
211 /** 197 /**
@@ -213,8 +199,7 @@ mxShapeBasicRoundRectCallout.prototype.customProperties = [ @@ -213,8 +199,7 @@ mxShapeBasicRoundRectCallout.prototype.customProperties = [
213 * 199 *
214 * Paints the vertex shape. 200 * Paints the vertex shape.
215 */ 201 */
216 -mxShapeBasicRoundRectCallout.prototype.paintVertexShape = function(c, x, y, w, h)  
217 -{ 202 +mxShapeBasicRoundRectCallout.prototype.paintVertexShape = function (c, x, y, w, h) {
218 c.translate(x, y); 203 c.translate(x, y);
219 204
220 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 205 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -224,7 +209,7 @@ mxShapeBasicRoundRectCallout.prototype.paintVertexShape = function(c, x, y, w, h @@ -224,7 +209,7 @@ mxShapeBasicRoundRectCallout.prototype.paintVertexShape = function(c, x, y, w, h
224 r = Math.min((h - dy) / 2, w / 2, r); 209 r = Math.min((h - dy) / 2, w / 2, r);
225 dx = Math.max(r + dy * 0.5, dx); 210 dx = Math.max(r + dy * 0.5, dx);
226 dx = Math.min(w - r - dy * 0.5, dx); 211 dx = Math.min(w - r - dy * 0.5, dx);
227 - 212 +
228 c.begin(); 213 c.begin();
229 c.moveTo(dx - dy * 0.5, h - dy); 214 c.moveTo(dx - dy * 0.5, h - dy);
230 c.lineTo(r, h - dy); 215 c.lineTo(r, h - dy);
@@ -246,33 +231,27 @@ mxCellRenderer.registerShape(mxShapeBasicRoundRectCallout.prototype.cst.ROUND_RE @@ -246,33 +231,27 @@ mxCellRenderer.registerShape(mxShapeBasicRoundRectCallout.prototype.cst.ROUND_RE
246 231
247 mxShapeBasicRoundRectCallout.prototype.constraints = null; 232 mxShapeBasicRoundRectCallout.prototype.constraints = null;
248 233
249 -Graph.handleFactory[mxShapeBasicRoundRectCallout.prototype.cst.ROUND_RECT_CALLOUT] = function(state)  
250 -{  
251 - return [Graph.createHandle(state, ['dx', 'dy'], function(bounds)  
252 - { 234 +Graph.handleFactory[mxShapeBasicRoundRectCallout.prototype.cst.ROUND_RECT_CALLOUT] = function (state) {
  235 + return [Graph.createHandle(state, ['dx', 'dy'], function (bounds) {
253 var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 236 var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
254 var dy = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)))); 237 var dy = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
255 238
256 return new mxPoint(bounds.x + dx, bounds.y + bounds.height - dy); 239 return new mxPoint(bounds.x + dx, bounds.y + bounds.height - dy);
257 - }, function(bounds, pt)  
258 - { 240 + }, function (bounds, pt) {
259 var y = parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) * 0.6; 241 var y = parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) * 0.6;
260 this.state.style['dx'] = Math.round(100 * Math.max(y, Math.min(bounds.width - y, pt.x - bounds.x))) / 100; 242 this.state.style['dx'] = Math.round(100 * Math.max(y, Math.min(bounds.width - y, pt.x - bounds.x))) / 100;
261 this.state.style['dy'] = Math.round(Math.max(0, Math.min(bounds.height, bounds.y + bounds.height - pt.y))); 243 this.state.style['dy'] = Math.round(Math.max(0, Math.min(bounds.height, bounds.y + bounds.height - pt.y)));
262 - }), Graph.createHandle(state, ['size'], function(bounds)  
263 - { 244 + }), Graph.createHandle(state, ['size'], function (bounds) {
264 var size = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'size', this.size)))); 245 var size = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'size', this.size))));
265 246
266 return new mxPoint(bounds.x + bounds.width - size, bounds.y + 10); 247 return new mxPoint(bounds.x + bounds.width - size, bounds.y + 10);
267 - }, function(bounds, pt)  
268 - { 248 + }, function (bounds, pt) {
269 var dy = parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)); 249 var dy = parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy));
270 this.state.style['size'] = Math.round(100 * Math.max(0, Math.min(bounds.width / 2, (bounds.height - dy) / 2, bounds.x + bounds.width - pt.x))) / 100; 250 this.state.style['size'] = Math.round(100 * Math.max(0, Math.min(bounds.width / 2, (bounds.height - dy) / 2, bounds.x + bounds.width - pt.x))) / 100;
271 })]; 251 })];
272 }; 252 };
273 253
274 -mxShapeBasicRoundRectCallout.prototype.getConstraints = function(style, w, h)  
275 -{ 254 +mxShapeBasicRoundRectCallout.prototype.getConstraints = function (style, w, h) {
276 var constr = []; 255 var constr = [];
277 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 256 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
278 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 257 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -281,15 +260,13 @@ mxShapeBasicRoundRectCallout.prototype.getConstraints = function(style, w, h) @@ -281,15 +260,13 @@ mxShapeBasicRoundRectCallout.prototype.getConstraints = function(style, w, h)
281 r = Math.min((h - dy) / 2, w / 2, r); 260 r = Math.min((h - dy) / 2, w / 2, r);
282 dx = Math.max(r + dy * 0.5, dx); 261 dx = Math.max(r + dy * 0.5, dx);
283 dx = Math.min(w - r - dy * 0.5, dx); 262 dx = Math.min(w - r - dy * 0.5, dx);
284 -  
285 - if (r < w * 0.25)  
286 - { 263 +
  264 + if (r < w * 0.25) {
287 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false)); 265 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));
288 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false)); 266 constr.push(new mxConnectionConstraint(new mxPoint(0.75, 0), false));
289 } 267 }
290 -  
291 - if (r < (h - dy) * 0.25)  
292 - { 268 +
  269 + if (r < (h - dy) * 0.25) {
293 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h - dy) * 0.25)); 270 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h - dy) * 0.25));
294 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h - dy) * 0.75)); 271 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h - dy) * 0.75));
295 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h - dy) * 0.25)); 272 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h - dy) * 0.25));
@@ -314,8 +291,7 @@ mxShapeBasicRoundRectCallout.prototype.getConstraints = function(style, w, h) @@ -314,8 +291,7 @@ mxShapeBasicRoundRectCallout.prototype.getConstraints = function(style, w, h)
314 /** 291 /**
315 * Extends mxShape. 292 * Extends mxShape.
316 */ 293 */
317 -function mxShapeBasicWave(bounds, fill, stroke, strokewidth)  
318 -{ 294 +function mxShapeBasicWave(bounds, fill, stroke, strokewidth) {
319 mxShape.call(this); 295 mxShape.call(this);
320 this.bounds = bounds; 296 this.bounds = bounds;
321 this.fill = fill; 297 this.fill = fill;
@@ -330,23 +306,22 @@ function mxShapeBasicWave(bounds, fill, stroke, strokewidth) @@ -330,23 +306,22 @@ function mxShapeBasicWave(bounds, fill, stroke, strokewidth)
330 mxUtils.extend(mxShapeBasicWave, mxActor); 306 mxUtils.extend(mxShapeBasicWave, mxActor);
331 307
332 mxShapeBasicWave.prototype.customProperties = [ 308 mxShapeBasicWave.prototype.customProperties = [
333 - {name: 'dy', dispName: 'Wave Size', type: 'float', min:0, max:1, defVal: 0.3} 309 + { name: 'dy', dispName: 'Wave Size', type: 'float', min: 0, max: 1, defVal: 0.3 }
334 ]; 310 ];
335 311
336 -mxShapeBasicWave.prototype.cst = {WAVE : 'mxgraph.basic.wave2'}; 312 +mxShapeBasicWave.prototype.cst = { WAVE: 'mxgraph.basic.wave2' };
337 313
338 /** 314 /**
339 * Function: paintVertexShape 315 * Function: paintVertexShape
340 * 316 *
341 * Paints the vertex shape. 317 * Paints the vertex shape.
342 */ 318 */
343 -mxShapeBasicWave.prototype.paintVertexShape = function(c, x, y, w, h)  
344 -{ 319 +mxShapeBasicWave.prototype.paintVertexShape = function (c, x, y, w, h) {
345 c.translate(x, y); 320 c.translate(x, y);
346 321
347 var dy = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 322 var dy = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
348 var fy = 1.4 323 var fy = 1.4
349 - 324 +
350 c.begin(); 325 c.begin();
351 c.moveTo(0, dy / 2); 326 c.moveTo(0, dy / 2);
352 c.quadTo(w / 6, dy * (1 - fy), w / 3, dy / 2); 327 c.quadTo(w / 6, dy * (1 - fy), w / 3, dy / 2);
@@ -364,27 +339,23 @@ mxCellRenderer.registerShape(mxShapeBasicWave.prototype.cst.WAVE, mxShapeBasicWa @@ -364,27 +339,23 @@ mxCellRenderer.registerShape(mxShapeBasicWave.prototype.cst.WAVE, mxShapeBasicWa
364 339
365 mxShapeBasicWave.prototype.constraints = null; 340 mxShapeBasicWave.prototype.constraints = null;
366 341
367 -Graph.handleFactory[mxShapeBasicWave.prototype.cst.WAVE] = function(state)  
368 -{  
369 - var handles = [Graph.createHandle(state, ['dy'], function(bounds)  
370 - { 342 +Graph.handleFactory[mxShapeBasicWave.prototype.cst.WAVE] = function (state) {
  343 + var handles = [Graph.createHandle(state, ['dy'], function (bounds) {
371 var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)))); 344 var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
372 345
373 return new mxPoint(bounds.x + bounds.width / 2, bounds.y + dy * bounds.height); 346 return new mxPoint(bounds.x + bounds.width / 2, bounds.y + dy * bounds.height);
374 - }, function(bounds, pt)  
375 - { 347 + }, function (bounds, pt) {
376 this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(1, (pt.y - bounds.y) / bounds.height))) / 100; 348 this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(1, (pt.y - bounds.y) / bounds.height))) / 100;
377 })]; 349 })];
378 350
379 return handles; 351 return handles;
380 }; 352 };
381 353
382 -mxShapeBasicWave.prototype.getConstraints = function(style, w, h)  
383 -{ 354 +mxShapeBasicWave.prototype.getConstraints = function (style, w, h) {
384 var constr = []; 355 var constr = [];
385 var dy = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 356 var dy = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
386 var fy = 1.4 357 var fy = 1.4
387 - 358 +
388 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy * 0.5)); 359 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy * 0.5));
389 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w / 6, h * 0.015)); 360 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w / 6, h * 0.015));
390 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w / 3, dy * 0.5)); 361 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w / 3, dy * 0.5));
@@ -411,8 +382,7 @@ mxShapeBasicWave.prototype.getConstraints = function(style, w, h) @@ -411,8 +382,7 @@ mxShapeBasicWave.prototype.getConstraints = function(style, w, h)
411 /** 382 /**
412 * Extends mxShape. 383 * Extends mxShape.
413 */ 384 */
414 -function mxShapeBasicOctagon(bounds, fill, stroke, strokewidth)  
415 -{ 385 +function mxShapeBasicOctagon(bounds, fill, stroke, strokewidth) {
416 mxShape.call(this); 386 mxShape.call(this);
417 this.bounds = bounds; 387 this.bounds = bounds;
418 this.fill = fill; 388 this.fill = fill;
@@ -427,24 +397,23 @@ function mxShapeBasicOctagon(bounds, fill, stroke, strokewidth) @@ -427,24 +397,23 @@ function mxShapeBasicOctagon(bounds, fill, stroke, strokewidth)
427 mxUtils.extend(mxShapeBasicOctagon, mxActor); 397 mxUtils.extend(mxShapeBasicOctagon, mxActor);
428 398
429 mxShapeBasicOctagon.prototype.customProperties = [ 399 mxShapeBasicOctagon.prototype.customProperties = [
430 - {name: 'dx', dispName: 'Cutoff Size', type: 'float', min:0, defVal:15} 400 + { name: 'dx', dispName: 'Cutoff Size', type: 'float', min: 0, defVal: 15 }
431 ]; 401 ];
432 402
433 -mxShapeBasicOctagon.prototype.cst = {OCTAGON : 'mxgraph.basic.octagon2'}; 403 +mxShapeBasicOctagon.prototype.cst = { OCTAGON: 'mxgraph.basic.octagon2' };
434 404
435 /** 405 /**
436 * Function: paintVertexShape 406 * Function: paintVertexShape
437 * 407 *
438 * Paints the vertex shape. 408 * Paints the vertex shape.
439 */ 409 */
440 -mxShapeBasicOctagon.prototype.paintVertexShape = function(c, x, y, w, h)  
441 -{ 410 +mxShapeBasicOctagon.prototype.paintVertexShape = function (c, x, y, w, h) {
442 c.translate(x, y); 411 c.translate(x, y);
443 412
444 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2; 413 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
445 414
446 dx = Math.min(w * 0.5, h * 0.5, dx); 415 dx = Math.min(w * 0.5, h * 0.5, dx);
447 - 416 +
448 c.begin(); 417 c.begin();
449 c.moveTo(dx, 0); 418 c.moveTo(dx, 0);
450 c.lineTo(w - dx, 0); 419 c.lineTo(w - dx, 0);
@@ -462,28 +431,24 @@ mxCellRenderer.registerShape(mxShapeBasicOctagon.prototype.cst.OCTAGON, mxShapeB @@ -462,28 +431,24 @@ mxCellRenderer.registerShape(mxShapeBasicOctagon.prototype.cst.OCTAGON, mxShapeB
462 431
463 mxShapeBasicOctagon.prototype.constraints = null; 432 mxShapeBasicOctagon.prototype.constraints = null;
464 433
465 -Graph.handleFactory[mxShapeBasicOctagon.prototype.cst.OCTAGON] = function(state)  
466 -{  
467 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
468 - { 434 +Graph.handleFactory[mxShapeBasicOctagon.prototype.cst.OCTAGON] = function (state) {
  435 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
469 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 436 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
470 437
471 return new mxPoint(bounds.x + dx, bounds.y + dx); 438 return new mxPoint(bounds.x + dx, bounds.y + dx);
472 - }, function(bounds, pt)  
473 - { 439 + }, function (bounds, pt) {
474 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100; 440 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100;
475 })]; 441 })];
476 - 442 +
477 return handles; 443 return handles;
478 }; 444 };
479 445
480 -mxShapeBasicOctagon.prototype.getConstraints = function(style, w, h)  
481 -{ 446 +mxShapeBasicOctagon.prototype.getConstraints = function (style, w, h) {
482 var constr = []; 447 var constr = [];
483 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2; 448 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
484 449
485 dx = Math.min(w * 0.5, h * 0.5, dx) * 0.5; 450 dx = Math.min(w * 0.5, h * 0.5, dx) * 0.5;
486 - 451 +
487 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false)); 452 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
488 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false)); 453 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));
489 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false)); 454 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
@@ -502,8 +467,7 @@ mxShapeBasicOctagon.prototype.getConstraints = function(style, w, h) @@ -502,8 +467,7 @@ mxShapeBasicOctagon.prototype.getConstraints = function(style, w, h)
502 /** 467 /**
503 * Extends mxShape. 468 * Extends mxShape.
504 */ 469 */
505 -function mxShapeBasicIsoCube(bounds, fill, stroke, strokewidth)  
506 -{ 470 +function mxShapeBasicIsoCube(bounds, fill, stroke, strokewidth) {
507 mxShape.call(this); 471 mxShape.call(this);
508 this.bounds = bounds; 472 this.bounds = bounds;
509 this.fill = fill; 473 this.fill = fill;
@@ -518,23 +482,22 @@ function mxShapeBasicIsoCube(bounds, fill, stroke, strokewidth) @@ -518,23 +482,22 @@ function mxShapeBasicIsoCube(bounds, fill, stroke, strokewidth)
518 mxUtils.extend(mxShapeBasicIsoCube, mxActor); 482 mxUtils.extend(mxShapeBasicIsoCube, mxActor);
519 483
520 mxShapeBasicIsoCube.prototype.customProperties = [ 484 mxShapeBasicIsoCube.prototype.customProperties = [
521 - {name: 'isoAngle', dispName: 'Perspective Angle', type: 'float', min:0, defVal:15} 485 + { name: 'isoAngle', dispName: 'Perspective Angle', type: 'float', min: 0, defVal: 15 }
522 ]; 486 ];
523 487
524 -mxShapeBasicIsoCube.prototype.cst = {ISO_CUBE : 'mxgraph.basic.isocube'}; 488 +mxShapeBasicIsoCube.prototype.cst = { ISO_CUBE: 'mxgraph.basic.isocube' };
525 489
526 /** 490 /**
527 * Function: paintVertexShape 491 * Function: paintVertexShape
528 * 492 *
529 * Paints the vertex shape. 493 * Paints the vertex shape.
530 */ 494 */
531 -mxShapeBasicIsoCube.prototype.paintVertexShape = function(c, x, y, w, h)  
532 -{ 495 +mxShapeBasicIsoCube.prototype.paintVertexShape = function (c, x, y, w, h) {
533 c.translate(x, y); 496 c.translate(x, y);
534 497
535 - var isoAngle = Math.max(0.01, Math.min(94, parseFloat(mxUtils.getValue(this.style, 'isoAngle', this.isoAngle)))) * Math.PI / 200 ; 498 + var isoAngle = Math.max(0.01, Math.min(94, parseFloat(mxUtils.getValue(this.style, 'isoAngle', this.isoAngle)))) * Math.PI / 200;
536 var isoH = Math.min(w * Math.tan(isoAngle), h * 0.5); 499 var isoH = Math.min(w * Math.tan(isoAngle), h * 0.5);
537 - 500 +
538 c.begin(); 501 c.begin();
539 c.moveTo(w * 0.5, 0); 502 c.moveTo(w * 0.5, 0);
540 c.lineTo(w, isoH); 503 c.lineTo(w, isoH);
@@ -546,7 +509,7 @@ mxShapeBasicIsoCube.prototype.paintVertexShape = function(c, x, y, w, h) @@ -546,7 +509,7 @@ mxShapeBasicIsoCube.prototype.paintVertexShape = function(c, x, y, w, h)
546 c.fillAndStroke(); 509 c.fillAndStroke();
547 510
548 c.setShadow(false); 511 c.setShadow(false);
549 - 512 +
550 c.begin(); 513 c.begin();
551 c.moveTo(0, isoH); 514 c.moveTo(0, isoH);
552 c.lineTo(w * 0.5, 2 * isoH); 515 c.lineTo(w * 0.5, 2 * isoH);
@@ -560,28 +523,24 @@ mxCellRenderer.registerShape(mxShapeBasicIsoCube.prototype.cst.ISO_CUBE, mxShape @@ -560,28 +523,24 @@ mxCellRenderer.registerShape(mxShapeBasicIsoCube.prototype.cst.ISO_CUBE, mxShape
560 523
561 mxShapeBasicIsoCube.prototype.constraints = null; 524 mxShapeBasicIsoCube.prototype.constraints = null;
562 525
563 -Graph.handleFactory[mxShapeBasicIsoCube.prototype.cst.ISO_CUBE] = function(state)  
564 -{  
565 - var handles = [Graph.createHandle(state, ['isoAngle'], function(bounds)  
566 - {  
567 - var isoAngle = Math.max(0.01, Math.min(94, parseFloat(mxUtils.getValue(this.state.style, 'isoAngle', this.isoAngle)))) * Math.PI / 200 ; 526 +Graph.handleFactory[mxShapeBasicIsoCube.prototype.cst.ISO_CUBE] = function (state) {
  527 + var handles = [Graph.createHandle(state, ['isoAngle'], function (bounds) {
  528 + var isoAngle = Math.max(0.01, Math.min(94, parseFloat(mxUtils.getValue(this.state.style, 'isoAngle', this.isoAngle)))) * Math.PI / 200;
568 var isoH = Math.min(bounds.width * Math.tan(isoAngle), bounds.height * 0.5); 529 var isoH = Math.min(bounds.width * Math.tan(isoAngle), bounds.height * 0.5);
569 530
570 return new mxPoint(bounds.x, bounds.y + isoH); 531 return new mxPoint(bounds.x, bounds.y + isoH);
571 - }, function(bounds, pt)  
572 - { 532 + }, function (bounds, pt) {
573 this.state.style['isoAngle'] = Math.round(100 * Math.max(0, Math.min(100, pt.y - bounds.y))) / 100; 533 this.state.style['isoAngle'] = Math.round(100 * Math.max(0, Math.min(100, pt.y - bounds.y))) / 100;
574 })]; 534 })];
575 - 535 +
576 return handles; 536 return handles;
577 }; 537 };
578 538
579 -mxShapeBasicIsoCube.prototype.getConstraints = function(style, w, h)  
580 -{ 539 +mxShapeBasicIsoCube.prototype.getConstraints = function (style, w, h) {
581 var constr = []; 540 var constr = [];
582 - var isoAngle = Math.max(0.01, Math.min(94, parseFloat(mxUtils.getValue(this.style, 'isoAngle', this.isoAngle)))) * Math.PI / 200 ; 541 + var isoAngle = Math.max(0.01, Math.min(94, parseFloat(mxUtils.getValue(this.style, 'isoAngle', this.isoAngle)))) * Math.PI / 200;
583 var isoH = Math.min(w * Math.tan(isoAngle), h * 0.5); 542 var isoH = Math.min(w * Math.tan(isoAngle), h * 0.5);
584 - 543 +
585 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false)); 544 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
586 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, isoH)); 545 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, isoH));
587 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false)); 546 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
@@ -600,8 +559,7 @@ mxShapeBasicIsoCube.prototype.getConstraints = function(style, w, h) @@ -600,8 +559,7 @@ mxShapeBasicIsoCube.prototype.getConstraints = function(style, w, h)
600 /** 559 /**
601 * Extends mxShape. 560 * Extends mxShape.
602 */ 561 */
603 -function mxShapeBasicTriangleAcute(bounds, fill, stroke, strokewidth)  
604 -{ 562 +function mxShapeBasicTriangleAcute(bounds, fill, stroke, strokewidth) {
605 mxShape.call(this); 563 mxShape.call(this);
606 this.bounds = bounds; 564 this.bounds = bounds;
607 this.fill = fill; 565 this.fill = fill;
@@ -616,22 +574,21 @@ function mxShapeBasicTriangleAcute(bounds, fill, stroke, strokewidth) @@ -616,22 +574,21 @@ function mxShapeBasicTriangleAcute(bounds, fill, stroke, strokewidth)
616 mxUtils.extend(mxShapeBasicTriangleAcute, mxActor); 574 mxUtils.extend(mxShapeBasicTriangleAcute, mxActor);
617 575
618 mxShapeBasicTriangleAcute.prototype.customProperties = [ 576 mxShapeBasicTriangleAcute.prototype.customProperties = [
619 - {name: 'dx', dispName: 'Top', type: 'float', min:0, max:1, defVal:0.5} 577 + { name: 'dx', dispName: 'Top', type: 'float', min: 0, max: 1, defVal: 0.5 }
620 ]; 578 ];
621 579
622 -mxShapeBasicTriangleAcute.prototype.cst = {ACUTE_TRIANGLE : 'mxgraph.basic.acute_triangle'}; 580 +mxShapeBasicTriangleAcute.prototype.cst = { ACUTE_TRIANGLE: 'mxgraph.basic.acute_triangle' };
623 581
624 /** 582 /**
625 * Function: paintVertexShape 583 * Function: paintVertexShape
626 * 584 *
627 * Paints the vertex shape. 585 * Paints the vertex shape.
628 */ 586 */
629 -mxShapeBasicTriangleAcute.prototype.paintVertexShape = function(c, x, y, w, h)  
630 -{ 587 +mxShapeBasicTriangleAcute.prototype.paintVertexShape = function (c, x, y, w, h) {
631 c.translate(x, y); 588 c.translate(x, y);
632 589
633 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 590 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
634 - 591 +
635 c.begin(); 592 c.begin();
636 c.moveTo(0, h); 593 c.moveTo(0, h);
637 c.lineTo(dx, 0); 594 c.lineTo(dx, 0);
@@ -644,26 +601,22 @@ mxCellRenderer.registerShape(mxShapeBasicTriangleAcute.prototype.cst.ACUTE_TRIAN @@ -644,26 +601,22 @@ mxCellRenderer.registerShape(mxShapeBasicTriangleAcute.prototype.cst.ACUTE_TRIAN
644 601
645 mxShapeBasicTriangleAcute.prototype.constraints = null; 602 mxShapeBasicTriangleAcute.prototype.constraints = null;
646 603
647 -Graph.handleFactory[mxShapeBasicTriangleAcute.prototype.cst.ACUTE_TRIANGLE] = function(state)  
648 -{  
649 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
650 - { 604 +Graph.handleFactory[mxShapeBasicTriangleAcute.prototype.cst.ACUTE_TRIANGLE] = function (state) {
  605 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
651 var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 606 var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
652 607
653 return new mxPoint(bounds.x + dx * bounds.width, bounds.y + 10); 608 return new mxPoint(bounds.x + dx * bounds.width, bounds.y + 10);
654 - }, function(bounds, pt)  
655 - { 609 + }, function (bounds, pt) {
656 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100; 610 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100;
657 })]; 611 })];
658 612
659 return handles; 613 return handles;
660 }; 614 };
661 615
662 -mxShapeBasicTriangleAcute.prototype.getConstraints = function(style, w, h)  
663 -{ 616 +mxShapeBasicTriangleAcute.prototype.getConstraints = function (style, w, h) {
664 var constr = []; 617 var constr = [];
665 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 618 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
666 - 619 +
667 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false)); 620 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));
668 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false)); 621 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));
669 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false)); 622 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));
@@ -680,8 +633,7 @@ mxShapeBasicTriangleAcute.prototype.getConstraints = function(style, w, h) @@ -680,8 +633,7 @@ mxShapeBasicTriangleAcute.prototype.getConstraints = function(style, w, h)
680 /** 633 /**
681 * Extends mxShape. 634 * Extends mxShape.
682 */ 635 */
683 -function mxShapeBasicTriangleObtuse(bounds, fill, stroke, strokewidth)  
684 -{ 636 +function mxShapeBasicTriangleObtuse(bounds, fill, stroke, strokewidth) {
685 mxShape.call(this); 637 mxShape.call(this);
686 this.bounds = bounds; 638 this.bounds = bounds;
687 this.fill = fill; 639 this.fill = fill;
@@ -696,22 +648,21 @@ function mxShapeBasicTriangleObtuse(bounds, fill, stroke, strokewidth) @@ -696,22 +648,21 @@ function mxShapeBasicTriangleObtuse(bounds, fill, stroke, strokewidth)
696 mxUtils.extend(mxShapeBasicTriangleObtuse, mxActor); 648 mxUtils.extend(mxShapeBasicTriangleObtuse, mxActor);
697 649
698 mxShapeBasicTriangleObtuse.prototype.customProperties = [ 650 mxShapeBasicTriangleObtuse.prototype.customProperties = [
699 - {name: 'dx', dispName: 'Bottom', type: 'float', min:0, max:1, defVal:0.25} 651 + { name: 'dx', dispName: 'Bottom', type: 'float', min: 0, max: 1, defVal: 0.25 }
700 ]; 652 ];
701 653
702 -mxShapeBasicTriangleObtuse.prototype.cst = {OBTUSE_TRIANGLE : 'mxgraph.basic.obtuse_triangle'}; 654 +mxShapeBasicTriangleObtuse.prototype.cst = { OBTUSE_TRIANGLE: 'mxgraph.basic.obtuse_triangle' };
703 655
704 /** 656 /**
705 * Function: paintVertexShape 657 * Function: paintVertexShape
706 * 658 *
707 * Paints the vertex shape. 659 * Paints the vertex shape.
708 */ 660 */
709 -mxShapeBasicTriangleObtuse.prototype.paintVertexShape = function(c, x, y, w, h)  
710 -{ 661 +mxShapeBasicTriangleObtuse.prototype.paintVertexShape = function (c, x, y, w, h) {
711 c.translate(x, y); 662 c.translate(x, y);
712 663
713 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 664 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
714 - 665 +
715 c.begin(); 666 c.begin();
716 c.moveTo(dx, h); 667 c.moveTo(dx, h);
717 c.lineTo(0, 0); 668 c.lineTo(0, 0);
@@ -724,26 +675,22 @@ mxCellRenderer.registerShape(mxShapeBasicTriangleObtuse.prototype.cst.OBTUSE_TRI @@ -724,26 +675,22 @@ mxCellRenderer.registerShape(mxShapeBasicTriangleObtuse.prototype.cst.OBTUSE_TRI
724 675
725 mxShapeBasicTriangleObtuse.prototype.constraints = null; 676 mxShapeBasicTriangleObtuse.prototype.constraints = null;
726 677
727 -Graph.handleFactory[mxShapeBasicTriangleObtuse.prototype.cst.OBTUSE_TRIANGLE] = function(state)  
728 -{  
729 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
730 - { 678 +Graph.handleFactory[mxShapeBasicTriangleObtuse.prototype.cst.OBTUSE_TRIANGLE] = function (state) {
  679 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
731 var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 680 var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
732 681
733 return new mxPoint(bounds.x + dx * bounds.width, bounds.y + bounds.height - 10); 682 return new mxPoint(bounds.x + dx * bounds.width, bounds.y + bounds.height - 10);
734 - }, function(bounds, pt)  
735 - { 683 + }, function (bounds, pt) {
736 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100; 684 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100;
737 })]; 685 })];
738 686
739 return handles; 687 return handles;
740 }; 688 };
741 689
742 -mxShapeBasicTriangleObtuse.prototype.getConstraints = function(style, w, h)  
743 -{ 690 +mxShapeBasicTriangleObtuse.prototype.getConstraints = function (style, w, h) {
744 var constr = []; 691 var constr = [];
745 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 692 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
746 - 693 +
747 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false)); 694 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
748 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false)); 695 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));
749 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5, h * 0.5)); 696 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5, h * 0.5));
@@ -760,8 +707,7 @@ mxShapeBasicTriangleObtuse.prototype.getConstraints = function(style, w, h) @@ -760,8 +707,7 @@ mxShapeBasicTriangleObtuse.prototype.getConstraints = function(style, w, h)
760 /** 707 /**
761 * Extends mxShape. 708 * Extends mxShape.
762 */ 709 */
763 -function mxShapeBasicDrop(bounds, fill, stroke, strokewidth)  
764 -{ 710 +function mxShapeBasicDrop(bounds, fill, stroke, strokewidth) {
765 mxShape.call(this); 711 mxShape.call(this);
766 this.bounds = bounds; 712 this.bounds = bounds;
767 this.fill = fill; 713 this.fill = fill;
@@ -774,26 +720,25 @@ function mxShapeBasicDrop(bounds, fill, stroke, strokewidth) @@ -774,26 +720,25 @@ function mxShapeBasicDrop(bounds, fill, stroke, strokewidth)
774 */ 720 */
775 mxUtils.extend(mxShapeBasicDrop, mxActor); 721 mxUtils.extend(mxShapeBasicDrop, mxActor);
776 722
777 -mxShapeBasicDrop.prototype.cst = {DROP : 'mxgraph.basic.drop'}; 723 +mxShapeBasicDrop.prototype.cst = { DROP: 'mxgraph.basic.drop' };
778 724
779 /** 725 /**
780 * Function: paintVertexShape 726 * Function: paintVertexShape
781 * 727 *
782 * Paints the vertex shape. 728 * Paints the vertex shape.
783 */ 729 */
784 -mxShapeBasicDrop.prototype.paintVertexShape = function(c, x, y, w, h)  
785 -{ 730 +mxShapeBasicDrop.prototype.paintVertexShape = function (c, x, y, w, h) {
786 c.translate(x, y); 731 c.translate(x, y);
787 732
788 var r = Math.min(h, w) * 0.5; 733 var r = Math.min(h, w) * 0.5;
789 var d = h - r; 734 var d = h - r;
790 var a = Math.sqrt(d * d - r * r); 735 var a = Math.sqrt(d * d - r * r);
791 - 736 +
792 var angle = Math.atan(a / r); 737 var angle = Math.atan(a / r);
793 - 738 +
794 var x1 = r * Math.sin(angle); 739 var x1 = r * Math.sin(angle);
795 var y1 = r * Math.cos(angle); 740 var y1 = r * Math.cos(angle);
796 - 741 +
797 c.begin(); 742 c.begin();
798 c.moveTo(w * 0.5, 0); 743 c.moveTo(w * 0.5, 0);
799 c.lineTo(w * 0.5 + x1, h - r - y1); 744 c.lineTo(w * 0.5 + x1, h - r - y1);
@@ -815,8 +760,7 @@ mxShapeBasicDrop.prototype.constraints = null; @@ -815,8 +760,7 @@ mxShapeBasicDrop.prototype.constraints = null;
815 /** 760 /**
816 * Extends mxShape. 761 * Extends mxShape.
817 */ 762 */
818 -function mxShapeBasicCone2(bounds, fill, stroke, strokewidth)  
819 -{ 763 +function mxShapeBasicCone2(bounds, fill, stroke, strokewidth) {
820 mxShape.call(this); 764 mxShape.call(this);
821 this.bounds = bounds; 765 this.bounds = bounds;
822 this.fill = fill; 766 this.fill = fill;
@@ -832,41 +776,38 @@ function mxShapeBasicCone2(bounds, fill, stroke, strokewidth) @@ -832,41 +776,38 @@ function mxShapeBasicCone2(bounds, fill, stroke, strokewidth)
832 mxUtils.extend(mxShapeBasicCone2, mxActor); 776 mxUtils.extend(mxShapeBasicCone2, mxActor);
833 777
834 mxShapeBasicCone2.prototype.customProperties = [ 778 mxShapeBasicCone2.prototype.customProperties = [
835 - {name: 'dx', dispName: 'Top', type: 'float', min:0, max:1, defVal:0.5},  
836 - {name: 'dy', dispName: 'Bottom', type: 'float', min:0, max:1, defVal:0.9} 779 + { name: 'dx', dispName: 'Top', type: 'float', min: 0, max: 1, defVal: 0.5 },
  780 + { name: 'dy', dispName: 'Bottom', type: 'float', min: 0, max: 1, defVal: 0.9 }
837 ]; 781 ];
838 782
839 -mxShapeBasicCone2.prototype.cst = {CONE2 : 'mxgraph.basic.cone2'}; 783 +mxShapeBasicCone2.prototype.cst = { CONE2: 'mxgraph.basic.cone2' };
840 784
841 /** 785 /**
842 * Function: paintVertexShape 786 * Function: paintVertexShape
843 * 787 *
844 * Paints the vertex shape. 788 * Paints the vertex shape.
845 */ 789 */
846 -mxShapeBasicCone2.prototype.paintVertexShape = function(c, x, y, w, h)  
847 -{ 790 +mxShapeBasicCone2.prototype.paintVertexShape = function (c, x, y, w, h) {
848 c.translate(x, y); 791 c.translate(x, y);
849 792
850 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 793 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
851 var dy = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 794 var dy = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
852 - 795 +
853 var ry = h - dy; 796 var ry = h - dy;
854 - 797 +
855 c.begin(); 798 c.begin();
856 c.moveTo(dx, 0); 799 c.moveTo(dx, 0);
857 -  
858 - if (ry > 0)  
859 - { 800 +
  801 + if (ry > 0) {
860 c.lineTo(w, h - ry); 802 c.lineTo(w, h - ry);
861 c.arcTo(w * 0.5, ry, 0, 0, 1, w * 0.5, h); 803 c.arcTo(w * 0.5, ry, 0, 0, 1, w * 0.5, h);
862 c.arcTo(w * 0.5, ry, 0, 0, 1, 0, h - ry); 804 c.arcTo(w * 0.5, ry, 0, 0, 1, 0, h - ry);
863 } 805 }
864 - else  
865 - { 806 + else {
866 c.lineTo(w, h); 807 c.lineTo(w, h);
867 c.lineTo(0, h); 808 c.lineTo(0, h);
868 } 809 }
869 - 810 +
870 c.close(); 811 c.close();
871 c.fillAndStroke(); 812 c.fillAndStroke();
872 }; 813 };
@@ -875,40 +816,34 @@ mxCellRenderer.registerShape(mxShapeBasicCone2.prototype.cst.CONE2, mxShapeBasic @@ -875,40 +816,34 @@ mxCellRenderer.registerShape(mxShapeBasicCone2.prototype.cst.CONE2, mxShapeBasic
875 816
876 mxShapeBasicCone2.prototype.constraints = null; 817 mxShapeBasicCone2.prototype.constraints = null;
877 818
878 -Graph.handleFactory[mxShapeBasicCone2.prototype.cst.CONE2] = function(state)  
879 -{  
880 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
881 - { 819 +Graph.handleFactory[mxShapeBasicCone2.prototype.cst.CONE2] = function (state) {
  820 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
882 var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 821 var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
883 822
884 return new mxPoint(bounds.x + dx * bounds.width, bounds.y + 10); 823 return new mxPoint(bounds.x + dx * bounds.width, bounds.y + 10);
885 - }, function(bounds, pt)  
886 - { 824 + }, function (bounds, pt) {
887 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100; 825 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100;
888 })]; 826 })];
889 827
890 - var handle2 = Graph.createHandle(state, ['dy'], function(bounds)  
891 - { 828 + var handle2 = Graph.createHandle(state, ['dy'], function (bounds) {
892 var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)))); 829 var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
893 830
894 return new mxPoint(bounds.x + 10, bounds.y + dy * bounds.height); 831 return new mxPoint(bounds.x + 10, bounds.y + dy * bounds.height);
895 - }, function(bounds, pt)  
896 - { 832 + }, function (bounds, pt) {
897 this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(1, (pt.y - bounds.y) / bounds.height))) / 100; 833 this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(1, (pt.y - bounds.y) / bounds.height))) / 100;
898 }); 834 });
899 - 835 +
900 handles.push(handle2); 836 handles.push(handle2);
901 - 837 +
902 return handles; 838 return handles;
903 }; 839 };
904 840
905 -mxShapeBasicCone2.prototype.getConstraints = function(style, w, h)  
906 -{ 841 +mxShapeBasicCone2.prototype.getConstraints = function (style, w, h) {
907 var constr = []; 842 var constr = [];
908 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 843 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
909 var dy = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 844 var dy = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
910 var ry = h - dy; 845 var ry = h - dy;
911 - 846 +
912 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, 0)); 847 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, 0));
913 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, h - ry)); 848 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, h - ry));
914 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5, h)); 849 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5, h));
@@ -923,8 +858,7 @@ mxShapeBasicCone2.prototype.getConstraints = function(style, w, h) @@ -923,8 +858,7 @@ mxShapeBasicCone2.prototype.getConstraints = function(style, w, h)
923 /** 858 /**
924 * Extends mxShape. 859 * Extends mxShape.
925 */ 860 */
926 -function mxShapeBasicPyramid(bounds, fill, stroke, strokewidth)  
927 -{ 861 +function mxShapeBasicPyramid(bounds, fill, stroke, strokewidth) {
928 mxShape.call(this); 862 mxShape.call(this);
929 this.bounds = bounds; 863 this.bounds = bounds;
930 this.fill = fill; 864 this.fill = fill;
@@ -942,28 +876,27 @@ function mxShapeBasicPyramid(bounds, fill, stroke, strokewidth) @@ -942,28 +876,27 @@ function mxShapeBasicPyramid(bounds, fill, stroke, strokewidth)
942 mxUtils.extend(mxShapeBasicPyramid, mxActor); 876 mxUtils.extend(mxShapeBasicPyramid, mxActor);
943 877
944 mxShapeBasicPyramid.prototype.customProperties = [ 878 mxShapeBasicPyramid.prototype.customProperties = [
945 - {name: 'dx1', dispName: 'Top', type: 'float', min:0, max:1, defVal:0.4},  
946 - {name: 'dx2', dispName: 'Bottom', type: 'float', min:0, max:1, defVal:0.6},  
947 - {name: 'dy1', dispName: 'Perspective Left', type: 'float', min:0, max:1, defVal:0.9},  
948 - {name: 'dy2', dispName: 'Perspective Right', type: 'float', min:0, max:1, defVal:0.8} 879 + { name: 'dx1', dispName: 'Top', type: 'float', min: 0, max: 1, defVal: 0.4 },
  880 + { name: 'dx2', dispName: 'Bottom', type: 'float', min: 0, max: 1, defVal: 0.6 },
  881 + { name: 'dy1', dispName: 'Perspective Left', type: 'float', min: 0, max: 1, defVal: 0.9 },
  882 + { name: 'dy2', dispName: 'Perspective Right', type: 'float', min: 0, max: 1, defVal: 0.8 }
949 ]; 883 ];
950 884
951 -mxShapeBasicPyramid.prototype.cst = {PYRAMID : 'mxgraph.basic.pyramid'}; 885 +mxShapeBasicPyramid.prototype.cst = { PYRAMID: 'mxgraph.basic.pyramid' };
952 886
953 /** 887 /**
954 * Function: paintVertexShape 888 * Function: paintVertexShape
955 * 889 *
956 * Paints the vertex shape. 890 * Paints the vertex shape.
957 */ 891 */
958 -mxShapeBasicPyramid.prototype.paintVertexShape = function(c, x, y, w, h)  
959 -{ 892 +mxShapeBasicPyramid.prototype.paintVertexShape = function (c, x, y, w, h) {
960 c.translate(x, y); 893 c.translate(x, y);
961 894
962 var dx1 = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1)))); 895 var dx1 = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
963 var dx2 = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2)))); 896 var dx2 = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))));
964 var dy1 = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 897 var dy1 = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
965 var dy2 = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy2', this.dy2)))); 898 var dy2 = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy2', this.dy2))));
966 - 899 +
967 c.begin(); 900 c.begin();
968 c.moveTo(dx1, 0); 901 c.moveTo(dx1, 0);
969 c.lineTo(w, dy2); 902 c.lineTo(w, dy2);
@@ -971,9 +904,9 @@ mxShapeBasicPyramid.prototype.paintVertexShape = function(c, x, y, w, h) @@ -971,9 +904,9 @@ mxShapeBasicPyramid.prototype.paintVertexShape = function(c, x, y, w, h)
971 c.lineTo(0, dy1); 904 c.lineTo(0, dy1);
972 c.close(); 905 c.close();
973 c.fillAndStroke(); 906 c.fillAndStroke();
974 - 907 +
975 c.setShadow(false); 908 c.setShadow(false);
976 - 909 +
977 c.begin(); 910 c.begin();
978 c.moveTo(dx1, 0); 911 c.moveTo(dx1, 0);
979 c.lineTo(dx2, h); 912 c.lineTo(dx2, h);
@@ -984,65 +917,55 @@ mxCellRenderer.registerShape(mxShapeBasicPyramid.prototype.cst.PYRAMID, mxShapeB @@ -984,65 +917,55 @@ mxCellRenderer.registerShape(mxShapeBasicPyramid.prototype.cst.PYRAMID, mxShapeB
984 917
985 mxShapeBasicPyramid.prototype.constraints = null; 918 mxShapeBasicPyramid.prototype.constraints = null;
986 919
987 -Graph.handleFactory[mxShapeBasicPyramid.prototype.cst.PYRAMID] = function(state)  
988 -{  
989 - var handles = [Graph.createHandle(state, ['dx1'], function(bounds)  
990 - { 920 +Graph.handleFactory[mxShapeBasicPyramid.prototype.cst.PYRAMID] = function (state) {
  921 + var handles = [Graph.createHandle(state, ['dx1'], function (bounds) {
991 var dx1 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1)))); 922 var dx1 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));
992 923
993 return new mxPoint(bounds.x + dx1 * bounds.width, bounds.y + 10); 924 return new mxPoint(bounds.x + dx1 * bounds.width, bounds.y + 10);
994 - }, function(bounds, pt)  
995 - { 925 + }, function (bounds, pt) {
996 this.state.style['dx1'] = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100; 926 this.state.style['dx1'] = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100;
997 })]; 927 })];
998 928
999 - var handle2 = Graph.createHandle(state, ['dx2'], function(bounds)  
1000 - { 929 + var handle2 = Graph.createHandle(state, ['dx2'], function (bounds) {
1001 var dx2 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2)))); 930 var dx2 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));
1002 931
1003 return new mxPoint(bounds.x + dx2 * bounds.width, bounds.y + bounds.height - 10); 932 return new mxPoint(bounds.x + dx2 * bounds.width, bounds.y + bounds.height - 10);
1004 - }, function(bounds, pt)  
1005 - { 933 + }, function (bounds, pt) {
1006 this.state.style['dx2'] = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100; 934 this.state.style['dx2'] = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100;
1007 }); 935 });
1008 - 936 +
1009 handles.push(handle2); 937 handles.push(handle2);
1010 -  
1011 - var handle3 = Graph.createHandle(state, ['dy1'], function(bounds)  
1012 - { 938 +
  939 + var handle3 = Graph.createHandle(state, ['dy1'], function (bounds) {
1013 var dy1 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1)))); 940 var dy1 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));
1014 941
1015 return new mxPoint(bounds.x + 10, bounds.y + dy1 * bounds.height); 942 return new mxPoint(bounds.x + 10, bounds.y + dy1 * bounds.height);
1016 - }, function(bounds, pt)  
1017 - { 943 + }, function (bounds, pt) {
1018 this.state.style['dy1'] = Math.round(100 * Math.max(0, Math.min(1, (pt.y - bounds.y) / bounds.height))) / 100; 944 this.state.style['dy1'] = Math.round(100 * Math.max(0, Math.min(1, (pt.y - bounds.y) / bounds.height))) / 100;
1019 }); 945 });
1020 - 946 +
1021 handles.push(handle3); 947 handles.push(handle3);
1022 -  
1023 - var handle4 = Graph.createHandle(state, ['dy2'], function(bounds)  
1024 - { 948 +
  949 + var handle4 = Graph.createHandle(state, ['dy2'], function (bounds) {
1025 var dy2 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2)))); 950 var dy2 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2))));
1026 951
1027 return new mxPoint(bounds.x + bounds.width - 10, bounds.y + dy2 * bounds.height); 952 return new mxPoint(bounds.x + bounds.width - 10, bounds.y + dy2 * bounds.height);
1028 - }, function(bounds, pt)  
1029 - { 953 + }, function (bounds, pt) {
1030 this.state.style['dy2'] = Math.round(100 * Math.max(0, Math.min(1, (pt.y - bounds.y) / bounds.height))) / 100; 954 this.state.style['dy2'] = Math.round(100 * Math.max(0, Math.min(1, (pt.y - bounds.y) / bounds.height))) / 100;
1031 }); 955 });
1032 - 956 +
1033 handles.push(handle4); 957 handles.push(handle4);
1034 - 958 +
1035 return handles; 959 return handles;
1036 }; 960 };
1037 961
1038 -mxShapeBasicPyramid.prototype.getConstraints = function(style, w, h)  
1039 -{ 962 +mxShapeBasicPyramid.prototype.getConstraints = function (style, w, h) {
1040 var constr = []; 963 var constr = [];
1041 var dx1 = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1)))); 964 var dx1 = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
1042 var dx2 = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2)))); 965 var dx2 = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))));
1043 var dy1 = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1)))); 966 var dy1 = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
1044 var dy2 = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy2', this.dy2)))); 967 var dy2 = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy2', this.dy2))));
1045 - 968 +
1046 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx1, 0)); 969 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx1, 0));
1047 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + dx1) * 0.5, dy2 * 0.5)); 970 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + dx1) * 0.5, dy2 * 0.5));
1048 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, dy2)); 971 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, dy2));
@@ -1061,8 +984,7 @@ mxShapeBasicPyramid.prototype.getConstraints = function(style, w, h) @@ -1061,8 +984,7 @@ mxShapeBasicPyramid.prototype.getConstraints = function(style, w, h)
1061 /** 984 /**
1062 * Extends mxShape. 985 * Extends mxShape.
1063 */ 986 */
1064 -function mxShapeBasic4PointStar2(bounds, fill, stroke, strokewidth)  
1065 -{ 987 +function mxShapeBasic4PointStar2(bounds, fill, stroke, strokewidth) {
1066 mxShape.call(this); 988 mxShape.call(this);
1067 this.bounds = bounds; 989 this.bounds = bounds;
1068 this.fill = fill; 990 this.fill = fill;
@@ -1077,18 +999,17 @@ function mxShapeBasic4PointStar2(bounds, fill, stroke, strokewidth) @@ -1077,18 +999,17 @@ function mxShapeBasic4PointStar2(bounds, fill, stroke, strokewidth)
1077 mxUtils.extend(mxShapeBasic4PointStar2, mxActor); 999 mxUtils.extend(mxShapeBasic4PointStar2, mxActor);
1078 1000
1079 mxShapeBasic4PointStar2.prototype.customProperties = [ 1001 mxShapeBasic4PointStar2.prototype.customProperties = [
1080 - {name: 'dx', dispName: 'Thickness', type: 'float', min:0, max:1, defVal:0.8} 1002 + { name: 'dx', dispName: 'Thickness', type: 'float', min: 0, max: 1, defVal: 0.8 }
1081 ]; 1003 ];
1082 1004
1083 -mxShapeBasic4PointStar2.prototype.cst = {FOUR_POINT_STAR_2 : 'mxgraph.basic.4_point_star_2'}; 1005 +mxShapeBasic4PointStar2.prototype.cst = { FOUR_POINT_STAR_2: 'mxgraph.basic.4_point_star_2' };
1084 1006
1085 /** 1007 /**
1086 * Function: paintVertexShape 1008 * Function: paintVertexShape
1087 * 1009 *
1088 * Paints the vertex shape. 1010 * Paints the vertex shape.
1089 */ 1011 */
1090 -mxShapeBasic4PointStar2.prototype.paintVertexShape = function(c, x, y, w, h)  
1091 -{ 1012 +mxShapeBasic4PointStar2.prototype.paintVertexShape = function (c, x, y, w, h) {
1092 c.translate(x, y); 1013 c.translate(x, y);
1093 1014
1094 var dx = 0.5 * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1015 var dx = 0.5 * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
@@ -1110,23 +1031,19 @@ mxCellRenderer.registerShape(mxShapeBasic4PointStar2.prototype.cst.FOUR_POINT_ST @@ -1110,23 +1031,19 @@ mxCellRenderer.registerShape(mxShapeBasic4PointStar2.prototype.cst.FOUR_POINT_ST
1110 1031
1111 mxShapeBasic4PointStar2.prototype.constraints = null; 1032 mxShapeBasic4PointStar2.prototype.constraints = null;
1112 1033
1113 -Graph.handleFactory[mxShapeBasic4PointStar2.prototype.cst.FOUR_POINT_STAR_2] = function(state)  
1114 -{  
1115 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
1116 - { 1034 +Graph.handleFactory[mxShapeBasic4PointStar2.prototype.cst.FOUR_POINT_STAR_2] = function (state) {
  1035 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
1117 var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 1036 var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
1118 1037
1119 return new mxPoint(bounds.x + dx * bounds.width / 2, bounds.y + dx * bounds.height / 2); 1038 return new mxPoint(bounds.x + dx * bounds.width / 2, bounds.y + dx * bounds.height / 2);
1120 - }, function(bounds, pt)  
1121 - { 1039 + }, function (bounds, pt) {
1122 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(1, 2 * (pt.x - bounds.x) / bounds.width))) / 100; 1040 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(1, 2 * (pt.x - bounds.x) / bounds.width))) / 100;
1123 })]; 1041 })];
1124 1042
1125 return handles; 1043 return handles;
1126 }; 1044 };
1127 1045
1128 -mxShapeBasic4PointStar2.prototype.getConstraints = function(style, w, h)  
1129 -{ 1046 +mxShapeBasic4PointStar2.prototype.getConstraints = function (style, w, h) {
1130 var constr = []; 1047 var constr = [];
1131 var dx = 0.5 * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1048 var dx = 0.5 * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1132 1049
@@ -1148,8 +1065,7 @@ mxShapeBasic4PointStar2.prototype.getConstraints = function(style, w, h) @@ -1148,8 +1065,7 @@ mxShapeBasic4PointStar2.prototype.getConstraints = function(style, w, h)
1148 /** 1065 /**
1149 * Extends mxShape. 1066 * Extends mxShape.
1150 */ 1067 */
1151 -function mxShapeBasicDiagSnipRect(bounds, fill, stroke, strokewidth)  
1152 -{ 1068 +function mxShapeBasicDiagSnipRect(bounds, fill, stroke, strokewidth) {
1153 mxShape.call(this); 1069 mxShape.call(this);
1154 this.bounds = bounds; 1070 this.bounds = bounds;
1155 this.fill = fill; 1071 this.fill = fill;
@@ -1164,24 +1080,23 @@ function mxShapeBasicDiagSnipRect(bounds, fill, stroke, strokewidth) @@ -1164,24 +1080,23 @@ function mxShapeBasicDiagSnipRect(bounds, fill, stroke, strokewidth)
1164 mxUtils.extend(mxShapeBasicDiagSnipRect, mxActor); 1080 mxUtils.extend(mxShapeBasicDiagSnipRect, mxActor);
1165 1081
1166 mxShapeBasicDiagSnipRect.prototype.customProperties = [ 1082 mxShapeBasicDiagSnipRect.prototype.customProperties = [
1167 - {name: 'dx', dispName: 'Snip', type: 'float', min:0, deVal:6}, 1083 + { name: 'dx', dispName: 'Snip', type: 'float', min: 0, deVal: 6 },
1168 ]; 1084 ];
1169 1085
1170 -mxShapeBasicDiagSnipRect.prototype.cst = {DIAG_SNIP_RECT : 'mxgraph.basic.diag_snip_rect'}; 1086 +mxShapeBasicDiagSnipRect.prototype.cst = { DIAG_SNIP_RECT: 'mxgraph.basic.diag_snip_rect' };
1171 1087
1172 /** 1088 /**
1173 * Function: paintVertexShape 1089 * Function: paintVertexShape
1174 * 1090 *
1175 * Paints the vertex shape. 1091 * Paints the vertex shape.
1176 */ 1092 */
1177 -mxShapeBasicDiagSnipRect.prototype.paintVertexShape = function(c, x, y, w, h)  
1178 -{ 1093 +mxShapeBasicDiagSnipRect.prototype.paintVertexShape = function (c, x, y, w, h) {
1179 c.translate(x, y); 1094 c.translate(x, y);
1180 1095
1181 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2; 1096 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
1182 1097
1183 dx = Math.min(w * 0.5, h * 0.5, dx); 1098 dx = Math.min(w * 0.5, h * 0.5, dx);
1184 - 1099 +
1185 c.begin(); 1100 c.begin();
1186 c.moveTo(dx, 0); 1101 c.moveTo(dx, 0);
1187 c.lineTo(w, 0); 1102 c.lineTo(w, 0);
@@ -1197,23 +1112,19 @@ mxCellRenderer.registerShape(mxShapeBasicDiagSnipRect.prototype.cst.DIAG_SNIP_RE @@ -1197,23 +1112,19 @@ mxCellRenderer.registerShape(mxShapeBasicDiagSnipRect.prototype.cst.DIAG_SNIP_RE
1197 1112
1198 mxShapeBasicDiagSnipRect.prototype.constraints = null; 1113 mxShapeBasicDiagSnipRect.prototype.constraints = null;
1199 1114
1200 -Graph.handleFactory[mxShapeBasicDiagSnipRect.prototype.cst.DIAG_SNIP_RECT] = function(state)  
1201 -{  
1202 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
1203 - { 1115 +Graph.handleFactory[mxShapeBasicDiagSnipRect.prototype.cst.DIAG_SNIP_RECT] = function (state) {
  1116 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
1204 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 1117 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
1205 1118
1206 return new mxPoint(bounds.x + dx, bounds.y + dx); 1119 return new mxPoint(bounds.x + dx, bounds.y + dx);
1207 - }, function(bounds, pt)  
1208 - { 1120 + }, function (bounds, pt) {
1209 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100; 1121 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100;
1210 })]; 1122 })];
1211 - 1123 +
1212 return handles; 1124 return handles;
1213 }; 1125 };
1214 1126
1215 -mxShapeBasicDiagSnipRect.prototype.getConstraints = function(style, w, h)  
1216 -{ 1127 +mxShapeBasicDiagSnipRect.prototype.getConstraints = function (style, w, h) {
1217 var constr = []; 1128 var constr = [];
1218 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2; 1129 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
1219 1130
@@ -1237,8 +1148,7 @@ mxShapeBasicDiagSnipRect.prototype.getConstraints = function(style, w, h) @@ -1237,8 +1148,7 @@ mxShapeBasicDiagSnipRect.prototype.getConstraints = function(style, w, h)
1237 /** 1148 /**
1238 * Extends mxShape. 1149 * Extends mxShape.
1239 */ 1150 */
1240 -function mxShapeBasicDiagRoundRect(bounds, fill, stroke, strokewidth)  
1241 -{ 1151 +function mxShapeBasicDiagRoundRect(bounds, fill, stroke, strokewidth) {
1242 mxShape.call(this); 1152 mxShape.call(this);
1243 this.bounds = bounds; 1153 this.bounds = bounds;
1244 this.fill = fill; 1154 this.fill = fill;
@@ -1253,24 +1163,23 @@ function mxShapeBasicDiagRoundRect(bounds, fill, stroke, strokewidth) @@ -1253,24 +1163,23 @@ function mxShapeBasicDiagRoundRect(bounds, fill, stroke, strokewidth)
1253 mxUtils.extend(mxShapeBasicDiagRoundRect, mxActor); 1163 mxUtils.extend(mxShapeBasicDiagRoundRect, mxActor);
1254 1164
1255 mxShapeBasicDiagRoundRect.prototype.customProperties = [ 1165 mxShapeBasicDiagRoundRect.prototype.customProperties = [
1256 - {name: 'dx', dispName: 'Rounding Size', type: 'float', min:0, defVal:6}, 1166 + { name: 'dx', dispName: 'Rounding Size', type: 'float', min: 0, defVal: 6 },
1257 ]; 1167 ];
1258 1168
1259 -mxShapeBasicDiagRoundRect.prototype.cst = {DIAG_ROUND_RECT : 'mxgraph.basic.diag_round_rect'}; 1169 +mxShapeBasicDiagRoundRect.prototype.cst = { DIAG_ROUND_RECT: 'mxgraph.basic.diag_round_rect' };
1260 1170
1261 /** 1171 /**
1262 * Function: paintVertexShape 1172 * Function: paintVertexShape
1263 * 1173 *
1264 * Paints the vertex shape. 1174 * Paints the vertex shape.
1265 */ 1175 */
1266 -mxShapeBasicDiagRoundRect.prototype.paintVertexShape = function(c, x, y, w, h)  
1267 -{ 1176 +mxShapeBasicDiagRoundRect.prototype.paintVertexShape = function (c, x, y, w, h) {
1268 c.translate(x, y); 1177 c.translate(x, y);
1269 1178
1270 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2; 1179 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
1271 1180
1272 dx = Math.min(w * 0.5, h * 0.5, dx); 1181 dx = Math.min(w * 0.5, h * 0.5, dx);
1273 - 1182 +
1274 c.begin(); 1183 c.begin();
1275 c.moveTo(dx, 0); 1184 c.moveTo(dx, 0);
1276 c.lineTo(w, 0); 1185 c.lineTo(w, 0);
@@ -1287,23 +1196,19 @@ mxCellRenderer.registerShape(mxShapeBasicDiagRoundRect.prototype.cst.DIAG_ROUND_ @@ -1287,23 +1196,19 @@ mxCellRenderer.registerShape(mxShapeBasicDiagRoundRect.prototype.cst.DIAG_ROUND_
1287 1196
1288 mxShapeBasicDiagRoundRect.prototype.constraints = null; 1197 mxShapeBasicDiagRoundRect.prototype.constraints = null;
1289 1198
1290 -Graph.handleFactory[mxShapeBasicDiagRoundRect.prototype.cst.DIAG_ROUND_RECT] = function(state)  
1291 -{  
1292 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
1293 - { 1199 +Graph.handleFactory[mxShapeBasicDiagRoundRect.prototype.cst.DIAG_ROUND_RECT] = function (state) {
  1200 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
1294 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 1201 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
1295 1202
1296 return new mxPoint(bounds.x + dx, bounds.y + dx); 1203 return new mxPoint(bounds.x + dx, bounds.y + dx);
1297 - }, function(bounds, pt)  
1298 - { 1204 + }, function (bounds, pt) {
1299 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100; 1205 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100;
1300 })]; 1206 })];
1301 - 1207 +
1302 return handles; 1208 return handles;
1303 }; 1209 };
1304 1210
1305 -mxShapeBasicDiagRoundRect.prototype.getConstraints = function(style, w, h)  
1306 -{ 1211 +mxShapeBasicDiagRoundRect.prototype.getConstraints = function (style, w, h) {
1307 var constr = []; 1212 var constr = [];
1308 1213
1309 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false)); 1214 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
@@ -1322,8 +1227,7 @@ mxShapeBasicDiagRoundRect.prototype.getConstraints = function(style, w, h) @@ -1322,8 +1227,7 @@ mxShapeBasicDiagRoundRect.prototype.getConstraints = function(style, w, h)
1322 /** 1227 /**
1323 * Extends mxShape. 1228 * Extends mxShape.
1324 */ 1229 */
1325 -function mxShapeBasicCornerRoundRect(bounds, fill, stroke, strokewidth)  
1326 -{ 1230 +function mxShapeBasicCornerRoundRect(bounds, fill, stroke, strokewidth) {
1327 mxShape.call(this); 1231 mxShape.call(this);
1328 this.bounds = bounds; 1232 this.bounds = bounds;
1329 this.fill = fill; 1233 this.fill = fill;
@@ -1338,24 +1242,23 @@ function mxShapeBasicCornerRoundRect(bounds, fill, stroke, strokewidth) @@ -1338,24 +1242,23 @@ function mxShapeBasicCornerRoundRect(bounds, fill, stroke, strokewidth)
1338 mxUtils.extend(mxShapeBasicCornerRoundRect, mxActor); 1242 mxUtils.extend(mxShapeBasicCornerRoundRect, mxActor);
1339 1243
1340 mxShapeBasicCornerRoundRect.prototype.customProperties = [ 1244 mxShapeBasicCornerRoundRect.prototype.customProperties = [
1341 - {name: 'dx', dispName: 'Rounding Size', type: 'float', min:0, defVal:6}, 1245 + { name: 'dx', dispName: 'Rounding Size', type: 'float', min: 0, defVal: 6 },
1342 ]; 1246 ];
1343 1247
1344 -mxShapeBasicCornerRoundRect.prototype.cst = {CORNER_ROUND_RECT : 'mxgraph.basic.corner_round_rect'}; 1248 +mxShapeBasicCornerRoundRect.prototype.cst = { CORNER_ROUND_RECT: 'mxgraph.basic.corner_round_rect' };
1345 1249
1346 /** 1250 /**
1347 * Function: paintVertexShape 1251 * Function: paintVertexShape
1348 * 1252 *
1349 * Paints the vertex shape. 1253 * Paints the vertex shape.
1350 */ 1254 */
1351 -mxShapeBasicCornerRoundRect.prototype.paintVertexShape = function(c, x, y, w, h)  
1352 -{ 1255 +mxShapeBasicCornerRoundRect.prototype.paintVertexShape = function (c, x, y, w, h) {
1353 c.translate(x, y); 1256 c.translate(x, y);
1354 1257
1355 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2; 1258 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
1356 1259
1357 dx = Math.min(w * 0.5, h * 0.5, dx); 1260 dx = Math.min(w * 0.5, h * 0.5, dx);
1358 - 1261 +
1359 c.begin(); 1262 c.begin();
1360 c.moveTo(dx, 0); 1263 c.moveTo(dx, 0);
1361 c.lineTo(w, 0); 1264 c.lineTo(w, 0);
@@ -1371,23 +1274,19 @@ mxCellRenderer.registerShape(mxShapeBasicCornerRoundRect.prototype.cst.CORNER_RO @@ -1371,23 +1274,19 @@ mxCellRenderer.registerShape(mxShapeBasicCornerRoundRect.prototype.cst.CORNER_RO
1371 1274
1372 mxShapeBasicCornerRoundRect.prototype.constraints = null; 1275 mxShapeBasicCornerRoundRect.prototype.constraints = null;
1373 1276
1374 -Graph.handleFactory[mxShapeBasicCornerRoundRect.prototype.cst.CORNER_ROUND_RECT] = function(state)  
1375 -{  
1376 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
1377 - { 1277 +Graph.handleFactory[mxShapeBasicCornerRoundRect.prototype.cst.CORNER_ROUND_RECT] = function (state) {
  1278 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
1378 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 1279 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
1379 1280
1380 return new mxPoint(bounds.x + dx, bounds.y + dx); 1281 return new mxPoint(bounds.x + dx, bounds.y + dx);
1381 - }, function(bounds, pt)  
1382 - { 1282 + }, function (bounds, pt) {
1383 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100; 1283 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100;
1384 })]; 1284 })];
1385 - 1285 +
1386 return handles; 1286 return handles;
1387 }; 1287 };
1388 1288
1389 -mxShapeBasicCornerRoundRect.prototype.getConstraints = function(style, w, h)  
1390 -{ 1289 +mxShapeBasicCornerRoundRect.prototype.getConstraints = function (style, w, h) {
1391 var constr = []; 1290 var constr = [];
1392 1291
1393 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false)); 1292 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
@@ -1407,8 +1306,7 @@ mxShapeBasicCornerRoundRect.prototype.getConstraints = function(style, w, h) @@ -1407,8 +1306,7 @@ mxShapeBasicCornerRoundRect.prototype.getConstraints = function(style, w, h)
1407 /** 1306 /**
1408 * Extends mxShape. 1307 * Extends mxShape.
1409 */ 1308 */
1410 -function mxShapeBasicPlaque(bounds, fill, stroke, strokewidth)  
1411 -{ 1309 +function mxShapeBasicPlaque(bounds, fill, stroke, strokewidth) {
1412 mxShape.call(this); 1310 mxShape.call(this);
1413 this.bounds = bounds; 1311 this.bounds = bounds;
1414 this.fill = fill; 1312 this.fill = fill;
@@ -1423,24 +1321,23 @@ function mxShapeBasicPlaque(bounds, fill, stroke, strokewidth) @@ -1423,24 +1321,23 @@ function mxShapeBasicPlaque(bounds, fill, stroke, strokewidth)
1423 mxUtils.extend(mxShapeBasicPlaque, mxActor); 1321 mxUtils.extend(mxShapeBasicPlaque, mxActor);
1424 1322
1425 mxShapeBasicPlaque.prototype.customProperties = [ 1323 mxShapeBasicPlaque.prototype.customProperties = [
1426 - {name: 'dx', dispName: 'Cutoff Size', type: 'float', min:0, defVal:6}, 1324 + { name: 'dx', dispName: 'Cutoff Size', type: 'float', min: 0, defVal: 6 },
1427 ]; 1325 ];
1428 1326
1429 -mxShapeBasicPlaque.prototype.cst = {PLAQUE : 'mxgraph.basic.plaque'}; 1327 +mxShapeBasicPlaque.prototype.cst = { PLAQUE: 'mxgraph.basic.plaque' };
1430 1328
1431 /** 1329 /**
1432 * Function: paintVertexShape 1330 * Function: paintVertexShape
1433 * 1331 *
1434 * Paints the vertex shape. 1332 * Paints the vertex shape.
1435 */ 1333 */
1436 -mxShapeBasicPlaque.prototype.paintVertexShape = function(c, x, y, w, h)  
1437 -{ 1334 +mxShapeBasicPlaque.prototype.paintVertexShape = function (c, x, y, w, h) {
1438 c.translate(x, y); 1335 c.translate(x, y);
1439 1336
1440 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2; 1337 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
1441 1338
1442 dx = Math.min(w * 0.5, h * 0.5, dx); 1339 dx = Math.min(w * 0.5, h * 0.5, dx);
1443 - 1340 +
1444 c.begin(); 1341 c.begin();
1445 c.moveTo(w - dx, 0); 1342 c.moveTo(w - dx, 0);
1446 c.arcTo(dx, dx, 0, 0, 0, w, dx); 1343 c.arcTo(dx, dx, 0, 0, 0, w, dx);
@@ -1458,23 +1355,19 @@ mxCellRenderer.registerShape(mxShapeBasicPlaque.prototype.cst.PLAQUE, mxShapeBas @@ -1458,23 +1355,19 @@ mxCellRenderer.registerShape(mxShapeBasicPlaque.prototype.cst.PLAQUE, mxShapeBas
1458 1355
1459 mxShapeBasicPlaque.prototype.constraints = null; 1356 mxShapeBasicPlaque.prototype.constraints = null;
1460 1357
1461 -Graph.handleFactory[mxShapeBasicPlaque.prototype.cst.PLAQUE] = function(state)  
1462 -{  
1463 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
1464 - { 1358 +Graph.handleFactory[mxShapeBasicPlaque.prototype.cst.PLAQUE] = function (state) {
  1359 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
1465 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 1360 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
1466 1361
1467 return new mxPoint(bounds.x + dx * 1.41, bounds.y + dx * 1.41); 1362 return new mxPoint(bounds.x + dx * 1.41, bounds.y + dx * 1.41);
1468 - }, function(bounds, pt)  
1469 - { 1363 + }, function (bounds, pt) {
1470 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100; 1364 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100;
1471 })]; 1365 })];
1472 - 1366 +
1473 return handles; 1367 return handles;
1474 }; 1368 };
1475 1369
1476 -mxShapeBasicPlaque.prototype.getConstraints = function(style, w, h)  
1477 -{ 1370 +mxShapeBasicPlaque.prototype.getConstraints = function (style, w, h) {
1478 var constr = []; 1371 var constr = [];
1479 1372
1480 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false)); 1373 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
@@ -1491,8 +1384,7 @@ mxShapeBasicPlaque.prototype.getConstraints = function(style, w, h) @@ -1491,8 +1384,7 @@ mxShapeBasicPlaque.prototype.getConstraints = function(style, w, h)
1491 /** 1384 /**
1492 * Extends mxShape. 1385 * Extends mxShape.
1493 */ 1386 */
1494 -function mxShapeBasicFrame(bounds, fill, stroke, strokewidth)  
1495 -{ 1387 +function mxShapeBasicFrame(bounds, fill, stroke, strokewidth) {
1496 mxShape.call(this); 1388 mxShape.call(this);
1497 this.bounds = bounds; 1389 this.bounds = bounds;
1498 this.fill = fill; 1390 this.fill = fill;
@@ -1507,24 +1399,23 @@ function mxShapeBasicFrame(bounds, fill, stroke, strokewidth) @@ -1507,24 +1399,23 @@ function mxShapeBasicFrame(bounds, fill, stroke, strokewidth)
1507 mxUtils.extend(mxShapeBasicFrame, mxActor); 1399 mxUtils.extend(mxShapeBasicFrame, mxActor);
1508 1400
1509 mxShapeBasicFrame.prototype.customProperties = [ 1401 mxShapeBasicFrame.prototype.customProperties = [
1510 - {name: 'dx', dispName: 'Width', type: 'float', min:0, defVal:10}, 1402 + { name: 'dx', dispName: 'Width', type: 'float', min: 0, defVal: 10 },
1511 ]; 1403 ];
1512 1404
1513 -mxShapeBasicFrame.prototype.cst = {FRAME : 'mxgraph.basic.frame'}; 1405 +mxShapeBasicFrame.prototype.cst = { FRAME: 'mxgraph.basic.frame' };
1514 1406
1515 /** 1407 /**
1516 * Function: paintVertexShape 1408 * Function: paintVertexShape
1517 * 1409 *
1518 * Paints the vertex shape. 1410 * Paints the vertex shape.
1519 */ 1411 */
1520 -mxShapeBasicFrame.prototype.paintVertexShape = function(c, x, y, w, h)  
1521 -{ 1412 +mxShapeBasicFrame.prototype.paintVertexShape = function (c, x, y, w, h) {
1522 c.translate(x, y); 1413 c.translate(x, y);
1523 1414
1524 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1415 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1525 1416
1526 dx = Math.min(w * 0.5, h * 0.5, dx); 1417 dx = Math.min(w * 0.5, h * 0.5, dx);
1527 - 1418 +
1528 c.begin(); 1419 c.begin();
1529 c.moveTo(w, 0); 1420 c.moveTo(w, 0);
1530 c.lineTo(w, h); 1421 c.lineTo(w, h);
@@ -1543,23 +1434,19 @@ mxCellRenderer.registerShape(mxShapeBasicFrame.prototype.cst.FRAME, mxShapeBasic @@ -1543,23 +1434,19 @@ mxCellRenderer.registerShape(mxShapeBasicFrame.prototype.cst.FRAME, mxShapeBasic
1543 1434
1544 mxShapeBasicFrame.prototype.constraints = null; 1435 mxShapeBasicFrame.prototype.constraints = null;
1545 1436
1546 -Graph.handleFactory[mxShapeBasicFrame.prototype.cst.FRAME] = function(state)  
1547 -{  
1548 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
1549 - { 1437 +Graph.handleFactory[mxShapeBasicFrame.prototype.cst.FRAME] = function (state) {
  1438 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
1550 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 1439 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
1551 1440
1552 return new mxPoint(bounds.x + dx, bounds.y + dx); 1441 return new mxPoint(bounds.x + dx, bounds.y + dx);
1553 - }, function(bounds, pt)  
1554 - { 1442 + }, function (bounds, pt) {
1555 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100; 1443 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100;
1556 })]; 1444 })];
1557 - 1445 +
1558 return handles; 1446 return handles;
1559 }; 1447 };
1560 1448
1561 -mxShapeBasicFrame.prototype.getConstraints = function(style, w, h)  
1562 -{ 1449 +mxShapeBasicFrame.prototype.getConstraints = function (style, w, h) {
1563 var constr = []; 1450 var constr = [];
1564 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1451 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1565 dx = Math.min(w * 0.5, h * 0.5, dx); 1452 dx = Math.min(w * 0.5, h * 0.5, dx);
@@ -1581,17 +1468,17 @@ mxShapeBasicFrame.prototype.getConstraints = function(style, w, h) @@ -1581,17 +1468,17 @@ mxShapeBasicFrame.prototype.getConstraints = function(style, w, h)
1581 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false)); 1468 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
1582 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h * 0.25)); 1469 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h * 0.25));
1583 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, dx)); 1470 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, dx));
1584 - constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - 2 * dx)* 0.25 + dx, dx)); 1471 + constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - 2 * dx) * 0.25 + dx, dx));
1585 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false, null, 0, dx)); 1472 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false, null, 0, dx));
1586 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 1.5 - dx) * 0.5, dx)); 1473 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 1.5 - dx) * 0.5, dx));
1587 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false, null, -dx, dx)); 1474 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false, null, -dx, dx));
1588 - constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, (h - 2 * dx)* 0.25 + dx)); 1475 + constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, (h - 2 * dx) * 0.25 + dx));
1589 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false, null, -dx, 0)); 1476 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false, null, -dx, 0));
1590 - constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, (h - 2 * dx) * 0.75 + dx)); 1477 + constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, (h - 2 * dx) * 0.75 + dx));
1591 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false, null, -dx, -dx)); 1478 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false, null, -dx, -dx));
1592 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - 2 * dx) * 0.75 + dx, h - dx)); 1479 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - 2 * dx) * 0.75 + dx, h - dx));
1593 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false, null, 0, -dx)); 1480 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false, null, 0, -dx));
1594 - constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - 2 * dx) * 0.25 + dx, h - dx)); 1481 + constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - 2 * dx) * 0.25 + dx, h - dx));
1595 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false, null, dx, -dx)); 1482 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false, null, dx, -dx));
1596 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, (h - 2 * dx) * 0.75 + dx)); 1483 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, (h - 2 * dx) * 0.75 + dx));
1597 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, dx, 0)); 1484 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, dx, 0));
@@ -1606,8 +1493,7 @@ mxShapeBasicFrame.prototype.getConstraints = function(style, w, h) @@ -1606,8 +1493,7 @@ mxShapeBasicFrame.prototype.getConstraints = function(style, w, h)
1606 /** 1493 /**
1607 * Extends mxShape. 1494 * Extends mxShape.
1608 */ 1495 */
1609 -function mxShapeBasicPlaqueFrame(bounds, fill, stroke, strokewidth)  
1610 -{ 1496 +function mxShapeBasicPlaqueFrame(bounds, fill, stroke, strokewidth) {
1611 mxShape.call(this); 1497 mxShape.call(this);
1612 this.bounds = bounds; 1498 this.bounds = bounds;
1613 this.fill = fill; 1499 this.fill = fill;
@@ -1621,24 +1507,23 @@ function mxShapeBasicPlaqueFrame(bounds, fill, stroke, strokewidth) @@ -1621,24 +1507,23 @@ function mxShapeBasicPlaqueFrame(bounds, fill, stroke, strokewidth)
1621 mxUtils.extend(mxShapeBasicPlaqueFrame, mxActor); 1507 mxUtils.extend(mxShapeBasicPlaqueFrame, mxActor);
1622 1508
1623 mxShapeBasicPlaqueFrame.prototype.customProperties = [ 1509 mxShapeBasicPlaqueFrame.prototype.customProperties = [
1624 - {name: 'dx', dispName: 'Width', type: 'float', mix:0, defVal:10}, 1510 + { name: 'dx', dispName: 'Width', type: 'float', mix: 0, defVal: 10 },
1625 ]; 1511 ];
1626 1512
1627 -mxShapeBasicPlaqueFrame.prototype.cst = {PLAQUE_FRAME : 'mxgraph.basic.plaque_frame'}; 1513 +mxShapeBasicPlaqueFrame.prototype.cst = { PLAQUE_FRAME: 'mxgraph.basic.plaque_frame' };
1628 1514
1629 /** 1515 /**
1630 * Function: paintVertexShape 1516 * Function: paintVertexShape
1631 * 1517 *
1632 * Paints the vertex shape. 1518 * Paints the vertex shape.
1633 */ 1519 */
1634 -mxShapeBasicPlaqueFrame.prototype.paintVertexShape = function(c, x, y, w, h)  
1635 -{ 1520 +mxShapeBasicPlaqueFrame.prototype.paintVertexShape = function (c, x, y, w, h) {
1636 c.translate(x, y); 1521 c.translate(x, y);
1637 1522
1638 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1523 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1639 1524
1640 dx = Math.min(w * 0.25, h * 0.25, dx); 1525 dx = Math.min(w * 0.25, h * 0.25, dx);
1641 - 1526 +
1642 c.begin(); 1527 c.begin();
1643 c.moveTo(w - dx, 0); 1528 c.moveTo(w - dx, 0);
1644 c.arcTo(dx, dx, 0, 0, 0, w, dx); 1529 c.arcTo(dx, dx, 0, 0, 0, w, dx);
@@ -1649,7 +1534,7 @@ mxShapeBasicPlaqueFrame.prototype.paintVertexShape = function(c, x, y, w, h) @@ -1649,7 +1534,7 @@ mxShapeBasicPlaqueFrame.prototype.paintVertexShape = function(c, x, y, w, h)
1649 c.lineTo(0, dx); 1534 c.lineTo(0, dx);
1650 c.arcTo(dx, dx, 0, 0, 0, dx, 0); 1535 c.arcTo(dx, dx, 0, 0, 0, dx, 0);
1651 c.close(); 1536 c.close();
1652 - 1537 +
1653 c.moveTo(dx * 2, dx); 1538 c.moveTo(dx * 2, dx);
1654 c.arcTo(dx * 2, dx * 2, 0, 0, 1, dx, dx * 2); 1539 c.arcTo(dx * 2, dx * 2, 0, 0, 1, dx, dx * 2);
1655 c.lineTo(dx, h - 2 * dx); 1540 c.lineTo(dx, h - 2 * dx);
@@ -1668,23 +1553,19 @@ mxCellRenderer.registerShape(mxShapeBasicPlaqueFrame.prototype.cst.PLAQUE_FRAME, @@ -1668,23 +1553,19 @@ mxCellRenderer.registerShape(mxShapeBasicPlaqueFrame.prototype.cst.PLAQUE_FRAME,
1668 1553
1669 mxShapeBasicPlaqueFrame.prototype.constraints = null; 1554 mxShapeBasicPlaqueFrame.prototype.constraints = null;
1670 1555
1671 -Graph.handleFactory[mxShapeBasicPlaqueFrame.prototype.cst.PLAQUE_FRAME] = function(state)  
1672 -{  
1673 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
1674 - { 1556 +Graph.handleFactory[mxShapeBasicPlaqueFrame.prototype.cst.PLAQUE_FRAME] = function (state) {
  1557 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
1675 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 1558 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
1676 1559
1677 return new mxPoint(bounds.x + dx, bounds.y + dx); 1560 return new mxPoint(bounds.x + dx, bounds.y + dx);
1678 - }, function(bounds, pt)  
1679 - { 1561 + }, function (bounds, pt) {
1680 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100; 1562 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100;
1681 })]; 1563 })];
1682 - 1564 +
1683 return handles; 1565 return handles;
1684 }; 1566 };
1685 1567
1686 -mxShapeBasicPlaqueFrame.prototype.getConstraints = function(style, w, h)  
1687 -{ 1568 +mxShapeBasicPlaqueFrame.prototype.getConstraints = function (style, w, h) {
1688 var constr = []; 1569 var constr = [];
1689 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1570 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1690 dx = Math.min(w * 0.5, h * 0.5, dx); 1571 dx = Math.min(w * 0.5, h * 0.5, dx);
@@ -1707,8 +1588,7 @@ mxShapeBasicPlaqueFrame.prototype.getConstraints = function(style, w, h) @@ -1707,8 +1588,7 @@ mxShapeBasicPlaqueFrame.prototype.getConstraints = function(style, w, h)
1707 /** 1588 /**
1708 * Extends mxShape. 1589 * Extends mxShape.
1709 */ 1590 */
1710 -function mxShapeBasicRoundedFrame(bounds, fill, stroke, strokewidth)  
1711 -{ 1591 +function mxShapeBasicRoundedFrame(bounds, fill, stroke, strokewidth) {
1712 mxShape.call(this); 1592 mxShape.call(this);
1713 this.bounds = bounds; 1593 this.bounds = bounds;
1714 this.fill = fill; 1594 this.fill = fill;
@@ -1723,24 +1603,23 @@ function mxShapeBasicRoundedFrame(bounds, fill, stroke, strokewidth) @@ -1723,24 +1603,23 @@ function mxShapeBasicRoundedFrame(bounds, fill, stroke, strokewidth)
1723 mxUtils.extend(mxShapeBasicRoundedFrame, mxActor); 1603 mxUtils.extend(mxShapeBasicRoundedFrame, mxActor);
1724 1604
1725 mxShapeBasicRoundedFrame.prototype.customProperties = [ 1605 mxShapeBasicRoundedFrame.prototype.customProperties = [
1726 - {name: 'dx', dispName: 'Width', type: 'float', min:0, defVal:10}, 1606 + { name: 'dx', dispName: 'Width', type: 'float', min: 0, defVal: 10 },
1727 ]; 1607 ];
1728 1608
1729 -mxShapeBasicRoundedFrame.prototype.cst = {ROUNDED_FRAME : 'mxgraph.basic.rounded_frame'}; 1609 +mxShapeBasicRoundedFrame.prototype.cst = { ROUNDED_FRAME: 'mxgraph.basic.rounded_frame' };
1730 1610
1731 /** 1611 /**
1732 * Function: paintVertexShape 1612 * Function: paintVertexShape
1733 * 1613 *
1734 * Paints the vertex shape. 1614 * Paints the vertex shape.
1735 */ 1615 */
1736 -mxShapeBasicRoundedFrame.prototype.paintVertexShape = function(c, x, y, w, h)  
1737 -{ 1616 +mxShapeBasicRoundedFrame.prototype.paintVertexShape = function (c, x, y, w, h) {
1738 c.translate(x, y); 1617 c.translate(x, y);
1739 1618
1740 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1619 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1741 1620
1742 dx = Math.min(w * 0.25, h * 0.25, dx); 1621 dx = Math.min(w * 0.25, h * 0.25, dx);
1743 - 1622 +
1744 c.begin(); 1623 c.begin();
1745 c.moveTo(w - 2 * dx, 0); 1624 c.moveTo(w - 2 * dx, 0);
1746 c.arcTo(dx * 2, dx * 2, 0, 0, 1, w, 2 * dx); 1625 c.arcTo(dx * 2, dx * 2, 0, 0, 1, w, 2 * dx);
@@ -1751,7 +1630,7 @@ mxShapeBasicRoundedFrame.prototype.paintVertexShape = function(c, x, y, w, h) @@ -1751,7 +1630,7 @@ mxShapeBasicRoundedFrame.prototype.paintVertexShape = function(c, x, y, w, h)
1751 c.lineTo(0, 2 * dx); 1630 c.lineTo(0, 2 * dx);
1752 c.arcTo(dx * 2, dx * 2, 0, 0, 1, 2 * dx, 0); 1631 c.arcTo(dx * 2, dx * 2, 0, 0, 1, 2 * dx, 0);
1753 c.close(); 1632 c.close();
1754 - 1633 +
1755 c.moveTo(dx * 2, dx); 1634 c.moveTo(dx * 2, dx);
1756 c.arcTo(dx, dx, 0, 0, 0, dx, dx * 2); 1635 c.arcTo(dx, dx, 0, 0, 0, dx, dx * 2);
1757 c.lineTo(dx, h - 2 * dx); 1636 c.lineTo(dx, h - 2 * dx);
@@ -1770,23 +1649,19 @@ mxCellRenderer.registerShape(mxShapeBasicRoundedFrame.prototype.cst.ROUNDED_FRAM @@ -1770,23 +1649,19 @@ mxCellRenderer.registerShape(mxShapeBasicRoundedFrame.prototype.cst.ROUNDED_FRAM
1770 1649
1771 mxShapeBasicRoundedFrame.prototype.constraints = null; 1650 mxShapeBasicRoundedFrame.prototype.constraints = null;
1772 1651
1773 -Graph.handleFactory[mxShapeBasicRoundedFrame.prototype.cst.ROUNDED_FRAME] = function(state)  
1774 -{  
1775 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
1776 - { 1652 +Graph.handleFactory[mxShapeBasicRoundedFrame.prototype.cst.ROUNDED_FRAME] = function (state) {
  1653 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
1777 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 1654 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
1778 1655
1779 return new mxPoint(bounds.x + dx, bounds.y + dx); 1656 return new mxPoint(bounds.x + dx, bounds.y + dx);
1780 - }, function(bounds, pt)  
1781 - { 1657 + }, function (bounds, pt) {
1782 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100; 1658 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100;
1783 })]; 1659 })];
1784 - 1660 +
1785 return handles; 1661 return handles;
1786 }; 1662 };
1787 1663
1788 -mxShapeBasicRoundedFrame.prototype.getConstraints = function(style, w, h)  
1789 -{ 1664 +mxShapeBasicRoundedFrame.prototype.getConstraints = function (style, w, h) {
1790 var constr = []; 1665 var constr = [];
1791 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1666 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1792 dx = Math.min(w * 0.5, h * 0.5, dx); 1667 dx = Math.min(w * 0.5, h * 0.5, dx);
@@ -1809,8 +1684,7 @@ mxShapeBasicRoundedFrame.prototype.getConstraints = function(style, w, h) @@ -1809,8 +1684,7 @@ mxShapeBasicRoundedFrame.prototype.getConstraints = function(style, w, h)
1809 /** 1684 /**
1810 * Extends mxShape. 1685 * Extends mxShape.
1811 */ 1686 */
1812 -function mxShapeBasicFrameCorner(bounds, fill, stroke, strokewidth)  
1813 -{ 1687 +function mxShapeBasicFrameCorner(bounds, fill, stroke, strokewidth) {
1814 mxShape.call(this); 1688 mxShape.call(this);
1815 this.bounds = bounds; 1689 this.bounds = bounds;
1816 this.fill = fill; 1690 this.fill = fill;
@@ -1825,24 +1699,23 @@ function mxShapeBasicFrameCorner(bounds, fill, stroke, strokewidth) @@ -1825,24 +1699,23 @@ function mxShapeBasicFrameCorner(bounds, fill, stroke, strokewidth)
1825 mxUtils.extend(mxShapeBasicFrameCorner, mxActor); 1699 mxUtils.extend(mxShapeBasicFrameCorner, mxActor);
1826 1700
1827 mxShapeBasicFrameCorner.prototype.customProperties = [ 1701 mxShapeBasicFrameCorner.prototype.customProperties = [
1828 - {name: 'dx', dispName: 'Width', type: 'float', min:0, defVal:10}, 1702 + { name: 'dx', dispName: 'Width', type: 'float', min: 0, defVal: 10 },
1829 ]; 1703 ];
1830 1704
1831 -mxShapeBasicFrameCorner.prototype.cst = {FRAME_CORNER : 'mxgraph.basic.frame_corner'}; 1705 +mxShapeBasicFrameCorner.prototype.cst = { FRAME_CORNER: 'mxgraph.basic.frame_corner' };
1832 1706
1833 /** 1707 /**
1834 * Function: paintVertexShape 1708 * Function: paintVertexShape
1835 * 1709 *
1836 * Paints the vertex shape. 1710 * Paints the vertex shape.
1837 */ 1711 */
1838 -mxShapeBasicFrameCorner.prototype.paintVertexShape = function(c, x, y, w, h)  
1839 -{ 1712 +mxShapeBasicFrameCorner.prototype.paintVertexShape = function (c, x, y, w, h) {
1840 c.translate(x, y); 1713 c.translate(x, y);
1841 1714
1842 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1715 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1843 1716
1844 dx = Math.min(w * 0.5, h * 0.5, dx); 1717 dx = Math.min(w * 0.5, h * 0.5, dx);
1845 - 1718 +
1846 c.begin(); 1719 c.begin();
1847 c.moveTo(0, 0); 1720 c.moveTo(0, 0);
1848 c.lineTo(w, 0); 1721 c.lineTo(w, 0);
@@ -1858,28 +1731,24 @@ mxCellRenderer.registerShape(mxShapeBasicFrameCorner.prototype.cst.FRAME_CORNER, @@ -1858,28 +1731,24 @@ mxCellRenderer.registerShape(mxShapeBasicFrameCorner.prototype.cst.FRAME_CORNER,
1858 1731
1859 mxShapeBasicFrameCorner.prototype.constraints = null; 1732 mxShapeBasicFrameCorner.prototype.constraints = null;
1860 1733
1861 -Graph.handleFactory[mxShapeBasicFrameCorner.prototype.cst.FRAME_CORNER] = function(state)  
1862 -{  
1863 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
1864 - { 1734 +Graph.handleFactory[mxShapeBasicFrameCorner.prototype.cst.FRAME_CORNER] = function (state) {
  1735 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
1865 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 1736 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
1866 1737
1867 return new mxPoint(bounds.x + dx, bounds.y + dx); 1738 return new mxPoint(bounds.x + dx, bounds.y + dx);
1868 - }, function(bounds, pt)  
1869 - { 1739 + }, function (bounds, pt) {
1870 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100; 1740 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100;
1871 })]; 1741 })];
1872 - 1742 +
1873 return handles; 1743 return handles;
1874 }; 1744 };
1875 1745
1876 -mxShapeBasicFrameCorner.prototype.getConstraints = function(style, w, h)  
1877 -{ 1746 +mxShapeBasicFrameCorner.prototype.getConstraints = function (style, w, h) {
1878 var constr = []; 1747 var constr = [];
1879 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1748 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1880 1749
1881 dx = Math.min(w * 0.5, h * 0.5, dx); 1750 dx = Math.min(w * 0.5, h * 0.5, dx);
1882 - 1751 +
1883 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false)); 1752 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
1884 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false)); 1753 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
1885 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false)); 1754 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));
@@ -1900,8 +1769,7 @@ mxShapeBasicFrameCorner.prototype.getConstraints = function(style, w, h) @@ -1900,8 +1769,7 @@ mxShapeBasicFrameCorner.prototype.getConstraints = function(style, w, h)
1900 /** 1769 /**
1901 * Extends mxShape. 1770 * Extends mxShape.
1902 */ 1771 */
1903 -function mxShapeBasicDiagStripe(bounds, fill, stroke, strokewidth)  
1904 -{ 1772 +function mxShapeBasicDiagStripe(bounds, fill, stroke, strokewidth) {
1905 mxShape.call(this); 1773 mxShape.call(this);
1906 this.bounds = bounds; 1774 this.bounds = bounds;
1907 this.fill = fill; 1775 this.fill = fill;
@@ -1916,24 +1784,23 @@ function mxShapeBasicDiagStripe(bounds, fill, stroke, strokewidth) @@ -1916,24 +1784,23 @@ function mxShapeBasicDiagStripe(bounds, fill, stroke, strokewidth)
1916 mxUtils.extend(mxShapeBasicDiagStripe, mxActor); 1784 mxUtils.extend(mxShapeBasicDiagStripe, mxActor);
1917 1785
1918 mxShapeBasicDiagStripe.prototype.customProperties = [ 1786 mxShapeBasicDiagStripe.prototype.customProperties = [
1919 - {name: 'dx', dispName: 'Width', type: 'float', mix:0, defVal:10}, 1787 + { name: 'dx', dispName: 'Width', type: 'float', mix: 0, defVal: 10 },
1920 ]; 1788 ];
1921 1789
1922 -mxShapeBasicDiagStripe.prototype.cst = {DIAG_STRIPE : 'mxgraph.basic.diag_stripe'}; 1790 +mxShapeBasicDiagStripe.prototype.cst = { DIAG_STRIPE: 'mxgraph.basic.diag_stripe' };
1923 1791
1924 /** 1792 /**
1925 * Function: paintVertexShape 1793 * Function: paintVertexShape
1926 * 1794 *
1927 * Paints the vertex shape. 1795 * Paints the vertex shape.
1928 */ 1796 */
1929 -mxShapeBasicDiagStripe.prototype.paintVertexShape = function(c, x, y, w, h)  
1930 -{ 1797 +mxShapeBasicDiagStripe.prototype.paintVertexShape = function (c, x, y, w, h) {
1931 c.translate(x, y); 1798 c.translate(x, y);
1932 1799
1933 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1800 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1934 1801
1935 dx = Math.min(w, h, dx); 1802 dx = Math.min(w, h, dx);
1936 - 1803 +
1937 c.begin(); 1804 c.begin();
1938 c.moveTo(0, h); 1805 c.moveTo(0, h);
1939 c.lineTo(w, 0); 1806 c.lineTo(w, 0);
@@ -1947,27 +1814,23 @@ mxCellRenderer.registerShape(mxShapeBasicDiagStripe.prototype.cst.DIAG_STRIPE, m @@ -1947,27 +1814,23 @@ mxCellRenderer.registerShape(mxShapeBasicDiagStripe.prototype.cst.DIAG_STRIPE, m
1947 1814
1948 mxShapeBasicDiagStripe.prototype.constraints = null; 1815 mxShapeBasicDiagStripe.prototype.constraints = null;
1949 1816
1950 -Graph.handleFactory[mxShapeBasicDiagStripe.prototype.cst.DIAG_STRIPE] = function(state)  
1951 -{  
1952 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
1953 - { 1817 +Graph.handleFactory[mxShapeBasicDiagStripe.prototype.cst.DIAG_STRIPE] = function (state) {
  1818 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
1954 var dx = Math.max(0, Math.min(bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 1819 var dx = Math.max(0, Math.min(bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
1955 1820
1956 return new mxPoint(bounds.x + dx, bounds.y + bounds.height); 1821 return new mxPoint(bounds.x + dx, bounds.y + bounds.height);
1957 - }, function(bounds, pt)  
1958 - { 1822 + }, function (bounds, pt) {
1959 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100; 1823 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100;
1960 })]; 1824 })];
1961 - 1825 +
1962 return handles; 1826 return handles;
1963 }; 1827 };
1964 1828
1965 -mxShapeBasicDiagStripe.prototype.getConstraints = function(style, w, h)  
1966 -{ 1829 +mxShapeBasicDiagStripe.prototype.getConstraints = function (style, w, h) {
1967 var constr = []; 1830 var constr = [];
1968 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1831 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1969 dx = Math.min(w, h, dx); 1832 dx = Math.min(w, h, dx);
1970 - 1833 +
1971 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false)); 1834 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));
1972 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)); 1835 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.5), false));
1973 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false)); 1836 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));
@@ -1986,8 +1849,7 @@ mxShapeBasicDiagStripe.prototype.getConstraints = function(style, w, h) @@ -1986,8 +1849,7 @@ mxShapeBasicDiagStripe.prototype.getConstraints = function(style, w, h)
1986 /** 1849 /**
1987 * Extends mxShape. 1850 * Extends mxShape.
1988 */ 1851 */
1989 -function mxShapeBasicDonut(bounds, fill, stroke, strokewidth)  
1990 -{ 1852 +function mxShapeBasicDonut(bounds, fill, stroke, strokewidth) {
1991 mxShape.call(this); 1853 mxShape.call(this);
1992 this.bounds = bounds; 1854 this.bounds = bounds;
1993 this.fill = fill; 1855 this.fill = fill;
@@ -2002,24 +1864,23 @@ function mxShapeBasicDonut(bounds, fill, stroke, strokewidth) @@ -2002,24 +1864,23 @@ function mxShapeBasicDonut(bounds, fill, stroke, strokewidth)
2002 mxUtils.extend(mxShapeBasicDonut, mxActor); 1864 mxUtils.extend(mxShapeBasicDonut, mxActor);
2003 1865
2004 mxShapeBasicDonut.prototype.customProperties = [ 1866 mxShapeBasicDonut.prototype.customProperties = [
2005 - {name: 'dx', dispName: 'Width', type: 'float', min:0, defVal:25} 1867 + { name: 'dx', dispName: 'Width', type: 'float', min: 0, defVal: 25 }
2006 ]; 1868 ];
2007 1869
2008 -mxShapeBasicDonut.prototype.cst = {DONUT : 'mxgraph.basic.donut'}; 1870 +mxShapeBasicDonut.prototype.cst = { DONUT: 'mxgraph.basic.donut' };
2009 1871
2010 /** 1872 /**
2011 * Function: paintVertexShape 1873 * Function: paintVertexShape
2012 * 1874 *
2013 * Paints the vertex shape. 1875 * Paints the vertex shape.
2014 */ 1876 */
2015 -mxShapeBasicDonut.prototype.paintVertexShape = function(c, x, y, w, h)  
2016 -{ 1877 +mxShapeBasicDonut.prototype.paintVertexShape = function (c, x, y, w, h) {
2017 c.translate(x, y); 1878 c.translate(x, y);
2018 1879
2019 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1880 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
2020 1881
2021 dx = Math.min(w * 0.5, h * 0.5, dx); 1882 dx = Math.min(w * 0.5, h * 0.5, dx);
2022 - 1883 +
2023 c.begin(); 1884 c.begin();
2024 c.moveTo(0, h * 0.5); 1885 c.moveTo(0, h * 0.5);
2025 c.arcTo(w * 0.5, h * 0.5, 0, 0, 1, w * 0.5, 0); 1886 c.arcTo(w * 0.5, h * 0.5, 0, 0, 1, w * 0.5, 0);
@@ -2040,18 +1901,15 @@ mxCellRenderer.registerShape(mxShapeBasicDonut.prototype.cst.DONUT, mxShapeBasic @@ -2040,18 +1901,15 @@ mxCellRenderer.registerShape(mxShapeBasicDonut.prototype.cst.DONUT, mxShapeBasic
2040 1901
2041 mxShapeBasicDonut.prototype.constraints = null; 1902 mxShapeBasicDonut.prototype.constraints = null;
2042 1903
2043 -Graph.handleFactory[mxShapeBasicDonut.prototype.cst.DONUT] = function(state)  
2044 -{  
2045 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
2046 - { 1904 +Graph.handleFactory[mxShapeBasicDonut.prototype.cst.DONUT] = function (state) {
  1905 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
2047 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 1906 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
2048 1907
2049 return new mxPoint(bounds.x + dx, bounds.y + bounds.height / 2); 1908 return new mxPoint(bounds.x + dx, bounds.y + bounds.height / 2);
2050 - }, function(bounds, pt)  
2051 - { 1909 + }, function (bounds, pt) {
2052 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100; 1910 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100;
2053 })]; 1911 })];
2054 - 1912 +
2055 return handles; 1913 return handles;
2056 }; 1914 };
2057 1915
@@ -2061,8 +1919,7 @@ Graph.handleFactory[mxShapeBasicDonut.prototype.cst.DONUT] = function(state) @@ -2061,8 +1919,7 @@ Graph.handleFactory[mxShapeBasicDonut.prototype.cst.DONUT] = function(state)
2061 /** 1919 /**
2062 * Extends mxShape. 1920 * Extends mxShape.
2063 */ 1921 */
2064 -function mxShapeBasicLayeredRect(bounds, fill, stroke, strokewidth)  
2065 -{ 1922 +function mxShapeBasicLayeredRect(bounds, fill, stroke, strokewidth) {
2066 mxShape.call(this); 1923 mxShape.call(this);
2067 this.bounds = bounds; 1924 this.bounds = bounds;
2068 this.fill = fill; 1925 this.fill = fill;
@@ -2077,24 +1934,23 @@ function mxShapeBasicLayeredRect(bounds, fill, stroke, strokewidth) @@ -2077,24 +1934,23 @@ function mxShapeBasicLayeredRect(bounds, fill, stroke, strokewidth)
2077 mxUtils.extend(mxShapeBasicLayeredRect, mxActor); 1934 mxUtils.extend(mxShapeBasicLayeredRect, mxActor);
2078 1935
2079 mxShapeBasicLayeredRect.prototype.customProperties = [ 1936 mxShapeBasicLayeredRect.prototype.customProperties = [
2080 - {name: 'dx', dispName: 'Layer Distance', type: 'float', mix:0, defVal:10} 1937 + { name: 'dx', dispName: 'Layer Distance', type: 'float', mix: 0, defVal: 10 }
2081 ]; 1938 ];
2082 1939
2083 -mxShapeBasicLayeredRect.prototype.cst = {LAYERED_RECT : 'mxgraph.basic.layered_rect'}; 1940 +mxShapeBasicLayeredRect.prototype.cst = { LAYERED_RECT: 'mxgraph.basic.layered_rect' };
2084 1941
2085 /** 1942 /**
2086 * Function: paintVertexShape 1943 * Function: paintVertexShape
2087 * 1944 *
2088 * Paints the vertex shape. 1945 * Paints the vertex shape.
2089 */ 1946 */
2090 -mxShapeBasicLayeredRect.prototype.paintVertexShape = function(c, x, y, w, h)  
2091 -{ 1947 +mxShapeBasicLayeredRect.prototype.paintVertexShape = function (c, x, y, w, h) {
2092 c.translate(x, y); 1948 c.translate(x, y);
2093 1949
2094 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1950 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
2095 1951
2096 dx = Math.min(w * 0.5, h * 0.5, dx); 1952 dx = Math.min(w * 0.5, h * 0.5, dx);
2097 - 1953 +
2098 c.begin(); 1954 c.begin();
2099 c.moveTo(dx, dx); 1955 c.moveTo(dx, dx);
2100 c.lineTo(w, dx); 1956 c.lineTo(w, dx);
@@ -2102,7 +1958,7 @@ mxShapeBasicLayeredRect.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2102,7 +1958,7 @@ mxShapeBasicLayeredRect.prototype.paintVertexShape = function(c, x, y, w, h)
2102 c.lineTo(dx, h); 1958 c.lineTo(dx, h);
2103 c.close(); 1959 c.close();
2104 c.fillAndStroke(); 1960 c.fillAndStroke();
2105 - 1961 +
2106 c.begin(); 1962 c.begin();
2107 c.moveTo(dx * 0.5, dx * 0.5); 1963 c.moveTo(dx * 0.5, dx * 0.5);
2108 c.lineTo(w - dx * 0.5, dx * 0.5); 1964 c.lineTo(w - dx * 0.5, dx * 0.5);
@@ -2110,7 +1966,7 @@ mxShapeBasicLayeredRect.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2110,7 +1966,7 @@ mxShapeBasicLayeredRect.prototype.paintVertexShape = function(c, x, y, w, h)
2110 c.lineTo(dx * 0.5, h - dx * 0.5); 1966 c.lineTo(dx * 0.5, h - dx * 0.5);
2111 c.close(); 1967 c.close();
2112 c.fillAndStroke(); 1968 c.fillAndStroke();
2113 - 1969 +
2114 c.begin(); 1970 c.begin();
2115 c.moveTo(0, 0); 1971 c.moveTo(0, 0);
2116 c.lineTo(w - dx, 0); 1972 c.lineTo(w - dx, 0);
@@ -2124,27 +1980,23 @@ mxCellRenderer.registerShape(mxShapeBasicLayeredRect.prototype.cst.LAYERED_RECT, @@ -2124,27 +1980,23 @@ mxCellRenderer.registerShape(mxShapeBasicLayeredRect.prototype.cst.LAYERED_RECT,
2124 1980
2125 mxShapeBasicLayeredRect.prototype.constraints = null; 1981 mxShapeBasicLayeredRect.prototype.constraints = null;
2126 1982
2127 -Graph.handleFactory[mxShapeBasicLayeredRect.prototype.cst.LAYERED_RECT] = function(state)  
2128 -{  
2129 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
2130 - { 1983 +Graph.handleFactory[mxShapeBasicLayeredRect.prototype.cst.LAYERED_RECT] = function (state) {
  1984 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
2131 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 1985 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
2132 1986
2133 return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height - dx); 1987 return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height - dx);
2134 - }, function(bounds, pt)  
2135 - { 1988 + }, function (bounds, pt) {
2136 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, - pt.x + bounds.width + bounds.x))) / 100; 1989 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, - pt.x + bounds.width + bounds.x))) / 100;
2137 })]; 1990 })];
2138 - 1991 +
2139 return handles; 1992 return handles;
2140 }; 1993 };
2141 1994
2142 -mxShapeBasicLayeredRect.prototype.getConstraints = function(style, w, h)  
2143 -{ 1995 +mxShapeBasicLayeredRect.prototype.getConstraints = function (style, w, h) {
2144 var constr = []; 1996 var constr = [];
2145 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 1997 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
2146 dx = Math.min(w * 0.5, h * 0.5, dx); 1998 dx = Math.min(w * 0.5, h * 0.5, dx);
2147 - 1999 +
2148 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false)); 2000 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
2149 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.25, 0)); 2001 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.25, 0));
2150 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, 0)); 2002 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, 0));
@@ -2175,8 +2027,7 @@ mxShapeBasicLayeredRect.prototype.getConstraints = function(style, w, h) @@ -2175,8 +2027,7 @@ mxShapeBasicLayeredRect.prototype.getConstraints = function(style, w, h)
2175 /** 2027 /**
2176 * Extends mxShape. 2028 * Extends mxShape.
2177 */ 2029 */
2178 -function mxShapeBasicButton(bounds, fill, stroke, strokewidth)  
2179 -{ 2030 +function mxShapeBasicButton(bounds, fill, stroke, strokewidth) {
2180 mxShape.call(this); 2031 mxShape.call(this);
2181 this.bounds = bounds; 2032 this.bounds = bounds;
2182 this.fill = fill; 2033 this.fill = fill;
@@ -2191,24 +2042,23 @@ function mxShapeBasicButton(bounds, fill, stroke, strokewidth) @@ -2191,24 +2042,23 @@ function mxShapeBasicButton(bounds, fill, stroke, strokewidth)
2191 mxUtils.extend(mxShapeBasicButton, mxActor); 2042 mxUtils.extend(mxShapeBasicButton, mxActor);
2192 2043
2193 mxShapeBasicButton.prototype.customProperties = [ 2044 mxShapeBasicButton.prototype.customProperties = [
2194 - {name: 'dx', dispName: 'Button Height', type: 'float', min:0, defVal:10} 2045 + { name: 'dx', dispName: 'Button Height', type: 'float', min: 0, defVal: 10 }
2195 ]; 2046 ];
2196 2047
2197 -mxShapeBasicButton.prototype.cst = {BUTTON : 'mxgraph.basic.button'}; 2048 +mxShapeBasicButton.prototype.cst = { BUTTON: 'mxgraph.basic.button' };
2198 2049
2199 /** 2050 /**
2200 * Function: paintVertexShape 2051 * Function: paintVertexShape
2201 * 2052 *
2202 * Paints the vertex shape. 2053 * Paints the vertex shape.
2203 */ 2054 */
2204 -mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)  
2205 -{ 2055 +mxShapeBasicButton.prototype.paintVertexShape = function (c, x, y, w, h) {
2206 c.translate(x, y); 2056 c.translate(x, y);
2207 2057
2208 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 2058 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
2209 2059
2210 dx = Math.min(w * 0.5, h * 0.5, dx); 2060 dx = Math.min(w * 0.5, h * 0.5, dx);
2211 - 2061 +
2212 c.begin(); 2062 c.begin();
2213 c.moveTo(0, 0); 2063 c.moveTo(0, 0);
2214 c.lineTo(w, 0); 2064 c.lineTo(w, 0);
@@ -2216,10 +2066,10 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2216,10 +2066,10 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)
2216 c.lineTo(0, h); 2066 c.lineTo(0, h);
2217 c.close(); 2067 c.close();
2218 c.fillAndStroke(); 2068 c.fillAndStroke();
2219 - 2069 +
2220 c.setShadow(false); 2070 c.setShadow(false);
2221 c.setLineJoin('round'); 2071 c.setLineJoin('round');
2222 - 2072 +
2223 c.begin(); 2073 c.begin();
2224 c.moveTo(0, h); 2074 c.moveTo(0, h);
2225 c.lineTo(0, 0); 2075 c.lineTo(0, 0);
@@ -2227,7 +2077,7 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2227,7 +2077,7 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)
2227 c.lineTo(dx, h - dx); 2077 c.lineTo(dx, h - dx);
2228 c.close(); 2078 c.close();
2229 c.fillAndStroke(); 2079 c.fillAndStroke();
2230 - 2080 +
2231 c.begin(); 2081 c.begin();
2232 c.moveTo(0, 0); 2082 c.moveTo(0, 0);
2233 c.lineTo(w, 0); 2083 c.lineTo(w, 0);
@@ -2235,7 +2085,7 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2235,7 +2085,7 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)
2235 c.lineTo(dx, dx); 2085 c.lineTo(dx, dx);
2236 c.close(); 2086 c.close();
2237 c.fillAndStroke(); 2087 c.fillAndStroke();
2238 - 2088 +
2239 c.begin(); 2089 c.begin();
2240 c.moveTo(w, 0); 2090 c.moveTo(w, 0);
2241 c.lineTo(w, h); 2091 c.lineTo(w, h);
@@ -2243,7 +2093,7 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2243,7 +2093,7 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)
2243 c.lineTo(w - dx, dx); 2093 c.lineTo(w - dx, dx);
2244 c.close(); 2094 c.close();
2245 c.fillAndStroke(); 2095 c.fillAndStroke();
2246 - 2096 +
2247 c.begin(); 2097 c.begin();
2248 c.moveTo(0, h); 2098 c.moveTo(0, h);
2249 c.lineTo(dx, h - dx); 2099 c.lineTo(dx, h - dx);
@@ -2251,7 +2101,7 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2251,7 +2101,7 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)
2251 c.lineTo(w, h); 2101 c.lineTo(w, h);
2252 c.close(); 2102 c.close();
2253 c.fillAndStroke(); 2103 c.fillAndStroke();
2254 - 2104 +
2255 c.begin(); 2105 c.begin();
2256 c.moveTo(0, h); 2106 c.moveTo(0, h);
2257 c.lineTo(0, 0); 2107 c.lineTo(0, 0);
@@ -2259,26 +2109,23 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2259,26 +2109,23 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)
2259 c.lineTo(dx, h - dx); 2109 c.lineTo(dx, h - dx);
2260 c.close(); 2110 c.close();
2261 c.fillAndStroke(); 2111 c.fillAndStroke();
2262 -  
2263 - 2112 +
  2113 +
2264 }; 2114 };
2265 2115
2266 mxCellRenderer.registerShape(mxShapeBasicButton.prototype.cst.BUTTON, mxShapeBasicButton); 2116 mxCellRenderer.registerShape(mxShapeBasicButton.prototype.cst.BUTTON, mxShapeBasicButton);
2267 2117
2268 mxShapeBasicButton.prototype.constraints = null; 2118 mxShapeBasicButton.prototype.constraints = null;
2269 2119
2270 -Graph.handleFactory[mxShapeBasicButton.prototype.cst.BUTTON] = function(state)  
2271 -{  
2272 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
2273 - { 2120 +Graph.handleFactory[mxShapeBasicButton.prototype.cst.BUTTON] = function (state) {
  2121 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
2274 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 2122 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
2275 2123
2276 return new mxPoint(bounds.x + dx, bounds.y + dx); 2124 return new mxPoint(bounds.x + dx, bounds.y + dx);
2277 - }, function(bounds, pt)  
2278 - { 2125 + }, function (bounds, pt) {
2279 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100; 2126 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100;
2280 })]; 2127 })];
2281 - 2128 +
2282 return handles; 2129 return handles;
2283 }; 2130 };
2284 2131
@@ -2288,8 +2135,7 @@ Graph.handleFactory[mxShapeBasicButton.prototype.cst.BUTTON] = function(state) @@ -2288,8 +2135,7 @@ Graph.handleFactory[mxShapeBasicButton.prototype.cst.BUTTON] = function(state)
2288 /** 2135 /**
2289 * Extends mxShape. 2136 * Extends mxShape.
2290 */ 2137 */
2291 -function mxShapeBasicShadedButton(bounds, fill, stroke, strokewidth)  
2292 -{ 2138 +function mxShapeBasicShadedButton(bounds, fill, stroke, strokewidth) {
2293 mxShape.call(this); 2139 mxShape.call(this);
2294 this.bounds = bounds; 2140 this.bounds = bounds;
2295 this.fill = fill; 2141 this.fill = fill;
@@ -2304,26 +2150,25 @@ function mxShapeBasicShadedButton(bounds, fill, stroke, strokewidth) @@ -2304,26 +2150,25 @@ function mxShapeBasicShadedButton(bounds, fill, stroke, strokewidth)
2304 mxUtils.extend(mxShapeBasicShadedButton, mxActor); 2150 mxUtils.extend(mxShapeBasicShadedButton, mxActor);
2305 2151
2306 mxShapeBasicShadedButton.prototype.customProperties = [ 2152 mxShapeBasicShadedButton.prototype.customProperties = [
2307 - {name: 'dx', dispName: 'Button Height', type: 'float', min:0, defVal:10} 2153 + { name: 'dx', dispName: 'Button Height', type: 'float', min: 0, defVal: 10 }
2308 ]; 2154 ];
2309 2155
2310 -mxShapeBasicShadedButton.prototype.cst = {SHADED_BUTTON : 'mxgraph.basic.shaded_button'}; 2156 +mxShapeBasicShadedButton.prototype.cst = { SHADED_BUTTON: 'mxgraph.basic.shaded_button' };
2311 2157
2312 /** 2158 /**
2313 * Function: paintVertexShape 2159 * Function: paintVertexShape
2314 * 2160 *
2315 * Paints the vertex shape. 2161 * Paints the vertex shape.
2316 */ 2162 */
2317 -mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h)  
2318 -{ 2163 +mxShapeBasicShadedButton.prototype.paintVertexShape = function (c, x, y, w, h) {
2319 c.translate(x, y); 2164 c.translate(x, y);
2320 - 2165 +
2321 c.setShadow(false); 2166 c.setShadow(false);
2322 2167
2323 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))); 2168 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
2324 2169
2325 dx = Math.min(w * 0.5, h * 0.5, dx); 2170 dx = Math.min(w * 0.5, h * 0.5, dx);
2326 - 2171 +
2327 c.begin(); 2172 c.begin();
2328 c.moveTo(0, 0); 2173 c.moveTo(0, 0);
2329 c.lineTo(w, 0); 2174 c.lineTo(w, 0);
@@ -2331,7 +2176,7 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2331,7 +2176,7 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h)
2331 c.lineTo(0, h); 2176 c.lineTo(0, h);
2332 c.close(); 2177 c.close();
2333 c.fill(); 2178 c.fill();
2334 - 2179 +
2335 c.setFillColor('#ffffff'); 2180 c.setFillColor('#ffffff');
2336 c.setAlpha(0.25); 2181 c.setAlpha(0.25);
2337 c.begin(); 2182 c.begin();
@@ -2341,7 +2186,7 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2341,7 +2186,7 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h)
2341 c.lineTo(dx, h - dx); 2186 c.lineTo(dx, h - dx);
2342 c.close(); 2187 c.close();
2343 c.fill(); 2188 c.fill();
2344 - 2189 +
2345 c.setAlpha(0.5); 2190 c.setAlpha(0.5);
2346 c.begin(); 2191 c.begin();
2347 c.moveTo(0, 0); 2192 c.moveTo(0, 0);
@@ -2350,7 +2195,7 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2350,7 +2195,7 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h)
2350 c.lineTo(dx, dx); 2195 c.lineTo(dx, dx);
2351 c.close(); 2196 c.close();
2352 c.fill(); 2197 c.fill();
2353 - 2198 +
2354 c.setFillColor('#000000'); 2199 c.setFillColor('#000000');
2355 c.setAlpha(0.25); 2200 c.setAlpha(0.25);
2356 c.begin(); 2201 c.begin();
@@ -2360,7 +2205,7 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2360,7 +2205,7 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h)
2360 c.lineTo(w - dx, dx); 2205 c.lineTo(w - dx, dx);
2361 c.close(); 2206 c.close();
2362 c.fill(); 2207 c.fill();
2363 - 2208 +
2364 c.setAlpha(0.5); 2209 c.setAlpha(0.5);
2365 c.begin(); 2210 c.begin();
2366 c.moveTo(0, h); 2211 c.moveTo(0, h);
@@ -2369,26 +2214,23 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2369,26 +2214,23 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h)
2369 c.lineTo(w, h); 2214 c.lineTo(w, h);
2370 c.close(); 2215 c.close();
2371 c.fill(); 2216 c.fill();
2372 -  
2373 - 2217 +
  2218 +
2374 }; 2219 };
2375 2220
2376 mxCellRenderer.registerShape(mxShapeBasicShadedButton.prototype.cst.SHADED_BUTTON, mxShapeBasicShadedButton); 2221 mxCellRenderer.registerShape(mxShapeBasicShadedButton.prototype.cst.SHADED_BUTTON, mxShapeBasicShadedButton);
2377 2222
2378 mxShapeBasicShadedButton.prototype.constraints = null; 2223 mxShapeBasicShadedButton.prototype.constraints = null;
2379 2224
2380 -Graph.handleFactory[mxShapeBasicShadedButton.prototype.cst.SHADED_BUTTON] = function(state)  
2381 -{  
2382 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
2383 - { 2225 +Graph.handleFactory[mxShapeBasicShadedButton.prototype.cst.SHADED_BUTTON] = function (state) {
  2226 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
2384 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 2227 var dx = Math.max(0, Math.min(bounds.width / 2, bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
2385 2228
2386 return new mxPoint(bounds.x + dx, bounds.y + dx); 2229 return new mxPoint(bounds.x + dx, bounds.y + dx);
2387 - }, function(bounds, pt)  
2388 - { 2230 + }, function (bounds, pt) {
2389 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100; 2231 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, pt.x - bounds.x))) / 100;
2390 })]; 2232 })];
2391 - 2233 +
2392 return handles; 2234 return handles;
2393 }; 2235 };
2394 2236
@@ -2398,8 +2240,7 @@ Graph.handleFactory[mxShapeBasicShadedButton.prototype.cst.SHADED_BUTTON] = func @@ -2398,8 +2240,7 @@ Graph.handleFactory[mxShapeBasicShadedButton.prototype.cst.SHADED_BUTTON] = func
2398 /** 2240 /**
2399 * Extends mxShape. 2241 * Extends mxShape.
2400 */ 2242 */
2401 -function mxShapeBasicPie(bounds, fill, stroke, strokewidth)  
2402 -{ 2243 +function mxShapeBasicPie(bounds, fill, stroke, strokewidth) {
2403 mxShape.call(this); 2244 mxShape.call(this);
2404 this.bounds = bounds; 2245 this.bounds = bounds;
2405 this.fill = fill; 2246 this.fill = fill;
@@ -2415,19 +2256,18 @@ function mxShapeBasicPie(bounds, fill, stroke, strokewidth) @@ -2415,19 +2256,18 @@ function mxShapeBasicPie(bounds, fill, stroke, strokewidth)
2415 mxUtils.extend(mxShapeBasicPie, mxActor); 2256 mxUtils.extend(mxShapeBasicPie, mxActor);
2416 2257
2417 mxShapeBasicPie.prototype.customProperties = [ 2258 mxShapeBasicPie.prototype.customProperties = [
2418 - {name: 'startAngle', dispName: 'Start Angle', type: 'float', min:0, max:1, defVal: 0.2},  
2419 - {name: 'endAngle', dispName: 'End Angle', type: 'float', min:0, max:1, defVal: 0.9} 2259 + { name: 'startAngle', dispName: 'Start Angle', type: 'float', min: 0, max: 1, defVal: 0.2 },
  2260 + { name: 'endAngle', dispName: 'End Angle', type: 'float', min: 0, max: 1, defVal: 0.9 }
2420 ]; 2261 ];
2421 2262
2422 -mxShapeBasicPie.prototype.cst = {PIE : 'mxgraph.basic.pie'}; 2263 +mxShapeBasicPie.prototype.cst = { PIE: 'mxgraph.basic.pie' };
2423 2264
2424 /** 2265 /**
2425 * Function: paintVertexShape 2266 * Function: paintVertexShape
2426 * 2267 *
2427 * Paints the vertex shape. 2268 * Paints the vertex shape.
2428 */ 2269 */
2429 -mxShapeBasicPie.prototype.paintVertexShape = function(c, x, y, w, h)  
2430 -{ 2270 +mxShapeBasicPie.prototype.paintVertexShape = function (c, x, y, w, h) {
2431 c.translate(x, y); 2271 c.translate(x, y);
2432 var startAngleSource = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'startAngle', this.startAngle)))); 2272 var startAngleSource = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'startAngle', this.startAngle))));
2433 var endAngleSource = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'endAngle', this.endAngle)))); 2273 var endAngleSource = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'endAngle', this.endAngle))));
@@ -2435,51 +2275,46 @@ mxShapeBasicPie.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2435,51 +2275,46 @@ mxShapeBasicPie.prototype.paintVertexShape = function(c, x, y, w, h)
2435 var endAngle = 2 * Math.PI * endAngleSource; 2275 var endAngle = 2 * Math.PI * endAngleSource;
2436 var rx = w * 0.5; 2276 var rx = w * 0.5;
2437 var ry = h * 0.5; 2277 var ry = h * 0.5;
2438 - 2278 +
2439 var startX = rx + Math.sin(startAngle) * rx; 2279 var startX = rx + Math.sin(startAngle) * rx;
2440 var startY = ry - Math.cos(startAngle) * ry; 2280 var startY = ry - Math.cos(startAngle) * ry;
2441 var endX = rx + Math.sin(endAngle) * rx; 2281 var endX = rx + Math.sin(endAngle) * rx;
2442 var endY = ry - Math.cos(endAngle) * ry; 2282 var endY = ry - Math.cos(endAngle) * ry;
2443 - 2283 +
2444 var angDiff = endAngle - startAngle; 2284 var angDiff = endAngle - startAngle;
2445 -  
2446 - if (angDiff < 0)  
2447 - { 2285 +
  2286 + if (angDiff < 0) {
2448 angDiff = angDiff + Math.PI * 2; 2287 angDiff = angDiff + Math.PI * 2;
2449 } 2288 }
2450 - 2289 +
2451 var bigArc = 0; 2290 var bigArc = 0;
2452 -  
2453 - if (angDiff >= Math.PI)  
2454 - { 2291 +
  2292 + if (angDiff >= Math.PI) {
2455 bigArc = 1; 2293 bigArc = 1;
2456 } 2294 }
2457 - 2295 +
2458 c.begin(); 2296 c.begin();
2459 var startAngleDiff = startAngleSource % 1; 2297 var startAngleDiff = startAngleSource % 1;
2460 var endAngleDiff = endAngleSource % 1; 2298 var endAngleDiff = endAngleSource % 1;
2461 -  
2462 - if (startAngleDiff == 0 && endAngleDiff == 0.5)  
2463 - { 2299 +
  2300 + if (startAngleDiff == 0 && endAngleDiff == 0.5) {
2464 c.moveTo(rx, ry); 2301 c.moveTo(rx, ry);
2465 c.lineTo(startX, startY); 2302 c.lineTo(startX, startY);
2466 c.arcTo(rx, ry, 0, 0, 1, w, h * 0.5); 2303 c.arcTo(rx, ry, 0, 0, 1, w, h * 0.5);
2467 c.arcTo(rx, ry, 0, 0, 1, w * 0.5, h); 2304 c.arcTo(rx, ry, 0, 0, 1, w * 0.5, h);
2468 } 2305 }
2469 - else if (startAngleDiff == 0.5 && endAngleDiff == 0)  
2470 - { 2306 + else if (startAngleDiff == 0.5 && endAngleDiff == 0) {
2471 c.moveTo(rx, ry); 2307 c.moveTo(rx, ry);
2472 c.lineTo(startX, startY); 2308 c.lineTo(startX, startY);
2473 c.arcTo(rx, ry, 0, 0, 1, 0, h * 0.5); 2309 c.arcTo(rx, ry, 0, 0, 1, 0, h * 0.5);
2474 c.arcTo(rx, ry, 0, 0, 1, w * 0.5, 0); 2310 c.arcTo(rx, ry, 0, 0, 1, w * 0.5, 0);
2475 } 2311 }
2476 - else  
2477 - { 2312 + else {
2478 c.moveTo(rx, ry); 2313 c.moveTo(rx, ry);
2479 c.lineTo(startX, startY); 2314 c.lineTo(startX, startY);
2480 c.arcTo(rx, ry, 0, bigArc, 1, endX, endY); 2315 c.arcTo(rx, ry, 0, bigArc, 1, endX, endY);
2481 } 2316 }
2482 - 2317 +
2483 c.close(); 2318 c.close();
2484 c.fillAndStroke(); 2319 c.fillAndStroke();
2485 }; 2320 };
@@ -2488,51 +2323,44 @@ mxCellRenderer.registerShape(mxShapeBasicPie.prototype.cst.PIE, mxShapeBasicPie) @@ -2488,51 +2323,44 @@ mxCellRenderer.registerShape(mxShapeBasicPie.prototype.cst.PIE, mxShapeBasicPie)
2488 2323
2489 mxShapeBasicPie.prototype.constraints = null; 2324 mxShapeBasicPie.prototype.constraints = null;
2490 2325
2491 -Graph.handleFactory[mxShapeBasicPie.prototype.cst.PIE] = function(state)  
2492 -{  
2493 - var handles = [Graph.createHandle(state, ['startAngle'], function(bounds)  
2494 - { 2326 +Graph.handleFactory[mxShapeBasicPie.prototype.cst.PIE] = function (state) {
  2327 + var handles = [Graph.createHandle(state, ['startAngle'], function (bounds) {
2495 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'startAngle', this.startAngle)))); 2328 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'startAngle', this.startAngle))));
2496 2329
2497 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(startAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(startAngle) * bounds.height * 0.5); 2330 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(startAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(startAngle) * bounds.height * 0.5);
2498 - }, function(bounds, pt)  
2499 - { 2331 + }, function (bounds, pt) {
2500 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100; 2332 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100;
2501 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100; 2333 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100;
2502 -  
2503 - var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;  
2504 -  
2505 - if (res < 0)  
2506 - { 2334 +
  2335 + var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;
  2336 +
  2337 + if (res < 0) {
2507 res = 1 + res; 2338 res = 1 + res;
2508 } 2339 }
2509 2340
2510 this.state.style['startAngle'] = res; 2341 this.state.style['startAngle'] = res;
2511 - 2342 +
2512 })]; 2343 })];
2513 2344
2514 - var handle2 = Graph.createHandle(state, ['endAngle'], function(bounds)  
2515 - { 2345 + var handle2 = Graph.createHandle(state, ['endAngle'], function (bounds) {
2516 var endAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'endAngle', this.endAngle)))); 2346 var endAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'endAngle', this.endAngle))));
2517 2347
2518 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(endAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(endAngle) * bounds.height * 0.5); 2348 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(endAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(endAngle) * bounds.height * 0.5);
2519 - }, function(bounds, pt)  
2520 - { 2349 + }, function (bounds, pt) {
2521 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100; 2350 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100;
2522 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100; 2351 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100;
2523 -  
2524 - var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;  
2525 -  
2526 - if (res < 0)  
2527 - { 2352 +
  2353 + var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;
  2354 +
  2355 + if (res < 0) {
2528 res = 1 + res; 2356 res = 1 + res;
2529 } 2357 }
2530 - 2358 +
2531 this.state.style['endAngle'] = res; 2359 this.state.style['endAngle'] = res;
2532 }); 2360 });
2533 - 2361 +
2534 handles.push(handle2); 2362 handles.push(handle2);
2535 - 2363 +
2536 return handles; 2364 return handles;
2537 }; 2365 };
2538 2366
@@ -2542,8 +2370,7 @@ Graph.handleFactory[mxShapeBasicPie.prototype.cst.PIE] = function(state) @@ -2542,8 +2370,7 @@ Graph.handleFactory[mxShapeBasicPie.prototype.cst.PIE] = function(state)
2542 /** 2370 /**
2543 * Extends mxShape. 2371 * Extends mxShape.
2544 */ 2372 */
2545 -function mxShapeBasicArc(bounds, fill, stroke, strokewidth)  
2546 -{ 2373 +function mxShapeBasicArc(bounds, fill, stroke, strokewidth) {
2547 mxShape.call(this); 2374 mxShape.call(this);
2548 this.bounds = bounds; 2375 this.bounds = bounds;
2549 this.fill = fill; 2376 this.fill = fill;
@@ -2559,19 +2386,18 @@ function mxShapeBasicArc(bounds, fill, stroke, strokewidth) @@ -2559,19 +2386,18 @@ function mxShapeBasicArc(bounds, fill, stroke, strokewidth)
2559 mxUtils.extend(mxShapeBasicArc, mxActor); 2386 mxUtils.extend(mxShapeBasicArc, mxActor);
2560 2387
2561 mxShapeBasicArc.prototype.customProperties = [ 2388 mxShapeBasicArc.prototype.customProperties = [
2562 - {name: 'startAngle', dispName: 'Start Angle', type: 'float', min:0, max:1, defVal: 0.3},  
2563 - {name: 'endAngle', dispName: 'End Angle', type: 'float', min:0, max:1, defVal:0.1} 2389 + { name: 'startAngle', dispName: 'Start Angle', type: 'float', min: 0, max: 1, defVal: 0.3 },
  2390 + { name: 'endAngle', dispName: 'End Angle', type: 'float', min: 0, max: 1, defVal: 0.1 }
2564 ]; 2391 ];
2565 2392
2566 -mxShapeBasicArc.prototype.cst = {ARC : 'mxgraph.basic.arc'}; 2393 +mxShapeBasicArc.prototype.cst = { ARC: 'mxgraph.basic.arc' };
2567 2394
2568 /** 2395 /**
2569 * Function: paintVertexShape 2396 * Function: paintVertexShape
2570 * 2397 *
2571 * Paints the vertex shape. 2398 * Paints the vertex shape.
2572 */ 2399 */
2573 -mxShapeBasicArc.prototype.paintVertexShape = function(c, x, y, w, h)  
2574 -{ 2400 +mxShapeBasicArc.prototype.paintVertexShape = function (c, x, y, w, h) {
2575 c.translate(x, y); 2401 c.translate(x, y);
2576 2402
2577 var startAngleSource = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'startAngle', this.startAngle)))); 2403 var startAngleSource = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'startAngle', this.startAngle))));
@@ -2580,45 +2406,40 @@ mxShapeBasicArc.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2580,45 +2406,40 @@ mxShapeBasicArc.prototype.paintVertexShape = function(c, x, y, w, h)
2580 var endAngle = 2 * Math.PI * endAngleSource; 2406 var endAngle = 2 * Math.PI * endAngleSource;
2581 var rx = w * 0.5; 2407 var rx = w * 0.5;
2582 var ry = h * 0.5; 2408 var ry = h * 0.5;
2583 - 2409 +
2584 var startX = rx + Math.sin(startAngle) * rx; 2410 var startX = rx + Math.sin(startAngle) * rx;
2585 var startY = ry - Math.cos(startAngle) * ry; 2411 var startY = ry - Math.cos(startAngle) * ry;
2586 var endX = rx + Math.sin(endAngle) * rx; 2412 var endX = rx + Math.sin(endAngle) * rx;
2587 var endY = ry - Math.cos(endAngle) * ry; 2413 var endY = ry - Math.cos(endAngle) * ry;
2588 - 2414 +
2589 var angDiff = endAngle - startAngle; 2415 var angDiff = endAngle - startAngle;
2590 -  
2591 - if (angDiff < 0)  
2592 - { 2416 +
  2417 + if (angDiff < 0) {
2593 angDiff = angDiff + Math.PI * 2; 2418 angDiff = angDiff + Math.PI * 2;
2594 } 2419 }
2595 - 2420 +
2596 var bigArc = 0; 2421 var bigArc = 0;
2597 -  
2598 - if (angDiff > Math.PI)  
2599 - { 2422 +
  2423 + if (angDiff > Math.PI) {
2600 bigArc = 1; 2424 bigArc = 1;
2601 } 2425 }
2602 - 2426 +
2603 c.begin(); 2427 c.begin();
2604 - 2428 +
2605 var startAngleDiff = startAngleSource % 1; 2429 var startAngleDiff = startAngleSource % 1;
2606 var endAngleDiff = endAngleSource % 1; 2430 var endAngleDiff = endAngleSource % 1;
2607 -  
2608 - if (startAngleDiff == 0 && endAngleDiff == 0.5)  
2609 - { 2431 +
  2432 + if (startAngleDiff == 0 && endAngleDiff == 0.5) {
2610 c.moveTo(startX, startY); 2433 c.moveTo(startX, startY);
2611 c.arcTo(rx, ry, 0, 0, 1, w, h * 0.5); 2434 c.arcTo(rx, ry, 0, 0, 1, w, h * 0.5);
2612 c.arcTo(rx, ry, 0, 0, 1, w * 0.5, h); 2435 c.arcTo(rx, ry, 0, 0, 1, w * 0.5, h);
2613 } 2436 }
2614 - else if (startAngleDiff == 0.5 && endAngleDiff == 0)  
2615 - { 2437 + else if (startAngleDiff == 0.5 && endAngleDiff == 0) {
2616 c.moveTo(startX, startY); 2438 c.moveTo(startX, startY);
2617 c.arcTo(rx, ry, 0, 0, 1, 0, h * 0.5); 2439 c.arcTo(rx, ry, 0, 0, 1, 0, h * 0.5);
2618 c.arcTo(rx, ry, 0, 0, 1, w * 0.5, 0); 2440 c.arcTo(rx, ry, 0, 0, 1, w * 0.5, 0);
2619 } 2441 }
2620 - else  
2621 - { 2442 + else {
2622 c.moveTo(startX, startY); 2443 c.moveTo(startX, startY);
2623 c.arcTo(rx, ry, 0, bigArc, 1, endX, endY); 2444 c.arcTo(rx, ry, 0, bigArc, 1, endX, endY);
2624 } 2445 }
@@ -2630,51 +2451,44 @@ mxCellRenderer.registerShape(mxShapeBasicArc.prototype.cst.ARC, mxShapeBasicArc) @@ -2630,51 +2451,44 @@ mxCellRenderer.registerShape(mxShapeBasicArc.prototype.cst.ARC, mxShapeBasicArc)
2630 2451
2631 mxShapeBasicArc.prototype.constraints = null; 2452 mxShapeBasicArc.prototype.constraints = null;
2632 2453
2633 -Graph.handleFactory[mxShapeBasicArc.prototype.cst.ARC] = function(state)  
2634 -{  
2635 - var handles = [Graph.createHandle(state, ['startAngle'], function(bounds)  
2636 - { 2454 +Graph.handleFactory[mxShapeBasicArc.prototype.cst.ARC] = function (state) {
  2455 + var handles = [Graph.createHandle(state, ['startAngle'], function (bounds) {
2637 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'startAngle', this.startAngle)))); 2456 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'startAngle', this.startAngle))));
2638 2457
2639 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(startAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(startAngle) * bounds.height * 0.5); 2458 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(startAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(startAngle) * bounds.height * 0.5);
2640 - }, function(bounds, pt)  
2641 - { 2459 + }, function (bounds, pt) {
2642 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100; 2460 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100;
2643 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100; 2461 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100;
2644 -  
2645 - var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;  
2646 -  
2647 - if (res < 0)  
2648 - { 2462 +
  2463 + var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;
  2464 +
  2465 + if (res < 0) {
2649 res = 1 + res; 2466 res = 1 + res;
2650 } 2467 }
2651 2468
2652 this.state.style['startAngle'] = res; 2469 this.state.style['startAngle'] = res;
2653 - 2470 +
2654 })]; 2471 })];
2655 2472
2656 - var handle2 = Graph.createHandle(state, ['endAngle'], function(bounds)  
2657 - { 2473 + var handle2 = Graph.createHandle(state, ['endAngle'], function (bounds) {
2658 var endAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'endAngle', this.endAngle)))); 2474 var endAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'endAngle', this.endAngle))));
2659 2475
2660 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(endAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(endAngle) * bounds.height * 0.5); 2476 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(endAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(endAngle) * bounds.height * 0.5);
2661 - }, function(bounds, pt)  
2662 - { 2477 + }, function (bounds, pt) {
2663 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100; 2478 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100;
2664 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100; 2479 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100;
2665 -  
2666 - var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;  
2667 -  
2668 - if (res < 0)  
2669 - { 2480 +
  2481 + var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;
  2482 +
  2483 + if (res < 0) {
2670 res = 1 + res; 2484 res = 1 + res;
2671 } 2485 }
2672 - 2486 +
2673 this.state.style['endAngle'] = res; 2487 this.state.style['endAngle'] = res;
2674 }); 2488 });
2675 - 2489 +
2676 handles.push(handle2); 2490 handles.push(handle2);
2677 - 2491 +
2678 return handles; 2492 return handles;
2679 }; 2493 };
2680 2494
@@ -2684,8 +2498,7 @@ Graph.handleFactory[mxShapeBasicArc.prototype.cst.ARC] = function(state) @@ -2684,8 +2498,7 @@ Graph.handleFactory[mxShapeBasicArc.prototype.cst.ARC] = function(state)
2684 /** 2498 /**
2685 * Extends mxShape. 2499 * Extends mxShape.
2686 */ 2500 */
2687 -function mxShapeBasicPartConcEllipse(bounds, fill, stroke, strokewidth)  
2688 -{ 2501 +function mxShapeBasicPartConcEllipse(bounds, fill, stroke, strokewidth) {
2689 mxShape.call(this); 2502 mxShape.call(this);
2690 this.bounds = bounds; 2503 this.bounds = bounds;
2691 this.fill = fill; 2504 this.fill = fill;
@@ -2702,20 +2515,19 @@ function mxShapeBasicPartConcEllipse(bounds, fill, stroke, strokewidth) @@ -2702,20 +2515,19 @@ function mxShapeBasicPartConcEllipse(bounds, fill, stroke, strokewidth)
2702 mxUtils.extend(mxShapeBasicPartConcEllipse, mxActor); 2515 mxUtils.extend(mxShapeBasicPartConcEllipse, mxActor);
2703 2516
2704 mxShapeBasicPartConcEllipse.prototype.customProperties = [ 2517 mxShapeBasicPartConcEllipse.prototype.customProperties = [
2705 - {name: 'startAngle', dispName: 'Start Angle', type: 'float', min:0, max:1, defVal:0.25},  
2706 - {name: 'endAngle', dispName: 'End Angle', type: 'float', min:0, max:1, defVal:0.1},  
2707 - {name: 'arcWidth', dispName: 'Arc Width', type: 'float', min:0, max:1, defVal:0.5} 2518 + { name: 'startAngle', dispName: 'Start Angle', type: 'float', min: 0, max: 1, defVal: 0.25 },
  2519 + { name: 'endAngle', dispName: 'End Angle', type: 'float', min: 0, max: 1, defVal: 0.1 },
  2520 + { name: 'arcWidth', dispName: 'Arc Width', type: 'float', min: 0, max: 1, defVal: 0.5 }
2708 ]; 2521 ];
2709 2522
2710 -mxShapeBasicPartConcEllipse.prototype.cst = {PART_CONC_ELLIPSE : 'mxgraph.basic.partConcEllipse'}; 2523 +mxShapeBasicPartConcEllipse.prototype.cst = { PART_CONC_ELLIPSE: 'mxgraph.basic.partConcEllipse' };
2711 2524
2712 /** 2525 /**
2713 * Function: paintVertexShape 2526 * Function: paintVertexShape
2714 * 2527 *
2715 * Paints the vertex shape. 2528 * Paints the vertex shape.
2716 */ 2529 */
2717 -mxShapeBasicPartConcEllipse.prototype.paintVertexShape = function(c, x, y, w, h)  
2718 -{ 2530 +mxShapeBasicPartConcEllipse.prototype.paintVertexShape = function (c, x, y, w, h) {
2719 c.translate(x, y); 2531 c.translate(x, y);
2720 2532
2721 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'startAngle', this.startAngle)))); 2533 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'startAngle', this.startAngle))));
@@ -2725,18 +2537,16 @@ mxShapeBasicPartConcEllipse.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2725,18 +2537,16 @@ mxShapeBasicPartConcEllipse.prototype.paintVertexShape = function(c, x, y, w, h)
2725 var ry = h * 0.5; 2537 var ry = h * 0.5;
2726 var rx2 = rx * arcWidth; 2538 var rx2 = rx * arcWidth;
2727 var ry2 = ry * arcWidth; 2539 var ry2 = ry * arcWidth;
2728 - 2540 +
2729 var angDiff = endAngle - startAngle; 2541 var angDiff = endAngle - startAngle;
2730 -  
2731 - if (angDiff < 0)  
2732 - { 2542 +
  2543 + if (angDiff < 0) {
2733 angDiff = angDiff + Math.PI * 2; 2544 angDiff = angDiff + Math.PI * 2;
2734 } 2545 }
2735 - else if (angDiff == Math.PI)  
2736 - { 2546 + else if (angDiff == Math.PI) {
2737 endAngle = endAngle + 0.00001; 2547 endAngle = endAngle + 0.00001;
2738 } 2548 }
2739 - 2549 +
2740 var startX = rx + Math.sin(startAngle) * rx; 2550 var startX = rx + Math.sin(startAngle) * rx;
2741 var startY = ry - Math.cos(startAngle) * ry; 2551 var startY = ry - Math.cos(startAngle) * ry;
2742 var innerStartX = rx + Math.sin(startAngle) * rx2; 2552 var innerStartX = rx + Math.sin(startAngle) * rx2;
@@ -2745,15 +2555,14 @@ mxShapeBasicPartConcEllipse.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2745,15 +2555,14 @@ mxShapeBasicPartConcEllipse.prototype.paintVertexShape = function(c, x, y, w, h)
2745 var endY = ry - Math.cos(endAngle) * ry; 2555 var endY = ry - Math.cos(endAngle) * ry;
2746 var innerEndX = rx + Math.sin(endAngle) * rx2; 2556 var innerEndX = rx + Math.sin(endAngle) * rx2;
2747 var innerEndY = ry - Math.cos(endAngle) * ry2; 2557 var innerEndY = ry - Math.cos(endAngle) * ry2;
2748 -  
2749 - 2558 +
  2559 +
2750 var bigArc = 0; 2560 var bigArc = 0;
2751 -  
2752 - if (angDiff >= Math.PI)  
2753 - { 2561 +
  2562 + if (angDiff >= Math.PI) {
2754 bigArc = 1; 2563 bigArc = 1;
2755 } 2564 }
2756 - 2565 +
2757 c.begin(); 2566 c.begin();
2758 c.moveTo(startX, startY); 2567 c.moveTo(startX, startY);
2759 c.arcTo(rx, ry, 0, bigArc, 1, endX, endY); 2568 c.arcTo(rx, ry, 0, bigArc, 1, endX, endY);
@@ -2767,63 +2576,54 @@ mxCellRenderer.registerShape(mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC @@ -2767,63 +2576,54 @@ mxCellRenderer.registerShape(mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC
2767 2576
2768 mxShapeBasicPartConcEllipse.prototype.constraints = null; 2577 mxShapeBasicPartConcEllipse.prototype.constraints = null;
2769 2578
2770 -Graph.handleFactory[mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE] = function(state)  
2771 -{  
2772 - var handles = [Graph.createHandle(state, ['startAngle'], function(bounds)  
2773 - { 2579 +Graph.handleFactory[mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE] = function (state) {
  2580 + var handles = [Graph.createHandle(state, ['startAngle'], function (bounds) {
2774 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'startAngle', this.startAngle)))); 2581 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'startAngle', this.startAngle))));
2775 2582
2776 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(startAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(startAngle) * bounds.height * 0.5); 2583 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(startAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(startAngle) * bounds.height * 0.5);
2777 - }, function(bounds, pt)  
2778 - { 2584 + }, function (bounds, pt) {
2779 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100; 2585 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100;
2780 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100; 2586 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100;
2781 -  
2782 - var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;  
2783 -  
2784 - if (res < 0)  
2785 - { 2587 +
  2588 + var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;
  2589 +
  2590 + if (res < 0) {
2786 res = 1 + res; 2591 res = 1 + res;
2787 } 2592 }
2788 2593
2789 this.state.style['startAngle'] = res; 2594 this.state.style['startAngle'] = res;
2790 - 2595 +
2791 })]; 2596 })];
2792 2597
2793 - var handle2 = Graph.createHandle(state, ['endAngle'], function(bounds)  
2794 - { 2598 + var handle2 = Graph.createHandle(state, ['endAngle'], function (bounds) {
2795 var endAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'endAngle', this.endAngle)))); 2599 var endAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'endAngle', this.endAngle))));
2796 2600
2797 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(endAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(endAngle) * bounds.height * 0.5); 2601 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(endAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(endAngle) * bounds.height * 0.5);
2798 - }, function(bounds, pt)  
2799 - { 2602 + }, function (bounds, pt) {
2800 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100; 2603 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100;
2801 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100; 2604 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100;
2802 -  
2803 - var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;  
2804 -  
2805 - if (res < 0)  
2806 - { 2605 +
  2606 + var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;
  2607 +
  2608 + if (res < 0) {
2807 res = 1 + res; 2609 res = 1 + res;
2808 } 2610 }
2809 - 2611 +
2810 this.state.style['endAngle'] = res; 2612 this.state.style['endAngle'] = res;
2811 }); 2613 });
2812 - 2614 +
2813 handles.push(handle2); 2615 handles.push(handle2);
2814 -  
2815 - var handle3 = Graph.createHandle(state, ['arcWidth'], function(bounds)  
2816 - { 2616 +
  2617 + var handle3 = Graph.createHandle(state, ['arcWidth'], function (bounds) {
2817 var arcWidth = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'arcWidth', this.arcWidth)))); 2618 var arcWidth = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'arcWidth', this.arcWidth))));
2818 2619
2819 return new mxPoint(bounds.x + bounds.width / 2, bounds.y + arcWidth * bounds.height * 0.5); 2620 return new mxPoint(bounds.x + bounds.width / 2, bounds.y + arcWidth * bounds.height * 0.5);
2820 - }, function(bounds, pt)  
2821 - { 2621 + }, function (bounds, pt) {
2822 this.state.style['arcWidth'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, (pt.y - bounds.y) / (bounds.height * 0.5)))) / 100; 2622 this.state.style['arcWidth'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, (pt.y - bounds.y) / (bounds.height * 0.5)))) / 100;
2823 }); 2623 });
2824 - 2624 +
2825 handles.push(handle3); 2625 handles.push(handle3);
2826 - 2626 +
2827 return handles; 2627 return handles;
2828 }; 2628 };
2829 2629
@@ -2833,8 +2633,7 @@ Graph.handleFactory[mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE] @@ -2833,8 +2633,7 @@ Graph.handleFactory[mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE]
2833 /** 2633 /**
2834 * Extends mxShape. 2634 * Extends mxShape.
2835 */ 2635 */
2836 -function mxShapeBasicNumEntryVert(bounds, fill, stroke, strokewidth)  
2837 -{ 2636 +function mxShapeBasicNumEntryVert(bounds, fill, stroke, strokewidth) {
2838 mxShape.call(this); 2637 mxShape.call(this);
2839 this.bounds = bounds; 2638 this.bounds = bounds;
2840 this.fill = fill; 2639 this.fill = fill;
@@ -2848,15 +2647,14 @@ function mxShapeBasicNumEntryVert(bounds, fill, stroke, strokewidth) @@ -2848,15 +2647,14 @@ function mxShapeBasicNumEntryVert(bounds, fill, stroke, strokewidth)
2848 */ 2647 */
2849 mxUtils.extend(mxShapeBasicNumEntryVert, mxActor); 2648 mxUtils.extend(mxShapeBasicNumEntryVert, mxActor);
2850 2649
2851 -mxShapeBasicNumEntryVert.prototype.cst = {NUM_ENTRY_VERT : 'mxgraph.basic.numberedEntryVert'}; 2650 +mxShapeBasicNumEntryVert.prototype.cst = { NUM_ENTRY_VERT: 'mxgraph.basic.numberedEntryVert' };
2852 2651
2853 /** 2652 /**
2854 * Function: paintVertexShape 2653 * Function: paintVertexShape
2855 * 2654 *
2856 * Paints the vertex shape. 2655 * Paints the vertex shape.
2857 */ 2656 */
2858 -mxShapeBasicNumEntryVert.prototype.paintVertexShape = function(c, x, y, w, h)  
2859 -{ 2657 +mxShapeBasicNumEntryVert.prototype.paintVertexShape = function (c, x, y, w, h) {
2860 c.translate(x, y); 2658 c.translate(x, y);
2861 2659
2862 var dy = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)))); 2660 var dy = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
@@ -2864,10 +2662,10 @@ mxShapeBasicNumEntryVert.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2864,10 +2662,10 @@ mxShapeBasicNumEntryVert.prototype.paintVertexShape = function(c, x, y, w, h)
2864 var inset = 5; 2662 var inset = 5;
2865 2663
2866 var d = Math.min(dy, w - 2 * inset, h - inset); 2664 var d = Math.min(dy, w - 2 * inset, h - inset);
2867 - 2665 +
2868 c.ellipse(w * 0.5 - d * 0.5, 0, d, d); 2666 c.ellipse(w * 0.5 - d * 0.5, 0, d, d);
2869 c.fillAndStroke(); 2667 c.fillAndStroke();
2870 - 2668 +
2871 c.begin(); 2669 c.begin();
2872 c.moveTo(0, d * 0.5); 2670 c.moveTo(0, d * 0.5);
2873 c.lineTo(w * 0.5 - d * 0.5 - inset, d * 0.5); 2671 c.lineTo(w * 0.5 - d * 0.5 - inset, d * 0.5);
@@ -2883,18 +2681,15 @@ mxCellRenderer.registerShape(mxShapeBasicNumEntryVert.prototype.cst.NUM_ENTRY_VE @@ -2883,18 +2681,15 @@ mxCellRenderer.registerShape(mxShapeBasicNumEntryVert.prototype.cst.NUM_ENTRY_VE
2883 2681
2884 mxShapeBasicNumEntryVert.prototype.constraints = null; 2682 mxShapeBasicNumEntryVert.prototype.constraints = null;
2885 2683
2886 -Graph.handleFactory[mxShapeBasicNumEntryVert.prototype.cst.NUM_ENTRY_VERT] = function(state)  
2887 -{  
2888 - var handles = [Graph.createHandle(state, ['dy'], function(bounds)  
2889 - { 2684 +Graph.handleFactory[mxShapeBasicNumEntryVert.prototype.cst.NUM_ENTRY_VERT] = function (state) {
  2685 + var handles = [Graph.createHandle(state, ['dy'], function (bounds) {
2890 var dy = Math.max(0, Math.min(bounds.width, bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)))); 2686 var dy = Math.max(0, Math.min(bounds.width, bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
2891 2687
2892 return new mxPoint(bounds.x + bounds.width / 2, bounds.y + dy); 2688 return new mxPoint(bounds.x + bounds.width / 2, bounds.y + dy);
2893 - }, function(bounds, pt)  
2894 - { 2689 + }, function (bounds, pt) {
2895 this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(bounds.height, bounds.width, pt.y - bounds.y))) / 100; 2690 this.state.style['dy'] = Math.round(100 * Math.max(0, Math.min(bounds.height, bounds.width, pt.y - bounds.y))) / 100;
2896 })]; 2691 })];
2897 - 2692 +
2898 return handles; 2693 return handles;
2899 }; 2694 };
2900 2695
@@ -2904,8 +2699,7 @@ Graph.handleFactory[mxShapeBasicNumEntryVert.prototype.cst.NUM_ENTRY_VERT] = fun @@ -2904,8 +2699,7 @@ Graph.handleFactory[mxShapeBasicNumEntryVert.prototype.cst.NUM_ENTRY_VERT] = fun
2904 /** 2699 /**
2905 * Extends mxShape. 2700 * Extends mxShape.
2906 */ 2701 */
2907 -function mxShapeBasicBendingArch(bounds, fill, stroke, strokewidth)  
2908 -{ 2702 +function mxShapeBasicBendingArch(bounds, fill, stroke, strokewidth) {
2909 mxShape.call(this); 2703 mxShape.call(this);
2910 this.bounds = bounds; 2704 this.bounds = bounds;
2911 this.fill = fill; 2705 this.fill = fill;
@@ -2921,15 +2715,14 @@ function mxShapeBasicBendingArch(bounds, fill, stroke, strokewidth) @@ -2921,15 +2715,14 @@ function mxShapeBasicBendingArch(bounds, fill, stroke, strokewidth)
2921 */ 2715 */
2922 mxUtils.extend(mxShapeBasicBendingArch, mxActor); 2716 mxUtils.extend(mxShapeBasicBendingArch, mxActor);
2923 2717
2924 -mxShapeBasicBendingArch.prototype.cst = {BENDING_ARCH : 'mxgraph.basic.bendingArch'}; 2718 +mxShapeBasicBendingArch.prototype.cst = { BENDING_ARCH: 'mxgraph.basic.bendingArch' };
2925 2719
2926 /** 2720 /**
2927 * Function: paintVertexShape 2721 * Function: paintVertexShape
2928 * 2722 *
2929 * Paints the vertex shape. 2723 * Paints the vertex shape.
2930 */ 2724 */
2931 -mxShapeBasicBendingArch.prototype.paintVertexShape = function(c, x, y, w, h)  
2932 -{ 2725 +mxShapeBasicBendingArch.prototype.paintVertexShape = function (c, x, y, w, h) {
2933 c.translate(x, y); 2726 c.translate(x, y);
2934 2727
2935 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'startAngle', this.startAngle)))); 2728 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'startAngle', this.startAngle))));
@@ -2939,7 +2732,7 @@ mxShapeBasicBendingArch.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2939,7 +2732,7 @@ mxShapeBasicBendingArch.prototype.paintVertexShape = function(c, x, y, w, h)
2939 var ry = h * 0.5; 2732 var ry = h * 0.5;
2940 var rx2 = rx * arcWidth; 2733 var rx2 = rx * arcWidth;
2941 var ry2 = ry * arcWidth; 2734 var ry2 = ry * arcWidth;
2942 - 2735 +
2943 var startX = rx + Math.sin(startAngle) * rx; 2736 var startX = rx + Math.sin(startAngle) * rx;
2944 var startY = ry - Math.cos(startAngle) * ry; 2737 var startY = ry - Math.cos(startAngle) * ry;
2945 var innerStartX = rx + Math.sin(startAngle) * rx2; 2738 var innerStartX = rx + Math.sin(startAngle) * rx2;
@@ -2948,18 +2741,16 @@ mxShapeBasicBendingArch.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2948,18 +2741,16 @@ mxShapeBasicBendingArch.prototype.paintVertexShape = function(c, x, y, w, h)
2948 var endY = ry - Math.cos(endAngle) * ry; 2741 var endY = ry - Math.cos(endAngle) * ry;
2949 var innerEndX = rx + Math.sin(endAngle) * rx2; 2742 var innerEndX = rx + Math.sin(endAngle) * rx2;
2950 var innerEndY = ry - Math.cos(endAngle) * ry2; 2743 var innerEndY = ry - Math.cos(endAngle) * ry2;
2951 - 2744 +
2952 var angDiff = endAngle - startAngle; 2745 var angDiff = endAngle - startAngle;
2953 -  
2954 - if (angDiff < 0)  
2955 - { 2746 +
  2747 + if (angDiff < 0) {
2956 angDiff = angDiff + Math.PI * 2; 2748 angDiff = angDiff + Math.PI * 2;
2957 } 2749 }
2958 - 2750 +
2959 var bigArc = 0; 2751 var bigArc = 0;
2960 -  
2961 - if (angDiff > Math.PI)  
2962 - { 2752 +
  2753 + if (angDiff > Math.PI) {
2963 bigArc = 1; 2754 bigArc = 1;
2964 } 2755 }
2965 2756
@@ -2968,7 +2759,7 @@ mxShapeBasicBendingArch.prototype.paintVertexShape = function(c, x, y, w, h) @@ -2968,7 +2759,7 @@ mxShapeBasicBendingArch.prototype.paintVertexShape = function(c, x, y, w, h)
2968 2759
2969 c.ellipse(w * 0.5 - rx3, h * 0.5 - ry3, 2 * rx3, 2 * ry3); 2760 c.ellipse(w * 0.5 - rx3, h * 0.5 - ry3, 2 * rx3, 2 * ry3);
2970 c.fillAndStroke(); 2761 c.fillAndStroke();
2971 - 2762 +
2972 c.begin(); 2763 c.begin();
2973 c.moveTo(startX, startY); 2764 c.moveTo(startX, startY);
2974 c.arcTo(rx, ry, 0, bigArc, 1, endX, endY); 2765 c.arcTo(rx, ry, 0, bigArc, 1, endX, endY);
@@ -2982,63 +2773,54 @@ mxCellRenderer.registerShape(mxShapeBasicBendingArch.prototype.cst.BENDING_ARCH, @@ -2982,63 +2773,54 @@ mxCellRenderer.registerShape(mxShapeBasicBendingArch.prototype.cst.BENDING_ARCH,
2982 2773
2983 mxShapeBasicBendingArch.prototype.constraints = null; 2774 mxShapeBasicBendingArch.prototype.constraints = null;
2984 2775
2985 -Graph.handleFactory[mxShapeBasicBendingArch.prototype.cst.BENDING_ARCH] = function(state)  
2986 -{  
2987 - var handles = [Graph.createHandle(state, ['startAngle'], function(bounds)  
2988 - { 2776 +Graph.handleFactory[mxShapeBasicBendingArch.prototype.cst.BENDING_ARCH] = function (state) {
  2777 + var handles = [Graph.createHandle(state, ['startAngle'], function (bounds) {
2989 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'startAngle', this.startAngle)))); 2778 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'startAngle', this.startAngle))));
2990 2779
2991 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(startAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(startAngle) * bounds.height * 0.5); 2780 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(startAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(startAngle) * bounds.height * 0.5);
2992 - }, function(bounds, pt)  
2993 - { 2781 + }, function (bounds, pt) {
2994 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100; 2782 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100;
2995 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100; 2783 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100;
2996 -  
2997 - var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;  
2998 -  
2999 - if (res < 0)  
3000 - { 2784 +
  2785 + var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;
  2786 +
  2787 + if (res < 0) {
3001 res = 1 + res; 2788 res = 1 + res;
3002 } 2789 }
3003 2790
3004 this.state.style['startAngle'] = res; 2791 this.state.style['startAngle'] = res;
3005 - 2792 +
3006 })]; 2793 })];
3007 2794
3008 - var handle2 = Graph.createHandle(state, ['endAngle'], function(bounds)  
3009 - { 2795 + var handle2 = Graph.createHandle(state, ['endAngle'], function (bounds) {
3010 var endAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'endAngle', this.endAngle)))); 2796 var endAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'endAngle', this.endAngle))));
3011 2797
3012 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(endAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(endAngle) * bounds.height * 0.5); 2798 return new mxPoint(bounds.x + bounds.width * 0.5 + Math.sin(endAngle) * bounds.width * 0.5, bounds.y + bounds.height * 0.5 - Math.cos(endAngle) * bounds.height * 0.5);
3013 - }, function(bounds, pt)  
3014 - { 2799 + }, function (bounds, pt) {
3015 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100; 2800 var handleX = Math.round(100 * Math.max(-1, Math.min(1, (pt.x - bounds.x - bounds.width * 0.5) / (bounds.width * 0.5)))) / 100;
3016 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100; 2801 var handleY = -Math.round(100 * Math.max(-1, Math.min(1, (pt.y - bounds.y - bounds.height * 0.5) / (bounds.height * 0.5)))) / 100;
3017 -  
3018 - var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;  
3019 -  
3020 - if (res < 0)  
3021 - { 2802 +
  2803 + var res = 0.5 * Math.atan2(handleX, handleY) / Math.PI;
  2804 +
  2805 + if (res < 0) {
3022 res = 1 + res; 2806 res = 1 + res;
3023 } 2807 }
3024 - 2808 +
3025 this.state.style['endAngle'] = res; 2809 this.state.style['endAngle'] = res;
3026 }); 2810 });
3027 - 2811 +
3028 handles.push(handle2); 2812 handles.push(handle2);
3029 -  
3030 - var handle3 = Graph.createHandle(state, ['arcWidth'], function(bounds)  
3031 - { 2813 +
  2814 + var handle3 = Graph.createHandle(state, ['arcWidth'], function (bounds) {
3032 var arcWidth = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'arcWidth', this.arcWidth)))); 2815 var arcWidth = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'arcWidth', this.arcWidth))));
3033 2816
3034 return new mxPoint(bounds.x + bounds.width / 2, bounds.y + arcWidth * bounds.height * 0.5); 2817 return new mxPoint(bounds.x + bounds.width / 2, bounds.y + arcWidth * bounds.height * 0.5);
3035 - }, function(bounds, pt)  
3036 - { 2818 + }, function (bounds, pt) {
3037 this.state.style['arcWidth'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, (pt.y - bounds.y) / (bounds.height * 0.5)))) / 100; 2819 this.state.style['arcWidth'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 2, bounds.width / 2, (pt.y - bounds.y) / (bounds.height * 0.5)))) / 100;
3038 }); 2820 });
3039 - 2821 +
3040 handles.push(handle3); 2822 handles.push(handle3);
3041 - 2823 +
3042 return handles; 2824 return handles;
3043 }; 2825 };
3044 2826
@@ -3048,8 +2830,7 @@ Graph.handleFactory[mxShapeBasicBendingArch.prototype.cst.BENDING_ARCH] = functi @@ -3048,8 +2830,7 @@ Graph.handleFactory[mxShapeBasicBendingArch.prototype.cst.BENDING_ARCH] = functi
3048 /** 2830 /**
3049 * Extends mxShape. 2831 * Extends mxShape.
3050 */ 2832 */
3051 -function mxShapeBasicThreeCornerRoundRect(bounds, fill, stroke, strokewidth)  
3052 -{ 2833 +function mxShapeBasicThreeCornerRoundRect(bounds, fill, stroke, strokewidth) {
3053 mxShape.call(this); 2834 mxShape.call(this);
3054 this.bounds = bounds; 2835 this.bounds = bounds;
3055 this.fill = fill; 2836 this.fill = fill;
@@ -3064,24 +2845,23 @@ function mxShapeBasicThreeCornerRoundRect(bounds, fill, stroke, strokewidth) @@ -3064,24 +2845,23 @@ function mxShapeBasicThreeCornerRoundRect(bounds, fill, stroke, strokewidth)
3064 mxUtils.extend(mxShapeBasicThreeCornerRoundRect, mxActor); 2845 mxUtils.extend(mxShapeBasicThreeCornerRoundRect, mxActor);
3065 2846
3066 mxShapeBasicThreeCornerRoundRect.prototype.customProperties = [ 2847 mxShapeBasicThreeCornerRoundRect.prototype.customProperties = [
3067 - {name: 'dx', dispName: 'Rounding Size', type: 'float', min:0, defVal:6} 2848 + { name: 'dx', dispName: 'Rounding Size', type: 'float', min: 0, defVal: 6 }
3068 ]; 2849 ];
3069 2850
3070 -mxShapeBasicThreeCornerRoundRect.prototype.cst = {THREE_CORNER_ROUND_RECT : 'mxgraph.basic.three_corner_round_rect'}; 2851 +mxShapeBasicThreeCornerRoundRect.prototype.cst = { THREE_CORNER_ROUND_RECT: 'mxgraph.basic.three_corner_round_rect' };
3071 2852
3072 /** 2853 /**
3073 * Function: paintVertexShape 2854 * Function: paintVertexShape
3074 * 2855 *
3075 * Paints the vertex shape. 2856 * Paints the vertex shape.
3076 */ 2857 */
3077 -mxShapeBasicThreeCornerRoundRect.prototype.paintVertexShape = function(c, x, y, w, h)  
3078 -{ 2858 +mxShapeBasicThreeCornerRoundRect.prototype.paintVertexShape = function (c, x, y, w, h) {
3079 c.translate(x, y); 2859 c.translate(x, y);
3080 2860
3081 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2; 2861 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
3082 2862
3083 dx = Math.min(w * 0.5, h * 0.5, dx); 2863 dx = Math.min(w * 0.5, h * 0.5, dx);
3084 - 2864 +
3085 c.begin(); 2865 c.begin();
3086 c.moveTo(dx, 0); 2866 c.moveTo(dx, 0);
3087 c.lineTo(w - dx, 0); 2867 c.lineTo(w - dx, 0);
@@ -3099,23 +2879,19 @@ mxCellRenderer.registerShape(mxShapeBasicThreeCornerRoundRect.prototype.cst.THRE @@ -3099,23 +2879,19 @@ mxCellRenderer.registerShape(mxShapeBasicThreeCornerRoundRect.prototype.cst.THRE
3099 2879
3100 mxShapeBasicThreeCornerRoundRect.prototype.constraints = null; 2880 mxShapeBasicThreeCornerRoundRect.prototype.constraints = null;
3101 2881
3102 -Graph.handleFactory[mxShapeBasicThreeCornerRoundRect.prototype.cst.THREE_CORNER_ROUND_RECT] = function(state)  
3103 -{  
3104 - var handles = [Graph.createHandle(state, ['dx'], function(bounds)  
3105 - { 2882 +Graph.handleFactory[mxShapeBasicThreeCornerRoundRect.prototype.cst.THREE_CORNER_ROUND_RECT] = function (state) {
  2883 + var handles = [Graph.createHandle(state, ['dx'], function (bounds) {
3106 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx)))); 2884 var dx = Math.max(0, Math.min(bounds.width / 4, bounds.width / 4, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
3107 2885
3108 return new mxPoint(bounds.x + dx, bounds.y + dx); 2886 return new mxPoint(bounds.x + dx, bounds.y + dx);
3109 - }, function(bounds, pt)  
3110 - { 2887 + }, function (bounds, pt) {
3111 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100; 2888 this.state.style['dx'] = Math.round(100 * Math.max(0, Math.min(bounds.height / 4, bounds.width / 4, pt.x - bounds.x))) / 100;
3112 })]; 2889 })];
3113 - 2890 +
3114 return handles; 2891 return handles;
3115 }; 2892 };
3116 2893
3117 -mxShapeBasicThreeCornerRoundRect.prototype.getConstraints = function(style, w, h)  
3118 -{ 2894 +mxShapeBasicThreeCornerRoundRect.prototype.getConstraints = function (style, w, h) {
3119 var constr = []; 2895 var constr = [];
3120 2896
3121 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false)); 2897 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
@@ -3133,8 +2909,7 @@ mxShapeBasicThreeCornerRoundRect.prototype.getConstraints = function(style, w, h @@ -3133,8 +2909,7 @@ mxShapeBasicThreeCornerRoundRect.prototype.getConstraints = function(style, w, h
3133 /** 2909 /**
3134 * Extends mxShape. 2910 * Extends mxShape.
3135 */ 2911 */
3136 -function mxShapeBasicPolygon(bounds, fill, stroke, strokewidth)  
3137 -{ 2912 +function mxShapeBasicPolygon(bounds, fill, stroke, strokewidth) {
3138 mxShape.call(this); 2913 mxShape.call(this);
3139 this.bounds = bounds; 2914 this.bounds = bounds;
3140 this.fill = fill; 2915 this.fill = fill;
@@ -3150,86 +2925,73 @@ function mxShapeBasicPolygon(bounds, fill, stroke, strokewidth) @@ -3150,86 +2925,73 @@ function mxShapeBasicPolygon(bounds, fill, stroke, strokewidth)
3150 mxUtils.extend(mxShapeBasicPolygon, mxActor); 2925 mxUtils.extend(mxShapeBasicPolygon, mxActor);
3151 2926
3152 mxShapeBasicPolygon.prototype.customProperties = [ 2927 mxShapeBasicPolygon.prototype.customProperties = [
3153 - {name: 'polyline', dispName: 'Polyline', type: 'bool', defVal:false}, 2928 + { name: 'polyline', dispName: 'Polyline', type: 'bool', defVal: false },
3154 ]; 2929 ];
3155 2930
3156 -mxShapeBasicPolygon.prototype.cst = {POLYGON : 'mxgraph.basic.polygon'}; 2931 +mxShapeBasicPolygon.prototype.cst = { POLYGON: 'mxgraph.basic.polygon' };
3157 2932
3158 /** 2933 /**
3159 * Function: paintVertexShape 2934 * Function: paintVertexShape
3160 * 2935 *
3161 * Paints the vertex shape. 2936 * Paints the vertex shape.
3162 */ 2937 */
3163 -mxShapeBasicPolygon.prototype.paintVertexShape = function(c, x, y, w, h)  
3164 -{  
3165 - try  
3166 - {  
3167 - c.translate(x, y);  
3168 - var coords = JSON.parse(mxUtils.getValue(this.state.style, 'polyCoords', '[]'));  
3169 - var polyline = mxUtils.getValue(this.style, 'polyline', false);  
3170 -  
3171 - if (coords.length > 0)  
3172 - {  
3173 - c.begin();  
3174 - c.moveTo(coords[0][0] * w, coords[0][1] * h);  
3175 -  
3176 - for (var i = 1; i < coords.length; i++)  
3177 - {  
3178 - c.lineTo(coords[i][0] * w, coords[i][1] * h);  
3179 - }  
3180 -  
3181 - if (polyline == false)  
3182 - {  
3183 - c.close();  
3184 - }  
3185 -  
3186 - c.end();  
3187 - c.fillAndStroke();  
3188 - }  
3189 - }  
3190 - catch (e)  
3191 - {  
3192 - // ignore  
3193 - }  
3194 -};  
3195 - 2938 +mxShapeBasicPolygon.prototype.paintVertexShape = function (c, x, y, w, h) {
  2939 + try {
  2940 + c.translate(x, y);
  2941 + var coords = JSON.parse(mxUtils.getValue(this.state.style, 'polyCoords', '[]'));
  2942 + var polyline = mxUtils.getValue(this.style, 'polyline', false);
  2943 +
  2944 + if (coords.length > 0) {
  2945 + c.begin();
  2946 + c.moveTo(coords[0][0] * w, coords[0][1] * h);
  2947 +
  2948 + for (var i = 1; i < coords.length; i++) {
  2949 + c.lineTo(coords[i][0] * w, coords[i][1] * h);
  2950 + }
  2951 +
  2952 + if (polyline == false) {
  2953 + c.close();
  2954 + }
  2955 +
  2956 + c.end();
  2957 + c.fillAndStroke();
  2958 + }
  2959 + }
  2960 + catch (e) {
  2961 + // ignore
  2962 + }
  2963 +};
  2964 +
3196 mxCellRenderer.registerShape(mxShapeBasicPolygon.prototype.cst.POLYGON, mxShapeBasicPolygon); 2965 mxCellRenderer.registerShape(mxShapeBasicPolygon.prototype.cst.POLYGON, mxShapeBasicPolygon);
3197 2966
3198 mxShapeBasicPolygon.prototype.constraints = null; 2967 mxShapeBasicPolygon.prototype.constraints = null;
3199 -  
3200 -Graph.handleFactory[mxShapeBasicPolygon.prototype.cst.POLYGON] = function(state)  
3201 -{  
3202 - var handles = [];  
3203 -  
3204 - try  
3205 - {  
3206 - var c = JSON.parse(mxUtils.getValue(state.style, 'polyCoords', '[]'));  
3207 -  
3208 - for (var i = 0; i < c.length; i++)  
3209 - {  
3210 - (function(index)  
3211 - {  
3212 - handles.push(Graph.createHandle(state, ['polyCoords'], function(bounds)  
3213 - {  
3214 - return new mxPoint(bounds.x + c[index][0] * bounds.width, bounds.y + c[index][1] * bounds.height);  
3215 - }, function(bounds, pt)  
3216 - {  
3217 - var x = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100;  
3218 - var y = Math.round(100 * Math.max(0, Math.min(1, (pt.y - bounds.y) / bounds.height))) / 100;  
3219 -  
3220 - c[index] = [x, y];  
3221 - state.style['polyCoords'] = JSON.stringify(c);  
3222 -  
3223 - }, false));  
3224 - })(i);  
3225 - }  
3226 - }  
3227 - catch (e)  
3228 - {  
3229 - // ignore  
3230 - }  
3231 -  
3232 - return handles; 2968 +
  2969 +Graph.handleFactory[mxShapeBasicPolygon.prototype.cst.POLYGON] = function (state) {
  2970 + var handles = [];
  2971 +
  2972 + try {
  2973 + var c = JSON.parse(mxUtils.getValue(state.style, 'polyCoords', '[]'));
  2974 +
  2975 + for (var i = 0; i < c.length; i++) {
  2976 + (function (index) {
  2977 + handles.push(Graph.createHandle(state, ['polyCoords'], function (bounds) {
  2978 + return new mxPoint(bounds.x + c[index][0] * bounds.width, bounds.y + c[index][1] * bounds.height);
  2979 + }, function (bounds, pt) {
  2980 + var x = Math.round(100 * Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width))) / 100;
  2981 + var y = Math.round(100 * Math.max(0, Math.min(1, (pt.y - bounds.y) / bounds.height))) / 100;
  2982 +
  2983 + c[index] = [x, y];
  2984 + state.style['polyCoords'] = JSON.stringify(c);
  2985 +
  2986 + }, false));
  2987 + })(i);
  2988 + }
  2989 + }
  2990 + catch (e) {
  2991 + // ignore
  2992 + }
  2993 +
  2994 + return handles;
3233 }; 2995 };
3234 2996
3235 //********************************************************************************************************************************************************** 2997 //**********************************************************************************************************************************************************
@@ -3238,8 +3000,7 @@ Graph.handleFactory[mxShapeBasicPolygon.prototype.cst.POLYGON] = function(state) @@ -3238,8 +3000,7 @@ Graph.handleFactory[mxShapeBasicPolygon.prototype.cst.POLYGON] = function(state)
3238 /** 3000 /**
3239 * Extends mxShape. 3001 * Extends mxShape.
3240 */ 3002 */
3241 -function mxShapeBasicPatternFillRect(bounds, fill, stroke, strokewidth)  
3242 -{ 3003 +function mxShapeBasicPatternFillRect(bounds, fill, stroke, strokewidth) {
3243 mxShape.call(this); 3004 mxShape.call(this);
3244 this.bounds = bounds; 3005 this.bounds = bounds;
3245 this.fill = fill; 3006 this.fill = fill;
@@ -3253,26 +3014,28 @@ function mxShapeBasicPatternFillRect(bounds, fill, stroke, strokewidth) @@ -3253,26 +3014,28 @@ function mxShapeBasicPatternFillRect(bounds, fill, stroke, strokewidth)
3253 */ 3014 */
3254 mxUtils.extend(mxShapeBasicPatternFillRect, mxActor); 3015 mxUtils.extend(mxShapeBasicPatternFillRect, mxActor);
3255 3016
3256 -mxShapeBasicPatternFillRect.prototype.cst = {PATTERN_FILL_RECT : 'mxgraph.basic.patternFillRect'}; 3017 +mxShapeBasicPatternFillRect.prototype.cst = { PATTERN_FILL_RECT: 'mxgraph.basic.patternFillRect' };
3257 3018
3258 mxShapeBasicPatternFillRect.prototype.customProperties = [ 3019 mxShapeBasicPatternFillRect.prototype.customProperties = [
3259 - {name: 'step', dispName: 'Fill Step', type: 'float', min:0, defVal:5},  
3260 - {name: 'fillStyle', dispName: 'Fill Style', type: 'enum', defVal:'none',  
3261 - enumList:[  
3262 - {val: 'none', dispName: 'None'},  
3263 - {val: 'diag', dispName: 'Diagonal'},  
3264 - {val: 'diagRev', dispName: 'Diagonal Reverse'},  
3265 - {val: 'vert', dispName: 'Vertical'},  
3266 - {val: 'hor', dispName: 'Horizontal'},  
3267 - {val: 'grid', dispName: 'Grid'},  
3268 - {val: 'diagGrid', dispName: 'Diagonal Grid'}  
3269 - ]},  
3270 - {name: 'fillStrokeWidth', dispName: 'Fill Stroke Width', type: 'float', min:0, defVal:1},  
3271 - {name: 'fillStrokeColor', dispName: 'Fill Stroke Color', type: 'color', defVal:'#cccccc'},  
3272 - {name: 'top', dispName: 'Top Line', type: 'bool', defVal:true},  
3273 - {name: 'right', dispName: 'Right Line', type: 'bool', defVal:true},  
3274 - {name: 'bottom', dispName: 'Bottom Line', type: 'bool', defVal:true},  
3275 - {name: 'left', dispName: 'Left Line', type: 'bool', defVal:true} 3020 + { name: 'step', dispName: 'Fill Step', type: 'float', min: 0, defVal: 5 },
  3021 + {
  3022 + name: 'fillStyle', dispName: 'Fill Style', type: 'enum', defVal: 'none',
  3023 + enumList: [
  3024 + { val: 'none', dispName: 'None' },
  3025 + { val: 'diag', dispName: 'Diagonal' },
  3026 + { val: 'diagRev', dispName: 'Diagonal Reverse' },
  3027 + { val: 'vert', dispName: 'Vertical' },
  3028 + { val: 'hor', dispName: 'Horizontal' },
  3029 + { val: 'grid', dispName: 'Grid' },
  3030 + { val: 'diagGrid', dispName: 'Diagonal Grid' }
  3031 + ]
  3032 + },
  3033 + { name: 'fillStrokeWidth', dispName: 'Fill Stroke Width', type: 'float', min: 0, defVal: 1 },
  3034 + { name: 'fillStrokeColor', dispName: 'Fill Stroke Color', type: 'color', defVal: '#cccccc' },
  3035 + { name: 'top', dispName: 'Top Line', type: 'bool', defVal: true },
  3036 + { name: 'right', dispName: 'Right Line', type: 'bool', defVal: true },
  3037 + { name: 'bottom', dispName: 'Bottom Line', type: 'bool', defVal: true },
  3038 + { name: 'left', dispName: 'Left Line', type: 'bool', defVal: true }
3276 ]; 3039 ];
3277 3040
3278 /** 3041 /**
@@ -3280,201 +3043,171 @@ mxShapeBasicPatternFillRect.prototype.customProperties = [ @@ -3280,201 +3043,171 @@ mxShapeBasicPatternFillRect.prototype.customProperties = [
3280 * 3043 *
3281 * Paints the vertex shape. 3044 * Paints the vertex shape.
3282 */ 3045 */
3283 -mxShapeBasicPatternFillRect.prototype.paintVertexShape = function(c, x, y, w, h)  
3284 -{ 3046 +mxShapeBasicPatternFillRect.prototype.paintVertexShape = function (c, x, y, w, h) {
3285 c.translate(x, y); 3047 c.translate(x, y);
3286 - 3048 +
3287 var strokeColor = mxUtils.getValue(this.style, 'strokeColor', '#000000'); 3049 var strokeColor = mxUtils.getValue(this.style, 'strokeColor', '#000000');
3288 var strokeWidth = mxUtils.getValue(this.style, 'strokeWidth', '1'); 3050 var strokeWidth = mxUtils.getValue(this.style, 'strokeWidth', '1');
3289 - 3051 +
3290 c.rect(0, 0, w, h); 3052 c.rect(0, 0, w, h);
3291 c.fill(); 3053 c.fill();
3292 3054
3293 var fillStrokeColor = mxUtils.getValue(this.style, 'fillStrokeColor', '#cccccc'); 3055 var fillStrokeColor = mxUtils.getValue(this.style, 'fillStrokeColor', '#cccccc');
3294 var fillStrokeWidth = parseFloat(mxUtils.getValue(this.style, 'fillStrokeWidth', 1)); 3056 var fillStrokeWidth = parseFloat(mxUtils.getValue(this.style, 'fillStrokeWidth', 1));
3295 - 3057 +
3296 c.setStrokeColor(fillStrokeColor); 3058 c.setStrokeColor(fillStrokeColor);
3297 c.setStrokeWidth(fillStrokeWidth); 3059 c.setStrokeWidth(fillStrokeWidth);
3298 - 3060 +
3299 var step = parseFloat(mxUtils.getValue(this.style, 'step', 5)); 3061 var step = parseFloat(mxUtils.getValue(this.style, 'step', 5));
3300 var fillStyle = mxUtils.getValue(this.style, 'fillStyle', 'none'); 3062 var fillStyle = mxUtils.getValue(this.style, 'fillStyle', 'none');
3301 3063
3302 - if (fillStyle == 'diag' || fillStyle == 'diagGrid')  
3303 - { 3064 + if (fillStyle == 'diag' || fillStyle == 'diagGrid') {
3304 step = step * 1.41; 3065 step = step * 1.41;
3305 var i = 0; 3066 var i = 0;
3306 - 3067 +
3307 c.begin(); 3068 c.begin();
3308 -  
3309 - while (i < (h + w))  
3310 - { 3069 +
  3070 + while (i < (h + w)) {
3311 var cx = 0; 3071 var cx = 0;
3312 var cy = 0; 3072 var cy = 0;
3313 -  
3314 - if (i <= h)  
3315 - { 3073 +
  3074 + if (i <= h) {
3316 c.moveTo(0, i); 3075 c.moveTo(0, i);
3317 -  
3318 - if(i <= w)  
3319 - { 3076 +
  3077 + if (i <= w) {
3320 c.lineTo(i, 0); 3078 c.lineTo(i, 0);
3321 } 3079 }
3322 - else  
3323 - { 3080 + else {
3324 c.lineTo(w, i - w); 3081 c.lineTo(w, i - w);
3325 } 3082 }
3326 } 3083 }
3327 - else  
3328 - { 3084 + else {
3329 c.moveTo(i - h, h); 3085 c.moveTo(i - h, h);
3330 -  
3331 - if(i <= w)  
3332 - { 3086 +
  3087 + if (i <= w) {
3333 c.lineTo(i, 0); 3088 c.lineTo(i, 0);
3334 } 3089 }
3335 - else  
3336 - { 3090 + else {
3337 c.lineTo(w, i - w); 3091 c.lineTo(w, i - w);
3338 } 3092 }
3339 } 3093 }
3340 - 3094 +
3341 i = i + step; 3095 i = i + step;
3342 } 3096 }
3343 - 3097 +
3344 c.stroke(); 3098 c.stroke();
3345 } 3099 }
3346 - else if (fillStyle == 'vert' || fillStyle == 'grid')  
3347 - { 3100 + else if (fillStyle == 'vert' || fillStyle == 'grid') {
3348 c.begin(); 3101 c.begin();
3349 var i = 0; 3102 var i = 0;
3350 -  
3351 - while (i <= w)  
3352 - { 3103 +
  3104 + while (i <= w) {
3353 var cx = 0; 3105 var cx = 0;
3354 var cy = 0; 3106 var cy = 0;
3355 - 3107 +
3356 c.moveTo(i, 0); 3108 c.moveTo(i, 0);
3357 c.lineTo(i, h); 3109 c.lineTo(i, h);
3358 - 3110 +
3359 i = i + step; 3111 i = i + step;
3360 } 3112 }
3361 - 3113 +
3362 c.stroke(); 3114 c.stroke();
3363 } 3115 }
3364 -  
3365 - if (fillStyle == 'diagRev' || fillStyle == 'diagGrid')  
3366 - {  
3367 - if (fillStyle == 'diagRev')  
3368 - { 3116 +
  3117 + if (fillStyle == 'diagRev' || fillStyle == 'diagGrid') {
  3118 + if (fillStyle == 'diagRev') {
3369 step = step * 1.41; 3119 step = step * 1.41;
3370 } 3120 }
3371 3121
3372 var i = 0; 3122 var i = 0;
3373 - 3123 +
3374 c.begin(); 3124 c.begin();
3375 -  
3376 - while (i < (h + w))  
3377 - { 3125 +
  3126 + while (i < (h + w)) {
3378 var cx = 0; 3127 var cx = 0;
3379 var cy = 0; 3128 var cy = 0;
3380 -  
3381 - if (i <= h)  
3382 - { 3129 +
  3130 + if (i <= h) {
3383 c.moveTo(w, i); 3131 c.moveTo(w, i);
3384 -  
3385 - if(i <= w)  
3386 - { 3132 +
  3133 + if (i <= w) {
3387 c.lineTo(w - i, 0); 3134 c.lineTo(w - i, 0);
3388 } 3135 }
3389 - else  
3390 - { 3136 + else {
3391 c.lineTo(w - w, i - w); 3137 c.lineTo(w - w, i - w);
3392 } 3138 }
3393 } 3139 }
3394 - else  
3395 - { 3140 + else {
3396 c.moveTo(w - i + h, h); 3141 c.moveTo(w - i + h, h);
3397 -  
3398 - if(i <= w)  
3399 - { 3142 +
  3143 + if (i <= w) {
3400 c.lineTo(w - i, 0); 3144 c.lineTo(w - i, 0);
3401 } 3145 }
3402 - else  
3403 - { 3146 + else {
3404 c.lineTo(0, i - w); 3147 c.lineTo(0, i - w);
3405 } 3148 }
3406 } 3149 }
3407 - 3150 +
3408 i = i + step; 3151 i = i + step;
3409 } 3152 }
3410 - 3153 +
3411 c.stroke(); 3154 c.stroke();
3412 } 3155 }
3413 - else if (fillStyle == 'hor' || fillStyle == 'grid')  
3414 - { 3156 + else if (fillStyle == 'hor' || fillStyle == 'grid') {
3415 c.begin(); 3157 c.begin();
3416 var i = 0; 3158 var i = 0;
3417 -  
3418 - while (i <= h)  
3419 - { 3159 +
  3160 + while (i <= h) {
3420 var cx = 0; 3161 var cx = 0;
3421 var cy = 0; 3162 var cy = 0;
3422 - 3163 +
3423 c.moveTo(0, i); 3164 c.moveTo(0, i);
3424 c.lineTo(w, i); 3165 c.lineTo(w, i);
3425 - 3166 +
3426 i = i + step; 3167 i = i + step;
3427 } 3168 }
3428 - 3169 +
3429 c.stroke(); 3170 c.stroke();
3430 } 3171 }
3431 3172
3432 c.setStrokeColor(strokeColor); 3173 c.setStrokeColor(strokeColor);
3433 c.setStrokeWidth(strokeWidth); 3174 c.setStrokeWidth(strokeWidth);
3434 - 3175 +
3435 c.begin(); 3176 c.begin();
3436 c.moveTo(0, 0); 3177 c.moveTo(0, 0);
3437 -  
3438 - if (mxUtils.getValue(this.style, 'top', '1') == '1')  
3439 - { 3178 +
  3179 + if (mxUtils.getValue(this.style, 'top', '1') == '1') {
3440 c.lineTo(w, 0); 3180 c.lineTo(w, 0);
3441 } 3181 }
3442 - else  
3443 - { 3182 + else {
3444 c.moveTo(w, 0); 3183 c.moveTo(w, 0);
3445 } 3184 }
3446 -  
3447 - if (mxUtils.getValue(this.style, 'right', '1') == '1')  
3448 - { 3185 +
  3186 + if (mxUtils.getValue(this.style, 'right', '1') == '1') {
3449 c.lineTo(w, h); 3187 c.lineTo(w, h);
3450 } 3188 }
3451 - else  
3452 - { 3189 + else {
3453 c.moveTo(w, h); 3190 c.moveTo(w, h);
3454 } 3191 }
3455 -  
3456 - if (mxUtils.getValue(this.style, 'bottom', '1') == '1')  
3457 - { 3192 +
  3193 + if (mxUtils.getValue(this.style, 'bottom', '1') == '1') {
3458 c.lineTo(0, h); 3194 c.lineTo(0, h);
3459 } 3195 }
3460 - else  
3461 - { 3196 + else {
3462 c.moveTo(0, h); 3197 c.moveTo(0, h);
3463 } 3198 }
3464 -  
3465 - if (mxUtils.getValue(this.style, 'left', '1') == '1')  
3466 - { 3199 +
  3200 + if (mxUtils.getValue(this.style, 'left', '1') == '1') {
3467 c.lineTo(0, 0); 3201 c.lineTo(0, 0);
3468 } 3202 }
3469 - 3203 +
3470 c.end(); 3204 c.end();
3471 c.stroke(); 3205 c.stroke();
3472 }; 3206 };
3473 3207
3474 mxCellRenderer.registerShape(mxShapeBasicPatternFillRect.prototype.cst.PATTERN_FILL_RECT, mxShapeBasicPatternFillRect); 3208 mxCellRenderer.registerShape(mxShapeBasicPatternFillRect.prototype.cst.PATTERN_FILL_RECT, mxShapeBasicPatternFillRect);
3475 3209
3476 -mxShapeBasicPatternFillRect.prototype.getConstraints = function(style, w, h)  
3477 -{ 3210 +mxShapeBasicPatternFillRect.prototype.getConstraints = function (style, w, h) {
3478 var constr = []; 3211 var constr = [];
3479 3212
3480 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false)); 3213 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));