Commit 609fffbbf9ea14f761d3bf487f21ccc16850a0cd

Authored by ww
1 parent 135caac0

chore: 格式化代码

... ... @@ -9,8 +9,7 @@
9 9 /**
10 10 * Extends mxShape.
11 11 */
12   -function mxShapeArrows2Arrow(bounds, fill, stroke, strokewidth)
13   -{
  12 +function mxShapeArrows2Arrow(bounds, fill, stroke, strokewidth) {
14 13 mxShape.call(this);
15 14 this.bounds = bounds;
16 15 this.fill = fill;
... ... @@ -27,15 +26,15 @@ function mxShapeArrows2Arrow(bounds, fill, stroke, strokewidth)
27 26 mxUtils.extend(mxShapeArrows2Arrow, mxActor);
28 27
29 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 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 42 *
44 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 46 c.translate(x, y);
49 47
50 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 62 c.lineTo(notch, h * 0.5);
65 63 c.close();
66 64 c.fillAndStroke();
67   -
  65 +
68 66 c.setShadow(false);
69   -
70   - if (headCrossline)
71   - {
  67 +
  68 + if (headCrossline) {
72 69 c.begin();
73 70 c.moveTo(w - dx, dy);
74 71 c.lineTo(w - dx, h - dy);
75 72 c.stroke();
76 73 }
77   -
78   - if (tailCrossline)
79   - {
  74 +
  75 + if (tailCrossline) {
80 76 c.begin();
81 77 c.moveTo(notch, dy);
82 78 c.lineTo(notch, h - dy);
... ... @@ -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 85 var w = rect.width;
92 86 var h = rect.height;
93   -
  87 +
94 88 var dy, dx;
95 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 92 if (direction == mxConstants.DIRECTION_WEST)
100 93 direction = mxConstants.DIRECTION_EAST;
101 94 else if (direction == mxConstants.DIRECTION_EAST)
102 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 99 if (direction == mxConstants.DIRECTION_NORTH)
108 100 direction = mxConstants.DIRECTION_SOUTH;
109 101 else if (direction == mxConstants.DIRECTION_SOUTH)
110 102 direction = mxConstants.DIRECTION_NORTH;
111 103 }
112   -
  104 +
113 105 if (direction == mxConstants.DIRECTION_NORTH
114   - || direction == mxConstants.DIRECTION_SOUTH)
115   - {
  106 + || direction == mxConstants.DIRECTION_SOUTH) {
116 107 dy = w * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
117 108 dx = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
118 109 }
119   - else
120   - {
  110 + else {
121 111 dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
122 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 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 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 122 return new mxRectangle(rect.x + dy, rect.y + dx, w - 2 * dy, h - dx);
136 123 }
137   - else
138   - {
  124 + else {
139 125 return new mxRectangle(rect.x + dy, rect.y, w - 2 * dy, h - dx);
140 126 }
141 127 }
142   -
  128 +
143 129 return rect;
144 130 };
145 131
146 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 153 handles.push(handle2);
173   -
  154 +
174 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 160 var constr = [];
181 161 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
182 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 182 /**
203 183 * Extends mxShape.
204 184 */
205   -function mxShapeArrows2TwoWayArrow(bounds, fill, stroke, strokewidth)
206   -{
  185 +function mxShapeArrows2TwoWayArrow(bounds, fill, stroke, strokewidth) {
207 186 mxShape.call(this);
208 187 this.bounds = bounds;
209 188 this.fill = fill;
... ... @@ -219,12 +198,12 @@ function mxShapeArrows2TwoWayArrow(bounds, fill, stroke, strokewidth)
219 198 mxUtils.extend(mxShapeArrows2TwoWayArrow, mxActor);
220 199
221 200 mxShapeArrows2TwoWayArrow.prototype.cst = {
222   - TWO_WAY_ARROW : 'mxgraph.arrows2.twoWayArrow'
  201 + TWO_WAY_ARROW: 'mxgraph.arrows2.twoWayArrow'
223 202 };
224 203
225 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 211 *
233 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 215 c.translate(x, y);
238 216
239 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 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 237 var w = rect.width;
262 238 var h = rect.height;
263 239 var vertical = this.direction == mxConstants.DIRECTION_NORTH
264   - || this.direction == mxConstants.DIRECTION_SOUTH;
  240 + || this.direction == mxConstants.DIRECTION_SOUTH;
265 241
266 242 var dy, dx;
267   -
268   - if (vertical)
269   - {
  243 +
  244 + if (vertical) {
270 245 dy = w * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
271 246 dx = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
272 247 }
273   - else
274   - {
  248 + else {
275 249 dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
276 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 254 return new mxRectangle(rect.x + dy, rect.y + dx, w - 2 * dy, h - 2 * dx);
282 255 }
283   - else
284   - {
  256 + else {
285 257 return new mxRectangle(rect.x + dx, rect.y + dy, w - 2 * dx, h - 2 * dy);
286 258 }
287 259 }
288   -
  260 +
289 261 return rect;
290 262 };
291 263
... ... @@ -293,26 +265,22 @@ mxCellRenderer.registerShape(mxShapeArrows2TwoWayArrow.prototype.cst.TWO_WAY_ARR
293 265
294 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 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 284 var constr = [];
317 285 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
318 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 307 /**
340 308 * Extends mxShape.
341 309 */
342   -function mxShapeArrows2StylisedArrow(bounds, fill, stroke, strokewidth)
343   -{
  310 +function mxShapeArrows2StylisedArrow(bounds, fill, stroke, strokewidth) {
344 311 mxShape.call(this);
345 312 this.bounds = bounds;
346 313 this.fill = fill;
... ... @@ -358,14 +325,14 @@ function mxShapeArrows2StylisedArrow(bounds, fill, stroke, strokewidth)
358 325 mxUtils.extend(mxShapeArrows2StylisedArrow, mxActor);
359 326
360 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 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 340 *
374 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 344 c.translate(x, y);
379 345
380 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 365
400 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 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 397 handles.push(handle3);
439   -
  398 +
440 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 404 var constr = [];
447 405 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
448 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 427 /**
470 428 * Extends mxShape.
471 429 */
472   -function mxShapeArrows2SharpArrow(bounds, fill, stroke, strokewidth)
473   -{
  430 +function mxShapeArrows2SharpArrow(bounds, fill, stroke, strokewidth) {
474 431 mxShape.call(this);
475 432 this.bounds = bounds;
476 433 this.fill = fill;
... ... @@ -488,14 +445,14 @@ function mxShapeArrows2SharpArrow(bounds, fill, stroke, strokewidth)
488 445 mxUtils.extend(mxShapeArrows2SharpArrow, mxActor);
489 446
490 447 mxShapeArrows2SharpArrow.prototype.cst = {
491   - SHARP_ARROW : 'mxgraph.arrows2.sharpArrow'
  448 + SHARP_ARROW: 'mxgraph.arrows2.sharpArrow'
492 449 };
493 450
494 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 460 *
504 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 464 c.translate(x, y);
509 465
510 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 470 var dx1a = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
515 471 var dy1a = h * 0.5 * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
516 472 var x2 = 0;
517   -
518   - if (h != 0)
519   - {
  473 +
  474 + if (h != 0) {
520 475 x2 = dx1a + dx2 * dy1a * 2 / h;
521 476 }
522   -
  477 +
523 478 c.begin();
524 479 c.moveTo(0, dy1);
525 480 c.lineTo(w - dx1, dy1);
... ... @@ -539,49 +494,41 @@ mxCellRenderer.registerShape(mxShapeArrows2SharpArrow.prototype.cst.SHARP_ARROW,
539 494
540 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 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 526 handles.push(handle3);
579   -
  527 +
580 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 532 var constr = [];
586 533 var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
587 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 537 var dx1a = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
591 538 var dy1a = h * 0.5 * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
592 539 var x2 = 0;
593   -
594   - if (h != 0)
595   - {
  540 +
  541 + if (h != 0) {
596 542 x2 = dx1a + dx2 * dy1a * 2 / h;
597 543 }
598   -
  544 +
599 545 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
600 546 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, notch, 0));
601 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 564 /**
619 565 * Extends mxShape.
620 566 */
621   -function mxShapeArrows2SharpArrow2(bounds, fill, stroke, strokewidth)
622   -{
  567 +function mxShapeArrows2SharpArrow2(bounds, fill, stroke, strokewidth) {
623 568 mxShape.call(this);
624 569 this.bounds = bounds;
625 570 this.fill = fill;
... ... @@ -640,16 +585,16 @@ function mxShapeArrows2SharpArrow2(bounds, fill, stroke, strokewidth)
640 585 mxUtils.extend(mxShapeArrows2SharpArrow2, mxActor);
641 586
642 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 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 602 *
658 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 606 c.translate(x, y);
663 607
664 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 633
690 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 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 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 677 handles.push(handle4);
743 678
744 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 683 var constr = [];
750 684 var dy1 = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
751 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 712 /**
779 713 * Extends mxShape.
780 714 */
781   -function mxShapeArrows2CalloutArrow(bounds, fill, stroke, strokewidth)
782   -{
  715 +function mxShapeArrows2CalloutArrow(bounds, fill, stroke, strokewidth) {
783 716 mxShape.call(this);
784 717 this.bounds = bounds;
785 718 this.fill = fill;
... ... @@ -797,14 +730,14 @@ function mxShapeArrows2CalloutArrow(bounds, fill, stroke, strokewidth)
797 730 mxUtils.extend(mxShapeArrows2CalloutArrow, mxActor);
798 731
799 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 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 745 *
813 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 749 c.translate(x, y);
818 750
819 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 773
842 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 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 809 handles.push(handle3);
885   -
  810 +
886 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 815 var constr = [];
892 816 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
893 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 820
897 821 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
898 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 824 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 - dy));
901 825 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h * 0.5 - dy - arrowHead));
902 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 829 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch, h * 0.5 + dy));
906 830 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, notch, h));
907 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 834 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false, null, (notch + w - dx) * 0.5, -dy));
911 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 843 /**
920 844 * Extends mxShape.
921 845 */
922   -function mxShapeArrows2BendArrow(bounds, fill, stroke, strokewidth)
923   -{
  846 +function mxShapeArrows2BendArrow(bounds, fill, stroke, strokewidth) {
924 847 mxShape.call(this);
925 848 this.bounds = bounds;
926 849 this.fill = fill;
... ... @@ -938,15 +861,15 @@ function mxShapeArrows2BendArrow(bounds, fill, stroke, strokewidth)
938 861 mxUtils.extend(mxShapeArrows2BendArrow, mxActor);
939 862
940 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 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 877 *
955 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 881 c.translate(x, y);
960 882
961 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 891 c.lineTo(w, arrowHead * 0.5);
970 892 c.lineTo(w - dx, arrowHead);
971 893 c.lineTo(w - dx, arrowHead / 2 + dy);
972   -
973   - if (rounded == '1')
974   - {
  894 +
  895 + if (rounded == '1') {
975 896 c.lineTo(dy * 2.2, arrowHead / 2 + dy);
976 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 900 c.lineTo(dy * 2, arrowHead / 2 + dy);
981 901 }
982   -
  902 +
983 903 c.lineTo(dy * 2, h);
984 904 c.lineTo(dy, h - notch);
985 905 c.lineTo(0, h);
986   -
987   - if (rounded == '1')
988   - {
  906 +
  907 + if (rounded == '1') {
989 908 c.lineTo(0, arrowHead / 2 + dy);
990 909 c.arcTo(dy * 2, dy * 2, 0, 0, 1, dy * 2, arrowHead / 2 - dy);
991 910 }
992   - else
993   - {
  911 + else {
994 912 c.lineTo(0, arrowHead / 2 - dy);
995 913 }
996 914
... ... @@ -1003,55 +921,47 @@ mxCellRenderer.registerShape(mxShapeArrows2BendArrow.prototype.cst.BEND_ARROW, m
1003 921
1004 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 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 959 handles.push(handle3);
1049 960
1050 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 965 var constr = [];
1056 966 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
1057 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 982 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h));
1073 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 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 990 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, arrowHead / 2 - dy));
1083 991 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dy * 2, arrowHead / 2 + dy));
1084 992 }
1085   -
  993 +
1086 994 return (constr);
1087 995 };
1088 996
... ... @@ -1092,8 +1000,7 @@ mxShapeArrows2BendArrow.prototype.getConstraints = function(style, w, h)
1092 1000 /**
1093 1001 * Extends mxShape.
1094 1002 */
1095   -function mxShapeArrows2BendDoubleArrow(bounds, fill, stroke, strokewidth)
1096   -{
  1003 +function mxShapeArrows2BendDoubleArrow(bounds, fill, stroke, strokewidth) {
1097 1004 mxShape.call(this);
1098 1005 this.bounds = bounds;
1099 1006 this.fill = fill;
... ... @@ -1111,14 +1018,14 @@ function mxShapeArrows2BendDoubleArrow(bounds, fill, stroke, strokewidth)
1111 1018 mxUtils.extend(mxShapeArrows2BendDoubleArrow, mxActor);
1112 1019
1113 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 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 1033 *
1127 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 1037 c.translate(x, y);
1132 1038
1133 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 1047 c.lineTo(w - dx, arrowHead);
1142 1048 c.lineTo(w - dx, arrowHead / 2 + dy);
1143 1049
1144   - if (rounded == '1')
1145   - {
  1050 + if (rounded == '1') {
1146 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 1055 c.lineTo(arrowHead / 2 + dy, arrowHead / 2 + dy);
1152 1056 }
1153   -
  1057 +
1154 1058 c.lineTo(arrowHead / 2 + dy, h - dx);
1155 1059 c.lineTo(arrowHead, h - dx);
1156 1060 c.lineTo(arrowHead / 2, h);
1157 1061 c.lineTo(0, h - dx);
1158 1062 c.lineTo(arrowHead / 2 - dy, h - dx);
1159   -
1160   - if (rounded == '1')
1161   - {
  1063 +
  1064 + if (rounded == '1') {
1162 1065 c.lineTo(arrowHead / 2 - dy, arrowHead / 2 + dy);
1163 1066 c.arcTo(dy * 2, dy * 2, 0, 0, 1, arrowHead / 2 + dy, arrowHead / 2 - dy);
1164 1067 }
1165   - else
1166   - {
  1068 + else {
1167 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 1078
1177 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 1103 handles.push(handle2);
1207 1104
1208 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 1109 var constr = [];
1214 1110 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
1215 1111 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1216 1112 var arrowHead = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
1217 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 1116 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, arrowHead * 0.5));
1221 1117 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead));
1222 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 1126 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h - dx));
1231 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 1130 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 - dy * 0.414, arrowHead / 2 - dy * 0.414));
1236 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 1134 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 - dy, arrowHead / 2 - dy));
1241 1135 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead / 2 + dy, arrowHead / 2 + dy));
1242 1136 }
1243   -
  1137 +
1244 1138 return (constr);
1245 1139 };
1246 1140
... ... @@ -1250,8 +1144,7 @@ mxShapeArrows2BendDoubleArrow.prototype.getConstraints = function(style, w, h)
1250 1144 /**
1251 1145 * Extends mxShape.
1252 1146 */
1253   -function mxShapeArrows2CalloutDoubleArrow(bounds, fill, stroke, strokewidth)
1254   -{
  1147 +function mxShapeArrows2CalloutDoubleArrow(bounds, fill, stroke, strokewidth) {
1255 1148 mxShape.call(this);
1256 1149 this.bounds = bounds;
1257 1150 this.fill = fill;
... ... @@ -1269,14 +1162,14 @@ function mxShapeArrows2CalloutDoubleArrow(bounds, fill, stroke, strokewidth)
1269 1162 mxUtils.extend(mxShapeArrows2CalloutDoubleArrow, mxActor);
1270 1163
1271 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 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 1177 *
1285 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 1181 c.translate(x, y);
1290 1182
1291 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 1212
1321 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 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 1248 handles.push(handle3);
1364   -
  1249 +
1365 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 1254 var constr = [];
1371 1255 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
1372 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 1273 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 1.5 - dx + notch) * 0.5, h * 0.5 + dy));
1390 1274 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 0.5 + dx - notch) * 0.5, h * 0.5 - dy));
1391 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 1277 return (constr);
1394 1278 };
1395 1279
... ... @@ -1399,8 +1283,7 @@ mxShapeArrows2CalloutDoubleArrow.prototype.getConstraints = function(style, w, h
1399 1283 /**
1400 1284 * Extends mxShape.
1401 1285 */
1402   -function mxShapeArrows2CalloutQuadArrow(bounds, fill, stroke, strokewidth)
1403   -{
  1286 +function mxShapeArrows2CalloutQuadArrow(bounds, fill, stroke, strokewidth) {
1404 1287 mxShape.call(this);
1405 1288 this.bounds = bounds;
1406 1289 this.fill = fill;
... ... @@ -1418,14 +1301,14 @@ function mxShapeArrows2CalloutQuadArrow(bounds, fill, stroke, strokewidth)
1418 1301 mxUtils.extend(mxShapeArrows2CalloutQuadArrow, mxActor);
1419 1302
1420 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 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 1316 *
1434 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 1320 c.translate(x, y);
1439 1321
1440 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 1365
1484 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 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 1401 handles.push(handle3);
1527   -
  1402 +
1528 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 1407 var constr = [];
1534 1408 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
1535 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 1442 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.25 - (notch - dx) * 0.5, h * 0.5 + dy));
1569 1443 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w * 0.5 - dy, h * 0.25 - (notch - dx) * 0.5));
1570 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 1446 return (constr);
1573 1447 };
1574 1448
... ... @@ -1578,8 +1452,7 @@ mxShapeArrows2CalloutQuadArrow.prototype.getConstraints = function(style, w, h)
1578 1452 /**
1579 1453 * Extends mxShape.
1580 1454 */
1581   -function mxShapeArrows2CalloutDouble90Arrow(bounds, fill, stroke, strokewidth)
1582   -{
  1455 +function mxShapeArrows2CalloutDouble90Arrow(bounds, fill, stroke, strokewidth) {
1583 1456 mxShape.call(this);
1584 1457 this.bounds = bounds;
1585 1458 this.fill = fill;
... ... @@ -1598,15 +1471,15 @@ function mxShapeArrows2CalloutDouble90Arrow(bounds, fill, stroke, strokewidth)
1598 1471 mxUtils.extend(mxShapeArrows2CalloutDouble90Arrow, mxActor);
1599 1472
1600 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 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 1487 *
1615 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 1491 c.translate(x, y);
1620 1492
1621 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 1523
1652 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 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 1561 handles.push(handle3);
1697   -
  1562 +
1698 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 1567 var constr = [];
1704 1568 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
1705 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 1586 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2 / 2, h));
1723 1587 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx2 / 2 - dy1 - arrowHead, h - dx1));
1724 1588 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy2));
1725   -
  1589 +
1726 1590 return (constr);
1727 1591 };
1728 1592
... ... @@ -1732,8 +1596,7 @@ mxShapeArrows2CalloutDouble90Arrow.prototype.getConstraints = function(style, w,
1732 1596 /**
1733 1597 * Extends mxShape.
1734 1598 */
1735   -function mxShapeArrows2QuadArrow(bounds, fill, stroke, strokewidth)
1736   -{
  1599 +function mxShapeArrows2QuadArrow(bounds, fill, stroke, strokewidth) {
1737 1600 mxShape.call(this);
1738 1601 this.bounds = bounds;
1739 1602 this.fill = fill;
... ... @@ -1751,13 +1614,13 @@ function mxShapeArrows2QuadArrow(bounds, fill, stroke, strokewidth)
1751 1614 mxUtils.extend(mxShapeArrows2QuadArrow, mxActor);
1752 1615
1753 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 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 1628 *
1766 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 1632 c.translate(x, y);
1771 1633
1772 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 1668
1807 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 1694 handles.push(handle2);
1838   -
  1695 +
1839 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 1700 var constr = [];
1845 1701 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
1846 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 1722 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dx - dy) * 0.5 + w * 0.25, h * 0.5 + dy));
1867 1723 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (dy - dx) * 0.5 + w * 0.75, h * 0.5 - dy));
1868 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 1726 return (constr);
1871 1727 };
1872 1728
... ... @@ -1876,8 +1732,7 @@ mxShapeArrows2QuadArrow.prototype.getConstraints = function(style, w, h)
1876 1732 /**
1877 1733 * Extends mxShape.
1878 1734 */
1879   -function mxShapeArrows2TriadArrow(bounds, fill, stroke, strokewidth)
1880   -{
  1735 +function mxShapeArrows2TriadArrow(bounds, fill, stroke, strokewidth) {
1881 1736 mxShape.call(this);
1882 1737 this.bounds = bounds;
1883 1738 this.fill = fill;
... ... @@ -1894,13 +1749,13 @@ function mxShapeArrows2TriadArrow(bounds, fill, stroke, strokewidth)
1894 1749 mxUtils.extend(mxShapeArrows2TriadArrow, mxActor);
1895 1750
1896 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 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 1763 *
1909 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 1767 c.translate(x, y);
1914 1768
1915 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 1796
1943 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 1822 handles.push(handle2);
1974   -
  1823 +
1975 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 1828 var constr = [];
1981 1829 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
1982 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 1846 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 0.5 + dx - arrowHead * 0.5 + dy) * 0.5, h - dy));
1999 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 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 1850 return (constr);
2003 1851 };
2004 1852
... ... @@ -2008,8 +1856,7 @@ mxShapeArrows2TriadArrow.prototype.getConstraints = function(style, w, h)
2008 1856 /**
2009 1857 * Extends mxShape.
2010 1858 */
2011   -function mxShapeArrows2TailedArrow(bounds, fill, stroke, strokewidth)
2012   -{
  1859 +function mxShapeArrows2TailedArrow(bounds, fill, stroke, strokewidth) {
2013 1860 mxShape.call(this);
2014 1861 this.bounds = bounds;
2015 1862 this.fill = fill;
... ... @@ -2027,16 +1874,16 @@ function mxShapeArrows2TailedArrow(bounds, fill, stroke, strokewidth)
2027 1874 mxUtils.extend(mxShapeArrows2TailedArrow, mxActor);
2028 1875
2029 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 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 1891 *
2045 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 1895 c.translate(x, y);
2050 1896
2051 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 1901 var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
2056 1902 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
2057 1903 var x2 = 0;
2058   -
2059   - if (dy2 != 0)
2060   - {
  1904 +
  1905 + if (dy2 != 0) {
2061 1906 x2 = dx2 + dy2 * (dy2 - dy1) / dy2;
2062 1907 }
2063 1908
... ... @@ -2082,68 +1927,58 @@ mxCellRenderer.registerShape(mxShapeArrows2TailedArrow.prototype.cst.TAILED_ARRO
2082 1927
2083 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 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 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 1976 handles.push(handle4);
2141 1977
2142 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 1982 var constr = [];
2148 1983 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
2149 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 1987 var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
2153 1988 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
2154 1989 var x2 = 0;
2155   -
2156   - if (dy2 != 0)
2157   - {
  1990 +
  1991 + if (dy2 != 0) {
2158 1992 x2 = dx2 + dy2 * (dy2 - dy1) / dy2;
2159 1993 }
2160 1994
... ... @@ -2168,7 +2002,7 @@ mxShapeArrows2TailedArrow.prototype.getConstraints = function(style, w, h)
2168 2002 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1 + x2) * 0.5, h * 0.5 + dy1));
2169 2003 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, h * 0.5 + dy1 + arrowHead));
2170 2004 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
2171   -
  2005 +
2172 2006 return (constr);
2173 2007 };
2174 2008
... ... @@ -2178,8 +2012,7 @@ mxShapeArrows2TailedArrow.prototype.getConstraints = function(style, w, h)
2178 2012 /**
2179 2013 * Extends mxShape.
2180 2014 */
2181   -function mxShapeArrows2TailedNotchedArrow(bounds, fill, stroke, strokewidth)
2182   -{
  2015 +function mxShapeArrows2TailedNotchedArrow(bounds, fill, stroke, strokewidth) {
2183 2016 mxShape.call(this);
2184 2017 this.bounds = bounds;
2185 2018 this.fill = fill;
... ... @@ -2197,16 +2030,16 @@ function mxShapeArrows2TailedNotchedArrow(bounds, fill, stroke, strokewidth)
2197 2030 mxUtils.extend(mxShapeArrows2TailedNotchedArrow, mxActor);
2198 2031
2199 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 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 2047 *
2215 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 2051 c.translate(x, y);
2220 2052
2221 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 2057 var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
2226 2058 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
2227 2059 var x2 = 0;
2228   -
2229   - if (dy2 != 0)
2230   - {
  2060 +
  2061 + if (dy2 != 0) {
2231 2062 x2 = dx2 + notch * (dy2 - dy1) / dy2;
2232 2063 }
2233 2064
... ... @@ -2252,68 +2083,58 @@ mxCellRenderer.registerShape(mxShapeArrows2TailedNotchedArrow.prototype.cst.TAIL
2252 2083
2253 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 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 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 2132 handles.push(handle4);
2311 2133
2312 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 2138 var constr = [];
2318 2139 var dy1 = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
2319 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 2143 var notch = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'notch', this.notch))));
2323 2144 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
2324 2145 var x2 = 0;
2325   -
2326   - if (dy2 != 0)
2327   - {
  2146 +
  2147 + if (dy2 != 0) {
2328 2148 x2 = dx2 + notch * (dy2 - dy1) / dy2;
2329 2149 }
2330 2150
... ... @@ -2338,7 +2158,7 @@ mxShapeArrows2TailedNotchedArrow.prototype.getConstraints = function(style, w, h
2338 2158 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx1 + x2) * 0.5, h * 0.5 + dy1));
2339 2159 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx1, h * 0.5 + dy1 + arrowHead));
2340 2160 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
2341   -
  2161 +
2342 2162 return (constr);
2343 2163 };
2344 2164
... ... @@ -2348,8 +2168,7 @@ mxShapeArrows2TailedNotchedArrow.prototype.getConstraints = function(style, w, h
2348 2168 /**
2349 2169 * Extends mxShape.
2350 2170 */
2351   -function mxShapeArrows2StripedArrow(bounds, fill, stroke, strokewidth)
2352   -{
  2171 +function mxShapeArrows2StripedArrow(bounds, fill, stroke, strokewidth) {
2353 2172 mxShape.call(this);
2354 2173 this.bounds = bounds;
2355 2174 this.fill = fill;
... ... @@ -2366,13 +2185,13 @@ function mxShapeArrows2StripedArrow(bounds, fill, stroke, strokewidth)
2366 2185 mxUtils.extend(mxShapeArrows2StripedArrow, mxActor);
2367 2186
2368 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 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 2199 *
2381 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 2203 c.translate(x, y);
2386 2204
2387 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 2232
2415 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 2254 handles.push(handle2);
2442   -
  2255 +
2443 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 2260 var constr = [];
2449 2261 var dy = h * 0.5 * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
2450 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 2272 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, h));
2461 2273 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, dy));
2462 2274 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.5, h - dy));
2463   -
  2275 +
2464 2276 return (constr);
2465 2277 };
2466 2278
... ... @@ -2470,8 +2282,7 @@ mxShapeArrows2StripedArrow.prototype.getConstraints = function(style, w, h)
2470 2282 /**
2471 2283 * Extends mxShape.
2472 2284 */
2473   -function mxShapeArrows2JumpInArrow(bounds, fill, stroke, strokewidth)
2474   -{
  2285 +function mxShapeArrows2JumpInArrow(bounds, fill, stroke, strokewidth) {
2475 2286 mxShape.call(this);
2476 2287 this.bounds = bounds;
2477 2288 this.fill = fill;
... ... @@ -2488,13 +2299,13 @@ function mxShapeArrows2JumpInArrow(bounds, fill, stroke, strokewidth)
2488 2299 mxUtils.extend(mxShapeArrows2JumpInArrow, mxActor);
2489 2300
2490 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 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 2313 *
2503 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 2317 c.translate(x, y);
2508 2318
2509 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 2335
2526 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 2360 handles.push(handle2);
2556 2361
2557 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 2366 var constr = [];
2563 2367 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
2564 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 2372 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, 0));
2569 2373 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, arrowHead * 0.5));
2570 2374 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w - dx, arrowHead));
2571   -
  2375 +
2572 2376 return (constr);
2573 2377 };
2574 2378
... ... @@ -2578,8 +2382,7 @@ mxShapeArrows2JumpInArrow.prototype.getConstraints = function(style, w, h)
2578 2382 /**
2579 2383 * Extends mxShape.
2580 2384 */
2581   -function mxShapeArrows2UTurnArrow(bounds, fill, stroke, strokewidth)
2582   -{
  2385 +function mxShapeArrows2UTurnArrow(bounds, fill, stroke, strokewidth) {
2583 2386 mxShape.call(this);
2584 2387 this.bounds = bounds;
2585 2388 this.fill = fill;
... ... @@ -2596,13 +2399,13 @@ function mxShapeArrows2UTurnArrow(bounds, fill, stroke, strokewidth)
2596 2399 mxUtils.extend(mxShapeArrows2UTurnArrow, mxActor);
2597 2400
2598 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 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 2413 *
2611 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 2417 c.translate(x, y);
2616 2418
2617 2419 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
2618 2420 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
2619 2421 var dx = (h - arrowHead / 2 + dy) / 2;
2620 2422 var dx2 = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2)));
2621   -
  2423 +
2622 2424 c.begin();
2623 2425 c.moveTo(dx, 0);
2624 2426 c.lineTo(dx + dx2, arrowHead * 0.5);
... ... @@ -2637,65 +2439,57 @@ mxCellRenderer.registerShape(mxShapeArrows2UTurnArrow.prototype.cst.U_TURN_ARROW
2637 2439
2638 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 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 2481 handles.push(handle3);
2687 2482
2688 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 2487 var constr = [];
2694 2488 var dy = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
2695 2489 var arrowHead = Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'arrowHead', this.arrowHead))));
2696 2490 var dx = (h - arrowHead / 2 + dy) / 2;
2697 2491 var dx2 = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2)));
2698   -
  2492 +
2699 2493 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, 0));
2700 2494 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx + dx2, arrowHead * 0.5));
2701 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 2501 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, h));
2708 2502 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, (h + arrowHead * 0.5 - dy) * 0.5));
2709 2503 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, arrowHead - 2 * dy, (h + arrowHead * 0.5 - dy) * 0.5));
2710   -
  2504 +
2711 2505 return (constr);
2712 2506 };
2713 2507
2714 2508 //**********************************************************************************************************************************************************
2715 2509 //Wedge Arrow
2716 2510 //**********************************************************************************************************************************************************
2717   -function mxShapeArrowsWedgeArrow()
2718   -{
  2511 +function mxShapeArrowsWedgeArrow() {
2719 2512 mxArrow.call(this);
2720 2513 };
2721 2514
... ... @@ -2724,11 +2517,10 @@ mxUtils.extend(mxShapeArrowsWedgeArrow, mxArrow);
2724 2517 mxShapeArrowsWedgeArrow.prototype.useSvgBoundingBox = true;
2725 2518
2726 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 2524 var sw = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'startWidth', 20)));
2733 2525
2734 2526 // Base vector (between end points)
... ... @@ -2737,7 +2529,7 @@ mxShapeArrowsWedgeArrow.prototype.paintEdgeShape = function(c, pts)
2737 2529
2738 2530 var dx = pe.x - p0.x;
2739 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 2533 var nx = dx * sw / dist;
2742 2534 var ny = dy * sw / dist;
2743 2535
... ... @@ -2754,8 +2546,7 @@ mxCellRenderer.registerShape('mxgraph.arrows2.wedgeArrow', mxShapeArrowsWedgeArr
2754 2546 //**********************************************************************************************************************************************************
2755 2547 //Wedge Arrow Dashed
2756 2548 //**********************************************************************************************************************************************************
2757   -function mxShapeArrowsWedgeArrowDashed()
2758   -{
  2549 +function mxShapeArrowsWedgeArrowDashed() {
2759 2550 mxArrowConnector.call(this);
2760 2551 };
2761 2552
... ... @@ -2764,11 +2555,10 @@ mxUtils.extend(mxShapeArrowsWedgeArrowDashed, mxArrow);
2764 2555 mxShapeArrowsWedgeArrowDashed.prototype.useSvgBoundingBox = true;
2765 2556
2766 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 2562 var startWidth = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'startWidth', 20)));
2773 2563 var steps = 8;
2774 2564 // Base vector (between end points)
... ... @@ -2777,7 +2567,7 @@ mxShapeArrowsWedgeArrowDashed.prototype.paintEdgeShape = function(c, pts)
2777 2567
2778 2568 var dx = pe.x - p0.x;
2779 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 2571 var nx = dx * startWidth / dist;
2782 2572 var ny = dy * startWidth / dist;
2783 2573 var cnx = nx; // current nx
... ... @@ -2786,30 +2576,28 @@ mxShapeArrowsWedgeArrowDashed.prototype.paintEdgeShape = function(c, pts)
2786 2576 var pcy = p0.y; // current y on edge
2787 2577
2788 2578 c.begin();
2789   -
2790   - for (var i = 0; i <= steps; i++)
2791   - {
  2579 +
  2580 + for (var i = 0; i <= steps; i++) {
2792 2581 cnx = nx * (steps - i) / steps;
2793 2582 cny = ny * (steps - i) / steps;
2794 2583
2795   - if (i == steps)
2796   - {
  2584 + if (i == steps) {
2797 2585 cnx = nx * (steps - i * 0.98) / steps;
2798 2586 cny = ny * (steps - i * 0.98) / steps;
2799 2587 }
2800   -
  2588 +
2801 2589 var px1 = pcx + cny;
2802 2590 var py1 = pcy - cnx;
2803 2591 var px2 = pcx - cny;
2804 2592 var py2 = pcy + cnx;
2805   -
  2593 +
2806 2594 c.moveTo(px1, py1);
2807 2595 c.lineTo(px2, py2);
2808   -
  2596 +
2809 2597 pcx = pcx + dx / steps;
2810 2598 pcy = pcy + dy / steps;
2811   - }
2812   -
  2599 + }
  2600 +
2813 2601 c.stroke();
2814 2602 };
2815 2603
... ... @@ -2818,8 +2606,7 @@ mxCellRenderer.registerShape('mxgraph.arrows2.wedgeArrowDashed', mxShapeArrowsWe
2818 2606 //**********************************************************************************************************************************************************
2819 2607 //Wedge Arrow Dashed v2
2820 2608 //**********************************************************************************************************************************************************
2821   -function mxShapeArrowsWedgeArrowDashed2()
2822   -{
  2609 +function mxShapeArrowsWedgeArrowDashed2() {
2823 2610 mxArrowConnector.call(this);
2824 2611 };
2825 2612
... ... @@ -2828,12 +2615,11 @@ mxUtils.extend(mxShapeArrowsWedgeArrowDashed2, mxArrow);
2828 2615 mxShapeArrowsWedgeArrowDashed2.prototype.useSvgBoundingBox = true;
2829 2616
2830 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 2623 var startWidth = Math.max(0, parseFloat(mxUtils.getValue(this.style, 'startWidth', 20)));
2838 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 2629
2844 2630 var dx = pe.x - p0.x;
2845 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 2633 var nx = dx * startWidth / dist;
2848 2634 var ny = dy * startWidth / dist;
2849 2635 var cnx = nx; // current nx
... ... @@ -2853,30 +2639,28 @@ mxShapeArrowsWedgeArrowDashed2.prototype.paintEdgeShape = function(c, pts)
2853 2639 var steps = Math.floor(dist / stepSize);
2854 2640
2855 2641 c.begin();
2856   -
2857   - for (var i = 0; i <= steps; i++)
2858   - {
  2642 +
  2643 + for (var i = 0; i <= steps; i++) {
2859 2644 cnx = nx * (steps - i) / steps;
2860 2645 cny = ny * (steps - i) / steps;
2861 2646
2862   - if (i == steps)
2863   - {
  2647 + if (i == steps) {
2864 2648 cnx = nx * (steps - i * 0.98) / steps;
2865 2649 cny = ny * (steps - i * 0.98) / steps;
2866 2650 }
2867   -
  2651 +
2868 2652 var px1 = pcx + cny;
2869 2653 var py1 = pcy - cnx;
2870 2654 var px2 = pcx - cny;
2871 2655 var py2 = pcy + cnx;
2872   -
  2656 +
2873 2657 c.moveTo(px1, py1);
2874 2658 c.lineTo(px2, py2);
2875   -
  2659 +
2876 2660 pcx = pcx + dx / steps;
2877 2661 pcy = pcy + dy / steps;
2878   - }
2879   -
  2662 + }
  2663 +
2880 2664 c.stroke();
2881 2665 };
2882 2666
... ...
... ... @@ -8,8 +8,7 @@
8 8 /**
9 9 * Extends mxShape.
10 10 */
11   -function mxShapeBasicCross(bounds, fill, stroke, strokewidth)
12   -{
  11 +function mxShapeBasicCross(bounds, fill, stroke, strokewidth) {
13 12 mxShape.call(this);
14 13 this.bounds = bounds;
15 14 this.fill = fill;
... ... @@ -23,15 +22,14 @@ function mxShapeBasicCross(bounds, fill, stroke, strokewidth)
23 22 */
24 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 28 * Function: paintVertexShape
30 29 *
31 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 33 c.translate(x, y);
36 34
37 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 55
58 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 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 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 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 67 return handles;
73 68 };
74 69
... ... @@ -78,8 +73,7 @@ Graph.handleFactory[mxShapeBasicCross.prototype.cst.CROSS] = function(state)
78 73 /**
79 74 * Extends mxShape.
80 75 */
81   -function mxShapeBasicRectCallout(bounds, fill, stroke, strokewidth)
82   -{
  76 +function mxShapeBasicRectCallout(bounds, fill, stroke, strokewidth) {
83 77 mxShape.call(this);
84 78 this.bounds = bounds;
85 79 this.fill = fill;
... ... @@ -95,19 +89,18 @@ function mxShapeBasicRectCallout(bounds, fill, stroke, strokewidth)
95 89 mxUtils.extend(mxShapeBasicRectCallout, mxActor);
96 90
97 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 99 * Function: paintVertexShape
106 100 *
107 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 104 c.translate(x, y);
112 105
113 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 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 123 return new mxRectangle(0, 0, 0, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy)) * this.scale);
133 124 }
134   -
  125 +
135 126 return null;
136 127 };
137 128
138 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 133 var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
145 134 var dy = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
146 135
147 136 return new mxPoint(bounds.x + dx, bounds.y + bounds.height - dy);
148   - }, function(bounds, pt)
149   - {
  137 + }, function (bounds, pt) {
150 138 var y = parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) * 0.6;
151 139 this.state.style['dx'] = Math.round(100 * Math.max(y, Math.min(bounds.width - y, pt.x - bounds.x))) / 100;
152 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 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 147 var constr = [];
161 148 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
162 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 168 /**
182 169 * Extends mxShape.
183 170 */
184   -function mxShapeBasicRoundRectCallout(bounds, fill, stroke, strokewidth)
185   -{
  171 +function mxShapeBasicRoundRectCallout(bounds, fill, stroke, strokewidth) {
186 172 mxShape.call(this);
187 173 this.bounds = bounds;
188 174 this.fill = fill;
... ... @@ -198,14 +184,14 @@ function mxShapeBasicRoundRectCallout(bounds, fill, stroke, strokewidth)
198 184 */
199 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 189 mxShapeBasicRoundRectCallout.prototype.getLabelMargins = mxShapeBasicRectCallout.prototype.getLabelMargins;
204 190
205 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 199 *
214 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 203 c.translate(x, y);
219 204
220 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 209 r = Math.min((h - dy) / 2, w / 2, r);
225 210 dx = Math.max(r + dy * 0.5, dx);
226 211 dx = Math.min(w - r - dy * 0.5, dx);
227   -
  212 +
228 213 c.begin();
229 214 c.moveTo(dx - dy * 0.5, h - dy);
230 215 c.lineTo(r, h - dy);
... ... @@ -246,33 +231,27 @@ mxCellRenderer.registerShape(mxShapeBasicRoundRectCallout.prototype.cst.ROUND_RE
246 231
247 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 236 var dx = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
254 237 var dy = Math.max(0, Math.min(bounds.height, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
255 238
256 239 return new mxPoint(bounds.x + dx, bounds.y + bounds.height - dy);
257   - }, function(bounds, pt)
258   - {
  240 + }, function (bounds, pt) {
259 241 var y = parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy)) * 0.6;
260 242 this.state.style['dx'] = Math.round(100 * Math.max(y, Math.min(bounds.width - y, pt.x - bounds.x))) / 100;
261 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 245 var size = Math.max(0, Math.min(bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'size', this.size))));
265 246
266 247 return new mxPoint(bounds.x + bounds.width - size, bounds.y + 10);
267   - }, function(bounds, pt)
268   - {
  248 + }, function (bounds, pt) {
269 249 var dy = parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy));
270 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 255 var constr = [];
277 256 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
278 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 260 r = Math.min((h - dy) / 2, w / 2, r);
282 261 dx = Math.max(r + dy * 0.5, dx);
283 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 265 constr.push(new mxConnectionConstraint(new mxPoint(0.25, 0), false));
288 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 270 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h - dy) * 0.25));
294 271 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, (h - dy) * 0.75));
295 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 291 /**
315 292 * Extends mxShape.
316 293 */
317   -function mxShapeBasicWave(bounds, fill, stroke, strokewidth)
318   -{
  294 +function mxShapeBasicWave(bounds, fill, stroke, strokewidth) {
319 295 mxShape.call(this);
320 296 this.bounds = bounds;
321 297 this.fill = fill;
... ... @@ -330,23 +306,22 @@ function mxShapeBasicWave(bounds, fill, stroke, strokewidth)
330 306 mxUtils.extend(mxShapeBasicWave, mxActor);
331 307
332 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 315 * Function: paintVertexShape
340 316 *
341 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 320 c.translate(x, y);
346 321
347 322 var dy = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
348 323 var fy = 1.4
349   -
  324 +
350 325 c.begin();
351 326 c.moveTo(0, dy / 2);
352 327 c.quadTo(w / 6, dy * (1 - fy), w / 3, dy / 2);
... ... @@ -364,27 +339,23 @@ mxCellRenderer.registerShape(mxShapeBasicWave.prototype.cst.WAVE, mxShapeBasicWa
364 339
365 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 344 var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
372 345
373 346 return new mxPoint(bounds.x + bounds.width / 2, bounds.y + dy * bounds.height);
374   - }, function(bounds, pt)
375   - {
  347 + }, function (bounds, pt) {
376 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 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 355 var constr = [];
385 356 var dy = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
386 357 var fy = 1.4
387   -
  358 +
388 359 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, dy * 0.5));
389 360 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w / 6, h * 0.015));
390 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 382 /**
412 383 * Extends mxShape.
413 384 */
414   -function mxShapeBasicOctagon(bounds, fill, stroke, strokewidth)
415   -{
  385 +function mxShapeBasicOctagon(bounds, fill, stroke, strokewidth) {
416 386 mxShape.call(this);
417 387 this.bounds = bounds;
418 388 this.fill = fill;
... ... @@ -427,24 +397,23 @@ function mxShapeBasicOctagon(bounds, fill, stroke, strokewidth)
427 397 mxUtils.extend(mxShapeBasicOctagon, mxActor);
428 398
429 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 406 * Function: paintVertexShape
437 407 *
438 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 411 c.translate(x, y);
443 412
444 413 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
445 414
446 415 dx = Math.min(w * 0.5, h * 0.5, dx);
447   -
  416 +
448 417 c.begin();
449 418 c.moveTo(dx, 0);
450 419 c.lineTo(w - dx, 0);
... ... @@ -462,28 +431,24 @@ mxCellRenderer.registerShape(mxShapeBasicOctagon.prototype.cst.OCTAGON, mxShapeB
462 431
463 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 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 438 return new mxPoint(bounds.x + dx, bounds.y + dx);
472   - }, function(bounds, pt)
473   - {
  439 + }, function (bounds, pt) {
474 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 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 447 var constr = [];
483 448 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
484 449
485 450 dx = Math.min(w * 0.5, h * 0.5, dx) * 0.5;
486   -
  451 +
487 452 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
488 453 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));
489 454 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
... ... @@ -502,8 +467,7 @@ mxShapeBasicOctagon.prototype.getConstraints = function(style, w, h)
502 467 /**
503 468 * Extends mxShape.
504 469 */
505   -function mxShapeBasicIsoCube(bounds, fill, stroke, strokewidth)
506   -{
  470 +function mxShapeBasicIsoCube(bounds, fill, stroke, strokewidth) {
507 471 mxShape.call(this);
508 472 this.bounds = bounds;
509 473 this.fill = fill;
... ... @@ -518,23 +482,22 @@ function mxShapeBasicIsoCube(bounds, fill, stroke, strokewidth)
518 482 mxUtils.extend(mxShapeBasicIsoCube, mxActor);
519 483
520 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 491 * Function: paintVertexShape
528 492 *
529 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 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 499 var isoH = Math.min(w * Math.tan(isoAngle), h * 0.5);
537   -
  500 +
538 501 c.begin();
539 502 c.moveTo(w * 0.5, 0);
540 503 c.lineTo(w, isoH);
... ... @@ -546,7 +509,7 @@ mxShapeBasicIsoCube.prototype.paintVertexShape = function(c, x, y, w, h)
546 509 c.fillAndStroke();
547 510
548 511 c.setShadow(false);
549   -
  512 +
550 513 c.begin();
551 514 c.moveTo(0, isoH);
552 515 c.lineTo(w * 0.5, 2 * isoH);
... ... @@ -560,28 +523,24 @@ mxCellRenderer.registerShape(mxShapeBasicIsoCube.prototype.cst.ISO_CUBE, mxShape
560 523
561 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 529 var isoH = Math.min(bounds.width * Math.tan(isoAngle), bounds.height * 0.5);
569 530
570 531 return new mxPoint(bounds.x, bounds.y + isoH);
571   - }, function(bounds, pt)
572   - {
  532 + }, function (bounds, pt) {
573 533 this.state.style['isoAngle'] = Math.round(100 * Math.max(0, Math.min(100, pt.y - bounds.y))) / 100;
574 534 })];
575   -
  535 +
576 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 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 542 var isoH = Math.min(w * Math.tan(isoAngle), h * 0.5);
584   -
  543 +
585 544 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
586 545 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, isoH));
587 546 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false));
... ... @@ -600,8 +559,7 @@ mxShapeBasicIsoCube.prototype.getConstraints = function(style, w, h)
600 559 /**
601 560 * Extends mxShape.
602 561 */
603   -function mxShapeBasicTriangleAcute(bounds, fill, stroke, strokewidth)
604   -{
  562 +function mxShapeBasicTriangleAcute(bounds, fill, stroke, strokewidth) {
605 563 mxShape.call(this);
606 564 this.bounds = bounds;
607 565 this.fill = fill;
... ... @@ -616,22 +574,21 @@ function mxShapeBasicTriangleAcute(bounds, fill, stroke, strokewidth)
616 574 mxUtils.extend(mxShapeBasicTriangleAcute, mxActor);
617 575
618 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 583 * Function: paintVertexShape
626 584 *
627 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 588 c.translate(x, y);
632 589
633 590 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
634   -
  591 +
635 592 c.begin();
636 593 c.moveTo(0, h);
637 594 c.lineTo(dx, 0);
... ... @@ -644,26 +601,22 @@ mxCellRenderer.registerShape(mxShapeBasicTriangleAcute.prototype.cst.ACUTE_TRIAN
644 601
645 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 606 var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
652 607
653 608 return new mxPoint(bounds.x + dx * bounds.width, bounds.y + 10);
654   - }, function(bounds, pt)
655   - {
  609 + }, function (bounds, pt) {
656 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 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 617 var constr = [];
665 618 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
666   -
  619 +
667 620 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));
668 621 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 1), false));
669 622 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));
... ... @@ -680,8 +633,7 @@ mxShapeBasicTriangleAcute.prototype.getConstraints = function(style, w, h)
680 633 /**
681 634 * Extends mxShape.
682 635 */
683   -function mxShapeBasicTriangleObtuse(bounds, fill, stroke, strokewidth)
684   -{
  636 +function mxShapeBasicTriangleObtuse(bounds, fill, stroke, strokewidth) {
685 637 mxShape.call(this);
686 638 this.bounds = bounds;
687 639 this.fill = fill;
... ... @@ -696,22 +648,21 @@ function mxShapeBasicTriangleObtuse(bounds, fill, stroke, strokewidth)
696 648 mxUtils.extend(mxShapeBasicTriangleObtuse, mxActor);
697 649
698 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 657 * Function: paintVertexShape
706 658 *
707 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 662 c.translate(x, y);
712 663
713 664 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
714   -
  665 +
715 666 c.begin();
716 667 c.moveTo(dx, h);
717 668 c.lineTo(0, 0);
... ... @@ -724,26 +675,22 @@ mxCellRenderer.registerShape(mxShapeBasicTriangleObtuse.prototype.cst.OBTUSE_TRI
724 675
725 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 680 var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
732 681
733 682 return new mxPoint(bounds.x + dx * bounds.width, bounds.y + bounds.height - 10);
734   - }, function(bounds, pt)
735   - {
  683 + }, function (bounds, pt) {
736 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 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 691 var constr = [];
745 692 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
746   -
  693 +
747 694 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
748 695 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false));
749 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 707 /**
761 708 * Extends mxShape.
762 709 */
763   -function mxShapeBasicDrop(bounds, fill, stroke, strokewidth)
764   -{
  710 +function mxShapeBasicDrop(bounds, fill, stroke, strokewidth) {
765 711 mxShape.call(this);
766 712 this.bounds = bounds;
767 713 this.fill = fill;
... ... @@ -774,26 +720,25 @@ function mxShapeBasicDrop(bounds, fill, stroke, strokewidth)
774 720 */
775 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 726 * Function: paintVertexShape
781 727 *
782 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 731 c.translate(x, y);
787 732
788 733 var r = Math.min(h, w) * 0.5;
789 734 var d = h - r;
790 735 var a = Math.sqrt(d * d - r * r);
791   -
  736 +
792 737 var angle = Math.atan(a / r);
793   -
  738 +
794 739 var x1 = r * Math.sin(angle);
795 740 var y1 = r * Math.cos(angle);
796   -
  741 +
797 742 c.begin();
798 743 c.moveTo(w * 0.5, 0);
799 744 c.lineTo(w * 0.5 + x1, h - r - y1);
... ... @@ -815,8 +760,7 @@ mxShapeBasicDrop.prototype.constraints = null;
815 760 /**
816 761 * Extends mxShape.
817 762 */
818   -function mxShapeBasicCone2(bounds, fill, stroke, strokewidth)
819   -{
  763 +function mxShapeBasicCone2(bounds, fill, stroke, strokewidth) {
820 764 mxShape.call(this);
821 765 this.bounds = bounds;
822 766 this.fill = fill;
... ... @@ -832,41 +776,38 @@ function mxShapeBasicCone2(bounds, fill, stroke, strokewidth)
832 776 mxUtils.extend(mxShapeBasicCone2, mxActor);
833 777
834 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 786 * Function: paintVertexShape
843 787 *
844 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 791 c.translate(x, y);
849 792
850 793 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
851 794 var dy = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
852   -
  795 +
853 796 var ry = h - dy;
854   -
  797 +
855 798 c.begin();
856 799 c.moveTo(dx, 0);
857   -
858   - if (ry > 0)
859   - {
  800 +
  801 + if (ry > 0) {
860 802 c.lineTo(w, h - ry);
861 803 c.arcTo(w * 0.5, ry, 0, 0, 1, w * 0.5, h);
862 804 c.arcTo(w * 0.5, ry, 0, 0, 1, 0, h - ry);
863 805 }
864   - else
865   - {
  806 + else {
866 807 c.lineTo(w, h);
867 808 c.lineTo(0, h);
868 809 }
869   -
  810 +
870 811 c.close();
871 812 c.fillAndStroke();
872 813 };
... ... @@ -875,40 +816,34 @@ mxCellRenderer.registerShape(mxShapeBasicCone2.prototype.cst.CONE2, mxShapeBasic
875 816
876 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 821 var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
883 822
884 823 return new mxPoint(bounds.x + dx * bounds.width, bounds.y + 10);
885   - }, function(bounds, pt)
886   - {
  824 + }, function (bounds, pt) {
887 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 829 var dy = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
893 830
894 831 return new mxPoint(bounds.x + 10, bounds.y + dy * bounds.height);
895   - }, function(bounds, pt)
896   - {
  832 + }, function (bounds, pt) {
897 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 836 handles.push(handle2);
901   -
  837 +
902 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 842 var constr = [];
908 843 var dx = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
909 844 var dy = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy', this.dy))));
910 845 var ry = h - dy;
911   -
  846 +
912 847 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, 0));
913 848 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, w, h - ry));
914 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 858 /**
924 859 * Extends mxShape.
925 860 */
926   -function mxShapeBasicPyramid(bounds, fill, stroke, strokewidth)
927   -{
  861 +function mxShapeBasicPyramid(bounds, fill, stroke, strokewidth) {
928 862 mxShape.call(this);
929 863 this.bounds = bounds;
930 864 this.fill = fill;
... ... @@ -942,28 +876,27 @@ function mxShapeBasicPyramid(bounds, fill, stroke, strokewidth)
942 876 mxUtils.extend(mxShapeBasicPyramid, mxActor);
943 877
944 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 888 * Function: paintVertexShape
955 889 *
956 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 893 c.translate(x, y);
961 894
962 895 var dx1 = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
963 896 var dx2 = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))));
964 897 var dy1 = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
965 898 var dy2 = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy2', this.dy2))));
966   -
  899 +
967 900 c.begin();
968 901 c.moveTo(dx1, 0);
969 902 c.lineTo(w, dy2);
... ... @@ -971,9 +904,9 @@ mxShapeBasicPyramid.prototype.paintVertexShape = function(c, x, y, w, h)
971 904 c.lineTo(0, dy1);
972 905 c.close();
973 906 c.fillAndStroke();
974   -
  907 +
975 908 c.setShadow(false);
976   -
  909 +
977 910 c.begin();
978 911 c.moveTo(dx1, 0);
979 912 c.lineTo(dx2, h);
... ... @@ -984,65 +917,55 @@ mxCellRenderer.registerShape(mxShapeBasicPyramid.prototype.cst.PYRAMID, mxShapeB
984 917
985 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 922 var dx1 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx1', this.dx1))));
992 923
993 924 return new mxPoint(bounds.x + dx1 * bounds.width, bounds.y + 10);
994   - }, function(bounds, pt)
995   - {
  925 + }, function (bounds, pt) {
996 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 930 var dx2 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx2', this.dx2))));
1002 931
1003 932 return new mxPoint(bounds.x + dx2 * bounds.width, bounds.y + bounds.height - 10);
1004   - }, function(bounds, pt)
1005   - {
  933 + }, function (bounds, pt) {
1006 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 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 940 var dy1 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy1', this.dy1))));
1014 941
1015 942 return new mxPoint(bounds.x + 10, bounds.y + dy1 * bounds.height);
1016   - }, function(bounds, pt)
1017   - {
  943 + }, function (bounds, pt) {
1018 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 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 950 var dy2 = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dy2', this.dy2))));
1026 951
1027 952 return new mxPoint(bounds.x + bounds.width - 10, bounds.y + dy2 * bounds.height);
1028   - }, function(bounds, pt)
1029   - {
  953 + }, function (bounds, pt) {
1030 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 957 handles.push(handle4);
1034   -
  958 +
1035 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 963 var constr = [];
1041 964 var dx1 = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx1', this.dx1))));
1042 965 var dx2 = w * Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx2', this.dx2))));
1043 966 var dy1 = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy1', this.dy1))));
1044 967 var dy2 = h * Math.max(0, Math.min(h, parseFloat(mxUtils.getValue(this.style, 'dy2', this.dy2))));
1045   -
  968 +
1046 969 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx1, 0));
1047 970 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w + dx1) * 0.5, dy2 * 0.5));
1048 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 984 /**
1062 985 * Extends mxShape.
1063 986 */
1064   -function mxShapeBasic4PointStar2(bounds, fill, stroke, strokewidth)
1065   -{
  987 +function mxShapeBasic4PointStar2(bounds, fill, stroke, strokewidth) {
1066 988 mxShape.call(this);
1067 989 this.bounds = bounds;
1068 990 this.fill = fill;
... ... @@ -1077,18 +999,17 @@ function mxShapeBasic4PointStar2(bounds, fill, stroke, strokewidth)
1077 999 mxUtils.extend(mxShapeBasic4PointStar2, mxActor);
1078 1000
1079 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 1008 * Function: paintVertexShape
1087 1009 *
1088 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 1013 c.translate(x, y);
1093 1014
1094 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 1031
1111 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 1036 var dx = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
1118 1037
1119 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 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 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 1047 var constr = [];
1131 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 1065 /**
1149 1066 * Extends mxShape.
1150 1067 */
1151   -function mxShapeBasicDiagSnipRect(bounds, fill, stroke, strokewidth)
1152   -{
  1068 +function mxShapeBasicDiagSnipRect(bounds, fill, stroke, strokewidth) {
1153 1069 mxShape.call(this);
1154 1070 this.bounds = bounds;
1155 1071 this.fill = fill;
... ... @@ -1164,24 +1080,23 @@ function mxShapeBasicDiagSnipRect(bounds, fill, stroke, strokewidth)
1164 1080 mxUtils.extend(mxShapeBasicDiagSnipRect, mxActor);
1165 1081
1166 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 1089 * Function: paintVertexShape
1174 1090 *
1175 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 1094 c.translate(x, y);
1180 1095
1181 1096 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
1182 1097
1183 1098 dx = Math.min(w * 0.5, h * 0.5, dx);
1184   -
  1099 +
1185 1100 c.begin();
1186 1101 c.moveTo(dx, 0);
1187 1102 c.lineTo(w, 0);
... ... @@ -1197,23 +1112,19 @@ mxCellRenderer.registerShape(mxShapeBasicDiagSnipRect.prototype.cst.DIAG_SNIP_RE
1197 1112
1198 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 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 1119 return new mxPoint(bounds.x + dx, bounds.y + dx);
1207   - }, function(bounds, pt)
1208   - {
  1120 + }, function (bounds, pt) {
1209 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 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 1128 var constr = [];
1218 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 1148 /**
1238 1149 * Extends mxShape.
1239 1150 */
1240   -function mxShapeBasicDiagRoundRect(bounds, fill, stroke, strokewidth)
1241   -{
  1151 +function mxShapeBasicDiagRoundRect(bounds, fill, stroke, strokewidth) {
1242 1152 mxShape.call(this);
1243 1153 this.bounds = bounds;
1244 1154 this.fill = fill;
... ... @@ -1253,24 +1163,23 @@ function mxShapeBasicDiagRoundRect(bounds, fill, stroke, strokewidth)
1253 1163 mxUtils.extend(mxShapeBasicDiagRoundRect, mxActor);
1254 1164
1255 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 1172 * Function: paintVertexShape
1263 1173 *
1264 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 1177 c.translate(x, y);
1269 1178
1270 1179 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
1271 1180
1272 1181 dx = Math.min(w * 0.5, h * 0.5, dx);
1273   -
  1182 +
1274 1183 c.begin();
1275 1184 c.moveTo(dx, 0);
1276 1185 c.lineTo(w, 0);
... ... @@ -1287,23 +1196,19 @@ mxCellRenderer.registerShape(mxShapeBasicDiagRoundRect.prototype.cst.DIAG_ROUND_
1287 1196
1288 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 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 1203 return new mxPoint(bounds.x + dx, bounds.y + dx);
1297   - }, function(bounds, pt)
1298   - {
  1204 + }, function (bounds, pt) {
1299 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 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 1212 var constr = [];
1308 1213
1309 1214 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
... ... @@ -1322,8 +1227,7 @@ mxShapeBasicDiagRoundRect.prototype.getConstraints = function(style, w, h)
1322 1227 /**
1323 1228 * Extends mxShape.
1324 1229 */
1325   -function mxShapeBasicCornerRoundRect(bounds, fill, stroke, strokewidth)
1326   -{
  1230 +function mxShapeBasicCornerRoundRect(bounds, fill, stroke, strokewidth) {
1327 1231 mxShape.call(this);
1328 1232 this.bounds = bounds;
1329 1233 this.fill = fill;
... ... @@ -1338,24 +1242,23 @@ function mxShapeBasicCornerRoundRect(bounds, fill, stroke, strokewidth)
1338 1242 mxUtils.extend(mxShapeBasicCornerRoundRect, mxActor);
1339 1243
1340 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 1251 * Function: paintVertexShape
1348 1252 *
1349 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 1256 c.translate(x, y);
1354 1257
1355 1258 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
1356 1259
1357 1260 dx = Math.min(w * 0.5, h * 0.5, dx);
1358   -
  1261 +
1359 1262 c.begin();
1360 1263 c.moveTo(dx, 0);
1361 1264 c.lineTo(w, 0);
... ... @@ -1371,23 +1274,19 @@ mxCellRenderer.registerShape(mxShapeBasicCornerRoundRect.prototype.cst.CORNER_RO
1371 1274
1372 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 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 1281 return new mxPoint(bounds.x + dx, bounds.y + dx);
1381   - }, function(bounds, pt)
1382   - {
  1282 + }, function (bounds, pt) {
1383 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 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 1290 var constr = [];
1392 1291
1393 1292 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
... ... @@ -1407,8 +1306,7 @@ mxShapeBasicCornerRoundRect.prototype.getConstraints = function(style, w, h)
1407 1306 /**
1408 1307 * Extends mxShape.
1409 1308 */
1410   -function mxShapeBasicPlaque(bounds, fill, stroke, strokewidth)
1411   -{
  1309 +function mxShapeBasicPlaque(bounds, fill, stroke, strokewidth) {
1412 1310 mxShape.call(this);
1413 1311 this.bounds = bounds;
1414 1312 this.fill = fill;
... ... @@ -1423,24 +1321,23 @@ function mxShapeBasicPlaque(bounds, fill, stroke, strokewidth)
1423 1321 mxUtils.extend(mxShapeBasicPlaque, mxActor);
1424 1322
1425 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 1330 * Function: paintVertexShape
1433 1331 *
1434 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 1335 c.translate(x, y);
1439 1336
1440 1337 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
1441 1338
1442 1339 dx = Math.min(w * 0.5, h * 0.5, dx);
1443   -
  1340 +
1444 1341 c.begin();
1445 1342 c.moveTo(w - dx, 0);
1446 1343 c.arcTo(dx, dx, 0, 0, 0, w, dx);
... ... @@ -1458,23 +1355,19 @@ mxCellRenderer.registerShape(mxShapeBasicPlaque.prototype.cst.PLAQUE, mxShapeBas
1458 1355
1459 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 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 1362 return new mxPoint(bounds.x + dx * 1.41, bounds.y + dx * 1.41);
1468   - }, function(bounds, pt)
1469   - {
  1363 + }, function (bounds, pt) {
1470 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 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 1371 var constr = [];
1479 1372
1480 1373 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
... ... @@ -1491,8 +1384,7 @@ mxShapeBasicPlaque.prototype.getConstraints = function(style, w, h)
1491 1384 /**
1492 1385 * Extends mxShape.
1493 1386 */
1494   -function mxShapeBasicFrame(bounds, fill, stroke, strokewidth)
1495   -{
  1387 +function mxShapeBasicFrame(bounds, fill, stroke, strokewidth) {
1496 1388 mxShape.call(this);
1497 1389 this.bounds = bounds;
1498 1390 this.fill = fill;
... ... @@ -1507,24 +1399,23 @@ function mxShapeBasicFrame(bounds, fill, stroke, strokewidth)
1507 1399 mxUtils.extend(mxShapeBasicFrame, mxActor);
1508 1400
1509 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 1408 * Function: paintVertexShape
1517 1409 *
1518 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 1413 c.translate(x, y);
1523 1414
1524 1415 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1525 1416
1526 1417 dx = Math.min(w * 0.5, h * 0.5, dx);
1527   -
  1418 +
1528 1419 c.begin();
1529 1420 c.moveTo(w, 0);
1530 1421 c.lineTo(w, h);
... ... @@ -1543,23 +1434,19 @@ mxCellRenderer.registerShape(mxShapeBasicFrame.prototype.cst.FRAME, mxShapeBasic
1543 1434
1544 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 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 1441 return new mxPoint(bounds.x + dx, bounds.y + dx);
1553   - }, function(bounds, pt)
1554   - {
  1442 + }, function (bounds, pt) {
1555 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 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 1450 var constr = [];
1564 1451 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1565 1452 dx = Math.min(w * 0.5, h * 0.5, dx);
... ... @@ -1581,17 +1468,17 @@ mxShapeBasicFrame.prototype.getConstraints = function(style, w, h)
1581 1468 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5), false));
1582 1469 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, 0, h * 0.25));
1583 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 1472 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false, null, 0, dx));
1586 1473 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w * 1.5 - dx) * 0.5, dx));
1587 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 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 1478 constr.push(new mxConnectionConstraint(new mxPoint(1, 1), false, null, -dx, -dx));
1592 1479 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - 2 * dx) * 0.75 + dx, h - dx));
1593 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 1482 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false, null, dx, -dx));
1596 1483 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, dx, (h - 2 * dx) * 0.75 + dx));
1597 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 1493 /**
1607 1494 * Extends mxShape.
1608 1495 */
1609   -function mxShapeBasicPlaqueFrame(bounds, fill, stroke, strokewidth)
1610   -{
  1496 +function mxShapeBasicPlaqueFrame(bounds, fill, stroke, strokewidth) {
1611 1497 mxShape.call(this);
1612 1498 this.bounds = bounds;
1613 1499 this.fill = fill;
... ... @@ -1621,24 +1507,23 @@ function mxShapeBasicPlaqueFrame(bounds, fill, stroke, strokewidth)
1621 1507 mxUtils.extend(mxShapeBasicPlaqueFrame, mxActor);
1622 1508
1623 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 1516 * Function: paintVertexShape
1631 1517 *
1632 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 1521 c.translate(x, y);
1637 1522
1638 1523 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1639 1524
1640 1525 dx = Math.min(w * 0.25, h * 0.25, dx);
1641   -
  1526 +
1642 1527 c.begin();
1643 1528 c.moveTo(w - dx, 0);
1644 1529 c.arcTo(dx, dx, 0, 0, 0, w, dx);
... ... @@ -1649,7 +1534,7 @@ mxShapeBasicPlaqueFrame.prototype.paintVertexShape = function(c, x, y, w, h)
1649 1534 c.lineTo(0, dx);
1650 1535 c.arcTo(dx, dx, 0, 0, 0, dx, 0);
1651 1536 c.close();
1652   -
  1537 +
1653 1538 c.moveTo(dx * 2, dx);
1654 1539 c.arcTo(dx * 2, dx * 2, 0, 0, 1, dx, dx * 2);
1655 1540 c.lineTo(dx, h - 2 * dx);
... ... @@ -1668,23 +1553,19 @@ mxCellRenderer.registerShape(mxShapeBasicPlaqueFrame.prototype.cst.PLAQUE_FRAME,
1668 1553
1669 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 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 1560 return new mxPoint(bounds.x + dx, bounds.y + dx);
1678   - }, function(bounds, pt)
1679   - {
  1561 + }, function (bounds, pt) {
1680 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 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 1569 var constr = [];
1689 1570 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1690 1571 dx = Math.min(w * 0.5, h * 0.5, dx);
... ... @@ -1707,8 +1588,7 @@ mxShapeBasicPlaqueFrame.prototype.getConstraints = function(style, w, h)
1707 1588 /**
1708 1589 * Extends mxShape.
1709 1590 */
1710   -function mxShapeBasicRoundedFrame(bounds, fill, stroke, strokewidth)
1711   -{
  1591 +function mxShapeBasicRoundedFrame(bounds, fill, stroke, strokewidth) {
1712 1592 mxShape.call(this);
1713 1593 this.bounds = bounds;
1714 1594 this.fill = fill;
... ... @@ -1723,24 +1603,23 @@ function mxShapeBasicRoundedFrame(bounds, fill, stroke, strokewidth)
1723 1603 mxUtils.extend(mxShapeBasicRoundedFrame, mxActor);
1724 1604
1725 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 1612 * Function: paintVertexShape
1733 1613 *
1734 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 1617 c.translate(x, y);
1739 1618
1740 1619 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1741 1620
1742 1621 dx = Math.min(w * 0.25, h * 0.25, dx);
1743   -
  1622 +
1744 1623 c.begin();
1745 1624 c.moveTo(w - 2 * dx, 0);
1746 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 1630 c.lineTo(0, 2 * dx);
1752 1631 c.arcTo(dx * 2, dx * 2, 0, 0, 1, 2 * dx, 0);
1753 1632 c.close();
1754   -
  1633 +
1755 1634 c.moveTo(dx * 2, dx);
1756 1635 c.arcTo(dx, dx, 0, 0, 0, dx, dx * 2);
1757 1636 c.lineTo(dx, h - 2 * dx);
... ... @@ -1770,23 +1649,19 @@ mxCellRenderer.registerShape(mxShapeBasicRoundedFrame.prototype.cst.ROUNDED_FRAM
1770 1649
1771 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 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 1656 return new mxPoint(bounds.x + dx, bounds.y + dx);
1780   - }, function(bounds, pt)
1781   - {
  1657 + }, function (bounds, pt) {
1782 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 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 1665 var constr = [];
1791 1666 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1792 1667 dx = Math.min(w * 0.5, h * 0.5, dx);
... ... @@ -1809,8 +1684,7 @@ mxShapeBasicRoundedFrame.prototype.getConstraints = function(style, w, h)
1809 1684 /**
1810 1685 * Extends mxShape.
1811 1686 */
1812   -function mxShapeBasicFrameCorner(bounds, fill, stroke, strokewidth)
1813   -{
  1687 +function mxShapeBasicFrameCorner(bounds, fill, stroke, strokewidth) {
1814 1688 mxShape.call(this);
1815 1689 this.bounds = bounds;
1816 1690 this.fill = fill;
... ... @@ -1825,24 +1699,23 @@ function mxShapeBasicFrameCorner(bounds, fill, stroke, strokewidth)
1825 1699 mxUtils.extend(mxShapeBasicFrameCorner, mxActor);
1826 1700
1827 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 1708 * Function: paintVertexShape
1835 1709 *
1836 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 1713 c.translate(x, y);
1841 1714
1842 1715 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1843 1716
1844 1717 dx = Math.min(w * 0.5, h * 0.5, dx);
1845   -
  1718 +
1846 1719 c.begin();
1847 1720 c.moveTo(0, 0);
1848 1721 c.lineTo(w, 0);
... ... @@ -1858,28 +1731,24 @@ mxCellRenderer.registerShape(mxShapeBasicFrameCorner.prototype.cst.FRAME_CORNER,
1858 1731
1859 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 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 1738 return new mxPoint(bounds.x + dx, bounds.y + dx);
1868   - }, function(bounds, pt)
1869   - {
  1739 + }, function (bounds, pt) {
1870 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 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 1747 var constr = [];
1879 1748 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1880 1749
1881 1750 dx = Math.min(w * 0.5, h * 0.5, dx);
1882   -
  1751 +
1883 1752 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
1884 1753 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
1885 1754 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));
... ... @@ -1900,8 +1769,7 @@ mxShapeBasicFrameCorner.prototype.getConstraints = function(style, w, h)
1900 1769 /**
1901 1770 * Extends mxShape.
1902 1771 */
1903   -function mxShapeBasicDiagStripe(bounds, fill, stroke, strokewidth)
1904   -{
  1772 +function mxShapeBasicDiagStripe(bounds, fill, stroke, strokewidth) {
1905 1773 mxShape.call(this);
1906 1774 this.bounds = bounds;
1907 1775 this.fill = fill;
... ... @@ -1916,24 +1784,23 @@ function mxShapeBasicDiagStripe(bounds, fill, stroke, strokewidth)
1916 1784 mxUtils.extend(mxShapeBasicDiagStripe, mxActor);
1917 1785
1918 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 1793 * Function: paintVertexShape
1926 1794 *
1927 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 1798 c.translate(x, y);
1932 1799
1933 1800 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1934 1801
1935 1802 dx = Math.min(w, h, dx);
1936   -
  1803 +
1937 1804 c.begin();
1938 1805 c.moveTo(0, h);
1939 1806 c.lineTo(w, 0);
... ... @@ -1947,27 +1814,23 @@ mxCellRenderer.registerShape(mxShapeBasicDiagStripe.prototype.cst.DIAG_STRIPE, m
1947 1814
1948 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 1819 var dx = Math.max(0, Math.min(bounds.width / 2, parseFloat(mxUtils.getValue(this.state.style, 'dx', this.dx))));
1955 1820
1956 1821 return new mxPoint(bounds.x + dx, bounds.y + bounds.height);
1957   - }, function(bounds, pt)
1958   - {
  1822 + }, function (bounds, pt) {
1959 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 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 1830 var constr = [];
1968 1831 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
1969 1832 dx = Math.min(w, h, dx);
1970   -
  1833 +
1971 1834 constr.push(new mxConnectionConstraint(new mxPoint(0, 1), false));
1972 1835 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0.5), false));
1973 1836 constr.push(new mxConnectionConstraint(new mxPoint(1, 0), false));
... ... @@ -1986,8 +1849,7 @@ mxShapeBasicDiagStripe.prototype.getConstraints = function(style, w, h)
1986 1849 /**
1987 1850 * Extends mxShape.
1988 1851 */
1989   -function mxShapeBasicDonut(bounds, fill, stroke, strokewidth)
1990   -{
  1852 +function mxShapeBasicDonut(bounds, fill, stroke, strokewidth) {
1991 1853 mxShape.call(this);
1992 1854 this.bounds = bounds;
1993 1855 this.fill = fill;
... ... @@ -2002,24 +1864,23 @@ function mxShapeBasicDonut(bounds, fill, stroke, strokewidth)
2002 1864 mxUtils.extend(mxShapeBasicDonut, mxActor);
2003 1865
2004 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 1873 * Function: paintVertexShape
2012 1874 *
2013 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 1878 c.translate(x, y);
2018 1879
2019 1880 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
2020 1881
2021 1882 dx = Math.min(w * 0.5, h * 0.5, dx);
2022   -
  1883 +
2023 1884 c.begin();
2024 1885 c.moveTo(0, h * 0.5);
2025 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 1901
2041 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 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 1908 return new mxPoint(bounds.x + dx, bounds.y + bounds.height / 2);
2050   - }, function(bounds, pt)
2051   - {
  1909 + }, function (bounds, pt) {
2052 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 1913 return handles;
2056 1914 };
2057 1915
... ... @@ -2061,8 +1919,7 @@ Graph.handleFactory[mxShapeBasicDonut.prototype.cst.DONUT] = function(state)
2061 1919 /**
2062 1920 * Extends mxShape.
2063 1921 */
2064   -function mxShapeBasicLayeredRect(bounds, fill, stroke, strokewidth)
2065   -{
  1922 +function mxShapeBasicLayeredRect(bounds, fill, stroke, strokewidth) {
2066 1923 mxShape.call(this);
2067 1924 this.bounds = bounds;
2068 1925 this.fill = fill;
... ... @@ -2077,24 +1934,23 @@ function mxShapeBasicLayeredRect(bounds, fill, stroke, strokewidth)
2077 1934 mxUtils.extend(mxShapeBasicLayeredRect, mxActor);
2078 1935
2079 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 1943 * Function: paintVertexShape
2087 1944 *
2088 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 1948 c.translate(x, y);
2093 1949
2094 1950 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
2095 1951
2096 1952 dx = Math.min(w * 0.5, h * 0.5, dx);
2097   -
  1953 +
2098 1954 c.begin();
2099 1955 c.moveTo(dx, dx);
2100 1956 c.lineTo(w, dx);
... ... @@ -2102,7 +1958,7 @@ mxShapeBasicLayeredRect.prototype.paintVertexShape = function(c, x, y, w, h)
2102 1958 c.lineTo(dx, h);
2103 1959 c.close();
2104 1960 c.fillAndStroke();
2105   -
  1961 +
2106 1962 c.begin();
2107 1963 c.moveTo(dx * 0.5, dx * 0.5);
2108 1964 c.lineTo(w - dx * 0.5, dx * 0.5);
... ... @@ -2110,7 +1966,7 @@ mxShapeBasicLayeredRect.prototype.paintVertexShape = function(c, x, y, w, h)
2110 1966 c.lineTo(dx * 0.5, h - dx * 0.5);
2111 1967 c.close();
2112 1968 c.fillAndStroke();
2113   -
  1969 +
2114 1970 c.begin();
2115 1971 c.moveTo(0, 0);
2116 1972 c.lineTo(w - dx, 0);
... ... @@ -2124,27 +1980,23 @@ mxCellRenderer.registerShape(mxShapeBasicLayeredRect.prototype.cst.LAYERED_RECT,
2124 1980
2125 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 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 1987 return new mxPoint(bounds.x + bounds.width - dx, bounds.y + bounds.height - dx);
2134   - }, function(bounds, pt)
2135   - {
  1988 + }, function (bounds, pt) {
2136 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 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 1996 var constr = [];
2145 1997 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
2146 1998 dx = Math.min(w * 0.5, h * 0.5, dx);
2147   -
  1999 +
2148 2000 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
2149 2001 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false, null, (w - dx) * 0.25, 0));
2150 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 2027 /**
2176 2028 * Extends mxShape.
2177 2029 */
2178   -function mxShapeBasicButton(bounds, fill, stroke, strokewidth)
2179   -{
  2030 +function mxShapeBasicButton(bounds, fill, stroke, strokewidth) {
2180 2031 mxShape.call(this);
2181 2032 this.bounds = bounds;
2182 2033 this.fill = fill;
... ... @@ -2191,24 +2042,23 @@ function mxShapeBasicButton(bounds, fill, stroke, strokewidth)
2191 2042 mxUtils.extend(mxShapeBasicButton, mxActor);
2192 2043
2193 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 2051 * Function: paintVertexShape
2201 2052 *
2202 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 2056 c.translate(x, y);
2207 2057
2208 2058 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
2209 2059
2210 2060 dx = Math.min(w * 0.5, h * 0.5, dx);
2211   -
  2061 +
2212 2062 c.begin();
2213 2063 c.moveTo(0, 0);
2214 2064 c.lineTo(w, 0);
... ... @@ -2216,10 +2066,10 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)
2216 2066 c.lineTo(0, h);
2217 2067 c.close();
2218 2068 c.fillAndStroke();
2219   -
  2069 +
2220 2070 c.setShadow(false);
2221 2071 c.setLineJoin('round');
2222   -
  2072 +
2223 2073 c.begin();
2224 2074 c.moveTo(0, h);
2225 2075 c.lineTo(0, 0);
... ... @@ -2227,7 +2077,7 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)
2227 2077 c.lineTo(dx, h - dx);
2228 2078 c.close();
2229 2079 c.fillAndStroke();
2230   -
  2080 +
2231 2081 c.begin();
2232 2082 c.moveTo(0, 0);
2233 2083 c.lineTo(w, 0);
... ... @@ -2235,7 +2085,7 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)
2235 2085 c.lineTo(dx, dx);
2236 2086 c.close();
2237 2087 c.fillAndStroke();
2238   -
  2088 +
2239 2089 c.begin();
2240 2090 c.moveTo(w, 0);
2241 2091 c.lineTo(w, h);
... ... @@ -2243,7 +2093,7 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)
2243 2093 c.lineTo(w - dx, dx);
2244 2094 c.close();
2245 2095 c.fillAndStroke();
2246   -
  2096 +
2247 2097 c.begin();
2248 2098 c.moveTo(0, h);
2249 2099 c.lineTo(dx, h - dx);
... ... @@ -2251,7 +2101,7 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)
2251 2101 c.lineTo(w, h);
2252 2102 c.close();
2253 2103 c.fillAndStroke();
2254   -
  2104 +
2255 2105 c.begin();
2256 2106 c.moveTo(0, h);
2257 2107 c.lineTo(0, 0);
... ... @@ -2259,26 +2109,23 @@ mxShapeBasicButton.prototype.paintVertexShape = function(c, x, y, w, h)
2259 2109 c.lineTo(dx, h - dx);
2260 2110 c.close();
2261 2111 c.fillAndStroke();
2262   -
2263   -
  2112 +
  2113 +
2264 2114 };
2265 2115
2266 2116 mxCellRenderer.registerShape(mxShapeBasicButton.prototype.cst.BUTTON, mxShapeBasicButton);
2267 2117
2268 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 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 2124 return new mxPoint(bounds.x + dx, bounds.y + dx);
2277   - }, function(bounds, pt)
2278   - {
  2125 + }, function (bounds, pt) {
2279 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 2129 return handles;
2283 2130 };
2284 2131
... ... @@ -2288,8 +2135,7 @@ Graph.handleFactory[mxShapeBasicButton.prototype.cst.BUTTON] = function(state)
2288 2135 /**
2289 2136 * Extends mxShape.
2290 2137 */
2291   -function mxShapeBasicShadedButton(bounds, fill, stroke, strokewidth)
2292   -{
  2138 +function mxShapeBasicShadedButton(bounds, fill, stroke, strokewidth) {
2293 2139 mxShape.call(this);
2294 2140 this.bounds = bounds;
2295 2141 this.fill = fill;
... ... @@ -2304,26 +2150,25 @@ function mxShapeBasicShadedButton(bounds, fill, stroke, strokewidth)
2304 2150 mxUtils.extend(mxShapeBasicShadedButton, mxActor);
2305 2151
2306 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 2159 * Function: paintVertexShape
2314 2160 *
2315 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 2164 c.translate(x, y);
2320   -
  2165 +
2321 2166 c.setShadow(false);
2322 2167
2323 2168 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx))));
2324 2169
2325 2170 dx = Math.min(w * 0.5, h * 0.5, dx);
2326   -
  2171 +
2327 2172 c.begin();
2328 2173 c.moveTo(0, 0);
2329 2174 c.lineTo(w, 0);
... ... @@ -2331,7 +2176,7 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h)
2331 2176 c.lineTo(0, h);
2332 2177 c.close();
2333 2178 c.fill();
2334   -
  2179 +
2335 2180 c.setFillColor('#ffffff');
2336 2181 c.setAlpha(0.25);
2337 2182 c.begin();
... ... @@ -2341,7 +2186,7 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h)
2341 2186 c.lineTo(dx, h - dx);
2342 2187 c.close();
2343 2188 c.fill();
2344   -
  2189 +
2345 2190 c.setAlpha(0.5);
2346 2191 c.begin();
2347 2192 c.moveTo(0, 0);
... ... @@ -2350,7 +2195,7 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h)
2350 2195 c.lineTo(dx, dx);
2351 2196 c.close();
2352 2197 c.fill();
2353   -
  2198 +
2354 2199 c.setFillColor('#000000');
2355 2200 c.setAlpha(0.25);
2356 2201 c.begin();
... ... @@ -2360,7 +2205,7 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h)
2360 2205 c.lineTo(w - dx, dx);
2361 2206 c.close();
2362 2207 c.fill();
2363   -
  2208 +
2364 2209 c.setAlpha(0.5);
2365 2210 c.begin();
2366 2211 c.moveTo(0, h);
... ... @@ -2369,26 +2214,23 @@ mxShapeBasicShadedButton.prototype.paintVertexShape = function(c, x, y, w, h)
2369 2214 c.lineTo(w, h);
2370 2215 c.close();
2371 2216 c.fill();
2372   -
2373   -
  2217 +
  2218 +
2374 2219 };
2375 2220
2376 2221 mxCellRenderer.registerShape(mxShapeBasicShadedButton.prototype.cst.SHADED_BUTTON, mxShapeBasicShadedButton);
2377 2222
2378 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 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 2229 return new mxPoint(bounds.x + dx, bounds.y + dx);
2387   - }, function(bounds, pt)
2388   - {
  2230 + }, function (bounds, pt) {
2389 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 2234 return handles;
2393 2235 };
2394 2236
... ... @@ -2398,8 +2240,7 @@ Graph.handleFactory[mxShapeBasicShadedButton.prototype.cst.SHADED_BUTTON] = func
2398 2240 /**
2399 2241 * Extends mxShape.
2400 2242 */
2401   -function mxShapeBasicPie(bounds, fill, stroke, strokewidth)
2402   -{
  2243 +function mxShapeBasicPie(bounds, fill, stroke, strokewidth) {
2403 2244 mxShape.call(this);
2404 2245 this.bounds = bounds;
2405 2246 this.fill = fill;
... ... @@ -2415,19 +2256,18 @@ function mxShapeBasicPie(bounds, fill, stroke, strokewidth)
2415 2256 mxUtils.extend(mxShapeBasicPie, mxActor);
2416 2257
2417 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 2266 * Function: paintVertexShape
2426 2267 *
2427 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 2271 c.translate(x, y);
2432 2272 var startAngleSource = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'startAngle', this.startAngle))));
2433 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 2275 var endAngle = 2 * Math.PI * endAngleSource;
2436 2276 var rx = w * 0.5;
2437 2277 var ry = h * 0.5;
2438   -
  2278 +
2439 2279 var startX = rx + Math.sin(startAngle) * rx;
2440 2280 var startY = ry - Math.cos(startAngle) * ry;
2441 2281 var endX = rx + Math.sin(endAngle) * rx;
2442 2282 var endY = ry - Math.cos(endAngle) * ry;
2443   -
  2283 +
2444 2284 var angDiff = endAngle - startAngle;
2445   -
2446   - if (angDiff < 0)
2447   - {
  2285 +
  2286 + if (angDiff < 0) {
2448 2287 angDiff = angDiff + Math.PI * 2;
2449 2288 }
2450   -
  2289 +
2451 2290 var bigArc = 0;
2452   -
2453   - if (angDiff >= Math.PI)
2454   - {
  2291 +
  2292 + if (angDiff >= Math.PI) {
2455 2293 bigArc = 1;
2456 2294 }
2457   -
  2295 +
2458 2296 c.begin();
2459 2297 var startAngleDiff = startAngleSource % 1;
2460 2298 var endAngleDiff = endAngleSource % 1;
2461   -
2462   - if (startAngleDiff == 0 && endAngleDiff == 0.5)
2463   - {
  2299 +
  2300 + if (startAngleDiff == 0 && endAngleDiff == 0.5) {
2464 2301 c.moveTo(rx, ry);
2465 2302 c.lineTo(startX, startY);
2466 2303 c.arcTo(rx, ry, 0, 0, 1, w, h * 0.5);
2467 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 2307 c.moveTo(rx, ry);
2472 2308 c.lineTo(startX, startY);
2473 2309 c.arcTo(rx, ry, 0, 0, 1, 0, h * 0.5);
2474 2310 c.arcTo(rx, ry, 0, 0, 1, w * 0.5, 0);
2475 2311 }
2476   - else
2477   - {
  2312 + else {
2478 2313 c.moveTo(rx, ry);
2479 2314 c.lineTo(startX, startY);
2480 2315 c.arcTo(rx, ry, 0, bigArc, 1, endX, endY);
2481 2316 }
2482   -
  2317 +
2483 2318 c.close();
2484 2319 c.fillAndStroke();
2485 2320 };
... ... @@ -2488,51 +2323,44 @@ mxCellRenderer.registerShape(mxShapeBasicPie.prototype.cst.PIE, mxShapeBasicPie)
2488 2323
2489 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 2328 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'startAngle', this.startAngle))));
2496 2329
2497 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 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 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 2338 res = 1 + res;
2508 2339 }
2509 2340
2510 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 2346 var endAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'endAngle', this.endAngle))));
2517 2347
2518 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 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 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 2356 res = 1 + res;
2529 2357 }
2530   -
  2358 +
2531 2359 this.state.style['endAngle'] = res;
2532 2360 });
2533   -
  2361 +
2534 2362 handles.push(handle2);
2535   -
  2363 +
2536 2364 return handles;
2537 2365 };
2538 2366
... ... @@ -2542,8 +2370,7 @@ Graph.handleFactory[mxShapeBasicPie.prototype.cst.PIE] = function(state)
2542 2370 /**
2543 2371 * Extends mxShape.
2544 2372 */
2545   -function mxShapeBasicArc(bounds, fill, stroke, strokewidth)
2546   -{
  2373 +function mxShapeBasicArc(bounds, fill, stroke, strokewidth) {
2547 2374 mxShape.call(this);
2548 2375 this.bounds = bounds;
2549 2376 this.fill = fill;
... ... @@ -2559,19 +2386,18 @@ function mxShapeBasicArc(bounds, fill, stroke, strokewidth)
2559 2386 mxUtils.extend(mxShapeBasicArc, mxActor);
2560 2387
2561 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 2396 * Function: paintVertexShape
2570 2397 *
2571 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 2401 c.translate(x, y);
2576 2402
2577 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 2406 var endAngle = 2 * Math.PI * endAngleSource;
2581 2407 var rx = w * 0.5;
2582 2408 var ry = h * 0.5;
2583   -
  2409 +
2584 2410 var startX = rx + Math.sin(startAngle) * rx;
2585 2411 var startY = ry - Math.cos(startAngle) * ry;
2586 2412 var endX = rx + Math.sin(endAngle) * rx;
2587 2413 var endY = ry - Math.cos(endAngle) * ry;
2588   -
  2414 +
2589 2415 var angDiff = endAngle - startAngle;
2590   -
2591   - if (angDiff < 0)
2592   - {
  2416 +
  2417 + if (angDiff < 0) {
2593 2418 angDiff = angDiff + Math.PI * 2;
2594 2419 }
2595   -
  2420 +
2596 2421 var bigArc = 0;
2597   -
2598   - if (angDiff > Math.PI)
2599   - {
  2422 +
  2423 + if (angDiff > Math.PI) {
2600 2424 bigArc = 1;
2601 2425 }
2602   -
  2426 +
2603 2427 c.begin();
2604   -
  2428 +
2605 2429 var startAngleDiff = startAngleSource % 1;
2606 2430 var endAngleDiff = endAngleSource % 1;
2607   -
2608   - if (startAngleDiff == 0 && endAngleDiff == 0.5)
2609   - {
  2431 +
  2432 + if (startAngleDiff == 0 && endAngleDiff == 0.5) {
2610 2433 c.moveTo(startX, startY);
2611 2434 c.arcTo(rx, ry, 0, 0, 1, w, h * 0.5);
2612 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 2438 c.moveTo(startX, startY);
2617 2439 c.arcTo(rx, ry, 0, 0, 1, 0, h * 0.5);
2618 2440 c.arcTo(rx, ry, 0, 0, 1, w * 0.5, 0);
2619 2441 }
2620   - else
2621   - {
  2442 + else {
2622 2443 c.moveTo(startX, startY);
2623 2444 c.arcTo(rx, ry, 0, bigArc, 1, endX, endY);
2624 2445 }
... ... @@ -2630,51 +2451,44 @@ mxCellRenderer.registerShape(mxShapeBasicArc.prototype.cst.ARC, mxShapeBasicArc)
2630 2451
2631 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 2456 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'startAngle', this.startAngle))));
2638 2457
2639 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 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 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 2466 res = 1 + res;
2650 2467 }
2651 2468
2652 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 2474 var endAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'endAngle', this.endAngle))));
2659 2475
2660 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 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 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 2484 res = 1 + res;
2671 2485 }
2672   -
  2486 +
2673 2487 this.state.style['endAngle'] = res;
2674 2488 });
2675   -
  2489 +
2676 2490 handles.push(handle2);
2677   -
  2491 +
2678 2492 return handles;
2679 2493 };
2680 2494
... ... @@ -2684,8 +2498,7 @@ Graph.handleFactory[mxShapeBasicArc.prototype.cst.ARC] = function(state)
2684 2498 /**
2685 2499 * Extends mxShape.
2686 2500 */
2687   -function mxShapeBasicPartConcEllipse(bounds, fill, stroke, strokewidth)
2688   -{
  2501 +function mxShapeBasicPartConcEllipse(bounds, fill, stroke, strokewidth) {
2689 2502 mxShape.call(this);
2690 2503 this.bounds = bounds;
2691 2504 this.fill = fill;
... ... @@ -2702,20 +2515,19 @@ function mxShapeBasicPartConcEllipse(bounds, fill, stroke, strokewidth)
2702 2515 mxUtils.extend(mxShapeBasicPartConcEllipse, mxActor);
2703 2516
2704 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 2526 * Function: paintVertexShape
2714 2527 *
2715 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 2531 c.translate(x, y);
2720 2532
2721 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 2537 var ry = h * 0.5;
2726 2538 var rx2 = rx * arcWidth;
2727 2539 var ry2 = ry * arcWidth;
2728   -
  2540 +
2729 2541 var angDiff = endAngle - startAngle;
2730   -
2731   - if (angDiff < 0)
2732   - {
  2542 +
  2543 + if (angDiff < 0) {
2733 2544 angDiff = angDiff + Math.PI * 2;
2734 2545 }
2735   - else if (angDiff == Math.PI)
2736   - {
  2546 + else if (angDiff == Math.PI) {
2737 2547 endAngle = endAngle + 0.00001;
2738 2548 }
2739   -
  2549 +
2740 2550 var startX = rx + Math.sin(startAngle) * rx;
2741 2551 var startY = ry - Math.cos(startAngle) * ry;
2742 2552 var innerStartX = rx + Math.sin(startAngle) * rx2;
... ... @@ -2745,15 +2555,14 @@ mxShapeBasicPartConcEllipse.prototype.paintVertexShape = function(c, x, y, w, h)
2745 2555 var endY = ry - Math.cos(endAngle) * ry;
2746 2556 var innerEndX = rx + Math.sin(endAngle) * rx2;
2747 2557 var innerEndY = ry - Math.cos(endAngle) * ry2;
2748   -
2749   -
  2558 +
  2559 +
2750 2560 var bigArc = 0;
2751   -
2752   - if (angDiff >= Math.PI)
2753   - {
  2561 +
  2562 + if (angDiff >= Math.PI) {
2754 2563 bigArc = 1;
2755 2564 }
2756   -
  2565 +
2757 2566 c.begin();
2758 2567 c.moveTo(startX, startY);
2759 2568 c.arcTo(rx, ry, 0, bigArc, 1, endX, endY);
... ... @@ -2767,63 +2576,54 @@ mxCellRenderer.registerShape(mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC
2767 2576
2768 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 2581 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'startAngle', this.startAngle))));
2775 2582
2776 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 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 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 2591 res = 1 + res;
2787 2592 }
2788 2593
2789 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 2599 var endAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'endAngle', this.endAngle))));
2796 2600
2797 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 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 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 2609 res = 1 + res;
2808 2610 }
2809   -
  2611 +
2810 2612 this.state.style['endAngle'] = res;
2811 2613 });
2812   -
  2614 +
2813 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 2618 var arcWidth = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'arcWidth', this.arcWidth))));
2818 2619
2819 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 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 2625 handles.push(handle3);
2826   -
  2626 +
2827 2627 return handles;
2828 2628 };
2829 2629
... ... @@ -2833,8 +2633,7 @@ Graph.handleFactory[mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE]
2833 2633 /**
2834 2634 * Extends mxShape.
2835 2635 */
2836   -function mxShapeBasicNumEntryVert(bounds, fill, stroke, strokewidth)
2837   -{
  2636 +function mxShapeBasicNumEntryVert(bounds, fill, stroke, strokewidth) {
2838 2637 mxShape.call(this);
2839 2638 this.bounds = bounds;
2840 2639 this.fill = fill;
... ... @@ -2848,15 +2647,14 @@ function mxShapeBasicNumEntryVert(bounds, fill, stroke, strokewidth)
2848 2647 */
2849 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 2653 * Function: paintVertexShape
2855 2654 *
2856 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 2658 c.translate(x, y);
2861 2659
2862 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 2662 var inset = 5;
2865 2663
2866 2664 var d = Math.min(dy, w - 2 * inset, h - inset);
2867   -
  2665 +
2868 2666 c.ellipse(w * 0.5 - d * 0.5, 0, d, d);
2869 2667 c.fillAndStroke();
2870   -
  2668 +
2871 2669 c.begin();
2872 2670 c.moveTo(0, d * 0.5);
2873 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 2681
2884 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 2686 var dy = Math.max(0, Math.min(bounds.width, bounds.width, parseFloat(mxUtils.getValue(this.state.style, 'dy', this.dy))));
2891 2687
2892 2688 return new mxPoint(bounds.x + bounds.width / 2, bounds.y + dy);
2893   - }, function(bounds, pt)
2894   - {
  2689 + }, function (bounds, pt) {
2895 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 2693 return handles;
2899 2694 };
2900 2695
... ... @@ -2904,8 +2699,7 @@ Graph.handleFactory[mxShapeBasicNumEntryVert.prototype.cst.NUM_ENTRY_VERT] = fun
2904 2699 /**
2905 2700 * Extends mxShape.
2906 2701 */
2907   -function mxShapeBasicBendingArch(bounds, fill, stroke, strokewidth)
2908   -{
  2702 +function mxShapeBasicBendingArch(bounds, fill, stroke, strokewidth) {
2909 2703 mxShape.call(this);
2910 2704 this.bounds = bounds;
2911 2705 this.fill = fill;
... ... @@ -2921,15 +2715,14 @@ function mxShapeBasicBendingArch(bounds, fill, stroke, strokewidth)
2921 2715 */
2922 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 2721 * Function: paintVertexShape
2928 2722 *
2929 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 2726 c.translate(x, y);
2934 2727
2935 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 2732 var ry = h * 0.5;
2940 2733 var rx2 = rx * arcWidth;
2941 2734 var ry2 = ry * arcWidth;
2942   -
  2735 +
2943 2736 var startX = rx + Math.sin(startAngle) * rx;
2944 2737 var startY = ry - Math.cos(startAngle) * ry;
2945 2738 var innerStartX = rx + Math.sin(startAngle) * rx2;
... ... @@ -2948,18 +2741,16 @@ mxShapeBasicBendingArch.prototype.paintVertexShape = function(c, x, y, w, h)
2948 2741 var endY = ry - Math.cos(endAngle) * ry;
2949 2742 var innerEndX = rx + Math.sin(endAngle) * rx2;
2950 2743 var innerEndY = ry - Math.cos(endAngle) * ry2;
2951   -
  2744 +
2952 2745 var angDiff = endAngle - startAngle;
2953   -
2954   - if (angDiff < 0)
2955   - {
  2746 +
  2747 + if (angDiff < 0) {
2956 2748 angDiff = angDiff + Math.PI * 2;
2957 2749 }
2958   -
  2750 +
2959 2751 var bigArc = 0;
2960   -
2961   - if (angDiff > Math.PI)
2962   - {
  2752 +
  2753 + if (angDiff > Math.PI) {
2963 2754 bigArc = 1;
2964 2755 }
2965 2756
... ... @@ -2968,7 +2759,7 @@ mxShapeBasicBendingArch.prototype.paintVertexShape = function(c, x, y, w, h)
2968 2759
2969 2760 c.ellipse(w * 0.5 - rx3, h * 0.5 - ry3, 2 * rx3, 2 * ry3);
2970 2761 c.fillAndStroke();
2971   -
  2762 +
2972 2763 c.begin();
2973 2764 c.moveTo(startX, startY);
2974 2765 c.arcTo(rx, ry, 0, bigArc, 1, endX, endY);
... ... @@ -2982,63 +2773,54 @@ mxCellRenderer.registerShape(mxShapeBasicBendingArch.prototype.cst.BENDING_ARCH,
2982 2773
2983 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 2778 var startAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'startAngle', this.startAngle))));
2990 2779
2991 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 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 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 2788 res = 1 + res;
3002 2789 }
3003 2790
3004 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 2796 var endAngle = 2 * Math.PI * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'endAngle', this.endAngle))));
3011 2797
3012 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 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 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 2806 res = 1 + res;
3023 2807 }
3024   -
  2808 +
3025 2809 this.state.style['endAngle'] = res;
3026 2810 });
3027   -
  2811 +
3028 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 2815 var arcWidth = Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.state.style, 'arcWidth', this.arcWidth))));
3033 2816
3034 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 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 2822 handles.push(handle3);
3041   -
  2823 +
3042 2824 return handles;
3043 2825 };
3044 2826
... ... @@ -3048,8 +2830,7 @@ Graph.handleFactory[mxShapeBasicBendingArch.prototype.cst.BENDING_ARCH] = functi
3048 2830 /**
3049 2831 * Extends mxShape.
3050 2832 */
3051   -function mxShapeBasicThreeCornerRoundRect(bounds, fill, stroke, strokewidth)
3052   -{
  2833 +function mxShapeBasicThreeCornerRoundRect(bounds, fill, stroke, strokewidth) {
3053 2834 mxShape.call(this);
3054 2835 this.bounds = bounds;
3055 2836 this.fill = fill;
... ... @@ -3064,24 +2845,23 @@ function mxShapeBasicThreeCornerRoundRect(bounds, fill, stroke, strokewidth)
3064 2845 mxUtils.extend(mxShapeBasicThreeCornerRoundRect, mxActor);
3065 2846
3066 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 2854 * Function: paintVertexShape
3074 2855 *
3075 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 2859 c.translate(x, y);
3080 2860
3081 2861 var dx = Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'dx', this.dx)))) * 2;
3082 2862
3083 2863 dx = Math.min(w * 0.5, h * 0.5, dx);
3084   -
  2864 +
3085 2865 c.begin();
3086 2866 c.moveTo(dx, 0);
3087 2867 c.lineTo(w - dx, 0);
... ... @@ -3099,23 +2879,19 @@ mxCellRenderer.registerShape(mxShapeBasicThreeCornerRoundRect.prototype.cst.THRE
3099 2879
3100 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 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 2886 return new mxPoint(bounds.x + dx, bounds.y + dx);
3109   - }, function(bounds, pt)
3110   - {
  2887 + }, function (bounds, pt) {
3111 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 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 2895 var constr = [];
3120 2896
3121 2897 constr.push(new mxConnectionConstraint(new mxPoint(0.5, 0), false));
... ... @@ -3133,8 +2909,7 @@ mxShapeBasicThreeCornerRoundRect.prototype.getConstraints = function(style, w, h
3133 2909 /**
3134 2910 * Extends mxShape.
3135 2911 */
3136   -function mxShapeBasicPolygon(bounds, fill, stroke, strokewidth)
3137   -{
  2912 +function mxShapeBasicPolygon(bounds, fill, stroke, strokewidth) {
3138 2913 mxShape.call(this);
3139 2914 this.bounds = bounds;
3140 2915 this.fill = fill;
... ... @@ -3150,86 +2925,73 @@ function mxShapeBasicPolygon(bounds, fill, stroke, strokewidth)
3150 2925 mxUtils.extend(mxShapeBasicPolygon, mxActor);
3151 2926
3152 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 2934 * Function: paintVertexShape
3160 2935 *
3161 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 2965 mxCellRenderer.registerShape(mxShapeBasicPolygon.prototype.cst.POLYGON, mxShapeBasicPolygon);
3197 2966
3198 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 3000 /**
3239 3001 * Extends mxShape.
3240 3002 */
3241   -function mxShapeBasicPatternFillRect(bounds, fill, stroke, strokewidth)
3242   -{
  3003 +function mxShapeBasicPatternFillRect(bounds, fill, stroke, strokewidth) {
3243 3004 mxShape.call(this);
3244 3005 this.bounds = bounds;
3245 3006 this.fill = fill;
... ... @@ -3253,26 +3014,28 @@ function mxShapeBasicPatternFillRect(bounds, fill, stroke, strokewidth)
3253 3014 */
3254 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 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 3043 *
3281 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 3047 c.translate(x, y);
3286   -
  3048 +
3287 3049 var strokeColor = mxUtils.getValue(this.style, 'strokeColor', '#000000');
3288 3050 var strokeWidth = mxUtils.getValue(this.style, 'strokeWidth', '1');
3289   -
  3051 +
3290 3052 c.rect(0, 0, w, h);
3291 3053 c.fill();
3292 3054
3293 3055 var fillStrokeColor = mxUtils.getValue(this.style, 'fillStrokeColor', '#cccccc');
3294 3056 var fillStrokeWidth = parseFloat(mxUtils.getValue(this.style, 'fillStrokeWidth', 1));
3295   -
  3057 +
3296 3058 c.setStrokeColor(fillStrokeColor);
3297 3059 c.setStrokeWidth(fillStrokeWidth);
3298   -
  3060 +
3299 3061 var step = parseFloat(mxUtils.getValue(this.style, 'step', 5));
3300 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 3065 step = step * 1.41;
3305 3066 var i = 0;
3306   -
  3067 +
3307 3068 c.begin();
3308   -
3309   - while (i < (h + w))
3310   - {
  3069 +
  3070 + while (i < (h + w)) {
3311 3071 var cx = 0;
3312 3072 var cy = 0;
3313   -
3314   - if (i <= h)
3315   - {
  3073 +
  3074 + if (i <= h) {
3316 3075 c.moveTo(0, i);
3317   -
3318   - if(i <= w)
3319   - {
  3076 +
  3077 + if (i <= w) {
3320 3078 c.lineTo(i, 0);
3321 3079 }
3322   - else
3323   - {
  3080 + else {
3324 3081 c.lineTo(w, i - w);
3325 3082 }
3326 3083 }
3327   - else
3328   - {
  3084 + else {
3329 3085 c.moveTo(i - h, h);
3330   -
3331   - if(i <= w)
3332   - {
  3086 +
  3087 + if (i <= w) {
3333 3088 c.lineTo(i, 0);
3334 3089 }
3335   - else
3336   - {
  3090 + else {
3337 3091 c.lineTo(w, i - w);
3338 3092 }
3339 3093 }
3340   -
  3094 +
3341 3095 i = i + step;
3342 3096 }
3343   -
  3097 +
3344 3098 c.stroke();
3345 3099 }
3346   - else if (fillStyle == 'vert' || fillStyle == 'grid')
3347   - {
  3100 + else if (fillStyle == 'vert' || fillStyle == 'grid') {
3348 3101 c.begin();
3349 3102 var i = 0;
3350   -
3351   - while (i <= w)
3352   - {
  3103 +
  3104 + while (i <= w) {
3353 3105 var cx = 0;
3354 3106 var cy = 0;
3355   -
  3107 +
3356 3108 c.moveTo(i, 0);
3357 3109 c.lineTo(i, h);
3358   -
  3110 +
3359 3111 i = i + step;
3360 3112 }
3361   -
  3113 +
3362 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 3119 step = step * 1.41;
3370 3120 }
3371 3121
3372 3122 var i = 0;
3373   -
  3123 +
3374 3124 c.begin();
3375   -
3376   - while (i < (h + w))
3377   - {
  3125 +
  3126 + while (i < (h + w)) {
3378 3127 var cx = 0;
3379 3128 var cy = 0;
3380   -
3381   - if (i <= h)
3382   - {
  3129 +
  3130 + if (i <= h) {
3383 3131 c.moveTo(w, i);
3384   -
3385   - if(i <= w)
3386   - {
  3132 +
  3133 + if (i <= w) {
3387 3134 c.lineTo(w - i, 0);
3388 3135 }
3389   - else
3390   - {
  3136 + else {
3391 3137 c.lineTo(w - w, i - w);
3392 3138 }
3393 3139 }
3394   - else
3395   - {
  3140 + else {
3396 3141 c.moveTo(w - i + h, h);
3397   -
3398   - if(i <= w)
3399   - {
  3142 +
  3143 + if (i <= w) {
3400 3144 c.lineTo(w - i, 0);
3401 3145 }
3402   - else
3403   - {
  3146 + else {
3404 3147 c.lineTo(0, i - w);
3405 3148 }
3406 3149 }
3407   -
  3150 +
3408 3151 i = i + step;
3409 3152 }
3410   -
  3153 +
3411 3154 c.stroke();
3412 3155 }
3413   - else if (fillStyle == 'hor' || fillStyle == 'grid')
3414   - {
  3156 + else if (fillStyle == 'hor' || fillStyle == 'grid') {
3415 3157 c.begin();
3416 3158 var i = 0;
3417   -
3418   - while (i <= h)
3419   - {
  3159 +
  3160 + while (i <= h) {
3420 3161 var cx = 0;
3421 3162 var cy = 0;
3422   -
  3163 +
3423 3164 c.moveTo(0, i);
3424 3165 c.lineTo(w, i);
3425   -
  3166 +
3426 3167 i = i + step;
3427 3168 }
3428   -
  3169 +
3429 3170 c.stroke();
3430 3171 }
3431 3172
3432 3173 c.setStrokeColor(strokeColor);
3433 3174 c.setStrokeWidth(strokeWidth);
3434   -
  3175 +
3435 3176 c.begin();
3436 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 3180 c.lineTo(w, 0);
3441 3181 }
3442   - else
3443   - {
  3182 + else {
3444 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 3187 c.lineTo(w, h);
3450 3188 }
3451   - else
3452   - {
  3189 + else {
3453 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 3194 c.lineTo(0, h);
3459 3195 }
3460   - else
3461   - {
  3196 + else {
3462 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 3201 c.lineTo(0, 0);
3468 3202 }
3469   -
  3203 +
3470 3204 c.end();
3471 3205 c.stroke();
3472 3206 };
3473 3207
3474 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 3211 var constr = [];
3479 3212
3480 3213 constr.push(new mxConnectionConstraint(new mxPoint(0, 0), false));
... ...