sumks-d2d 1.0.38 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,1816 @@
|
|
|
1
|
+
declare namespace 'sumks-d2d' {
|
|
2
|
+
export = draw2d
|
|
3
|
+
namespace draw2d {
|
|
4
|
+
/**
|
|
5
|
+
* A scrolling Canvas that contains Figures. Call `add(draw2d.Figure)` to add shapes to the Viewport.
|
|
6
|
+
*/
|
|
7
|
+
class Canvas {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new canvas with the given HTML DOM references.
|
|
10
|
+
*/
|
|
11
|
+
constructor(canvasId: string, width?: number, height?: number)
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Add a figure at the given x/y coordinate. This method fires an event.
|
|
15
|
+
*
|
|
16
|
+
* Example:
|
|
17
|
+
*
|
|
18
|
+
* canvas.on("figure:add", function(emitter, event){
|
|
19
|
+
* alert("figure added:");
|
|
20
|
+
* });
|
|
21
|
+
*
|
|
22
|
+
* // or more general if you want catch all figure related events
|
|
23
|
+
* //
|
|
24
|
+
* canvas.on("figure", function(emitter, event){
|
|
25
|
+
* // use event.figure.getCanvas()===null to determine if the
|
|
26
|
+
* // figure part of the canvas
|
|
27
|
+
*
|
|
28
|
+
* alert("figure added or removed:");
|
|
29
|
+
* });
|
|
30
|
+
**/
|
|
31
|
+
add(figure: draw2d.Figure, x: number, y: number): this | void
|
|
32
|
+
add(figure: draw2d.Figure, x: draw2d.geo.Point): this | void
|
|
33
|
+
add(connection: any): this | void
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Add the current figure to the selection. If a single selection policy is installed in the
|
|
37
|
+
* canvas the selection before is reseted and the figure is the one and only selection.
|
|
38
|
+
**/
|
|
39
|
+
addSelection(object: draw2d.Figure | util.ArrayList<draw2d.Figure>): this
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Calculate all connection intersection of the canvas.
|
|
43
|
+
* Required for "bridging" or "crossing decoration"
|
|
44
|
+
*/
|
|
45
|
+
private calculateConnectionIntersection(): this
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Reset the canvas and delete all model elements.<br>
|
|
49
|
+
* You can now reload another model to the canvas with a {@link draw2d.io.Reader}
|
|
50
|
+
*/
|
|
51
|
+
clear(): this
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Call this method if you didn't need the canvas anymore. The method unregister all even handlers
|
|
55
|
+
* and frees all resources. The canvas is unusable after this call
|
|
56
|
+
*/
|
|
57
|
+
destroy(): void
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Execute all handlers and behaviors attached to the canvas for the given event type.
|
|
61
|
+
*/
|
|
62
|
+
private fireEvent(event: CanvasEvent, args?: object): void
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Transforms a canvas coordinate to document coordinate.
|
|
66
|
+
*/
|
|
67
|
+
fromCanvasToDocumentCoordinate(x: number, y: number): draw2d.geo.Point
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Transforms a document coordinate to canvas coordinate.
|
|
71
|
+
*/
|
|
72
|
+
fromDocumentToCanvasCoordinate(x: number, y: number): draw2d.geo.Point
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The absolute document x offset.
|
|
76
|
+
**/
|
|
77
|
+
getAbsoluteX(): number
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The absolute document y offset.
|
|
81
|
+
**/
|
|
82
|
+
getAbsoluteY(): number
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Return all ports in the canvas
|
|
86
|
+
* returns all ports from all figures
|
|
87
|
+
*/
|
|
88
|
+
getAllPorts(): util.ArrayList<draw2d.Port>
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Returns the best figure at the location [x,y]. It is a simple hit test. Keep in mind that only visible objects
|
|
92
|
+
* are returned.
|
|
93
|
+
*
|
|
94
|
+
* blacklist - The figures or class which should be ignored.
|
|
95
|
+
* whitelist - The figures or class should be considered.
|
|
96
|
+
**/
|
|
97
|
+
getBestFigure(
|
|
98
|
+
x: number,
|
|
99
|
+
y: number,
|
|
100
|
+
blacklist?: draw2d.Figure | draw2d.Figure[],
|
|
101
|
+
whitelist?: draw2d.Figure | draw2d.Figure[]
|
|
102
|
+
): draw2d.Figure
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Return the line which match the hands over coordinate
|
|
106
|
+
**/
|
|
107
|
+
private getBestLine(x: number, y: number, lineToIgnore?: typeof shape.basic.Line): any
|
|
108
|
+
|
|
109
|
+
getCommandStack(): any
|
|
110
|
+
|
|
111
|
+
getDimension(): any
|
|
112
|
+
|
|
113
|
+
getDropInterceptorPolicies(): any
|
|
114
|
+
|
|
115
|
+
getFigure(id: any): any
|
|
116
|
+
|
|
117
|
+
getFigures(): any
|
|
118
|
+
|
|
119
|
+
getHeight(): any
|
|
120
|
+
|
|
121
|
+
getHtmlContainer(): any
|
|
122
|
+
|
|
123
|
+
getIntersection(line: any): any
|
|
124
|
+
|
|
125
|
+
getLine(id: any): any
|
|
126
|
+
|
|
127
|
+
getLines(): any
|
|
128
|
+
|
|
129
|
+
getPrimarySelection(): any
|
|
130
|
+
|
|
131
|
+
getScrollArea(): any
|
|
132
|
+
|
|
133
|
+
getScrollLeft(): any
|
|
134
|
+
|
|
135
|
+
getScrollTop(): any
|
|
136
|
+
|
|
137
|
+
getSelection(): any
|
|
138
|
+
|
|
139
|
+
getWidth(): any
|
|
140
|
+
|
|
141
|
+
getZoom(): any
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Callback for any kind of image export tools to trigger the canvas to hide all unwanted
|
|
145
|
+
* decorations. The method is called e.g. from the draw2d.io.png.Writer
|
|
146
|
+
*/
|
|
147
|
+
hideDecoration(): void
|
|
148
|
+
|
|
149
|
+
init(canvasId: any, width: any, height: any): any
|
|
150
|
+
|
|
151
|
+
installEditPolicy(policy: any): any
|
|
152
|
+
|
|
153
|
+
off(eventOrFunction: any): any
|
|
154
|
+
|
|
155
|
+
on(event: CanvasEvent, callback: any): any
|
|
156
|
+
|
|
157
|
+
onClick(x: any, y: any, shiftKey: any, ctrlKey: any): void
|
|
158
|
+
|
|
159
|
+
onDoubleClick(x: any, y: any, shiftKey: any, ctrlKey: any): void
|
|
160
|
+
|
|
161
|
+
onDrag(draggedDomNode: any, x: any, y: any): void
|
|
162
|
+
|
|
163
|
+
onDragEnter(draggedDomNode: any): void
|
|
164
|
+
|
|
165
|
+
onDragLeave(draggedDomNode: any): void
|
|
166
|
+
|
|
167
|
+
onDrop(droppedDomNode: any, x: any, y: any, shiftKey: any, ctrlKey: any): void
|
|
168
|
+
|
|
169
|
+
onMouseWheel(wheelDelta: any, x: any, y: any, shiftKey: any, ctrlKey: any): any
|
|
170
|
+
|
|
171
|
+
onRightMouseDown(x: any, y: any, shiftKey: any, ctrlKey: any): void
|
|
172
|
+
|
|
173
|
+
registerPort(port: any): any
|
|
174
|
+
|
|
175
|
+
remove(figure: any): any
|
|
176
|
+
|
|
177
|
+
scrollTo(top: any, left: any): any
|
|
178
|
+
|
|
179
|
+
setCurrentSelection(object: any): any
|
|
180
|
+
|
|
181
|
+
setDimension(dim: any, height: any): any
|
|
182
|
+
|
|
183
|
+
setScrollArea(elementSelector: any): any
|
|
184
|
+
|
|
185
|
+
setScrollLeft(left: any): any
|
|
186
|
+
|
|
187
|
+
setScrollTop(top: any): any
|
|
188
|
+
|
|
189
|
+
setZoom(zoomFactor: any, animated: any): void
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* callback method for any image export writer to reactivate the decoration
|
|
193
|
+
* of the canvas. e.g. grids, rulers,...
|
|
194
|
+
*/
|
|
195
|
+
showDecoration(): void
|
|
196
|
+
|
|
197
|
+
snapToHelper(figure: any, pos: any): any
|
|
198
|
+
|
|
199
|
+
uninstallEditPolicy(policy: any): any
|
|
200
|
+
|
|
201
|
+
unregisterPort(port: any): any
|
|
202
|
+
|
|
203
|
+
static extend: any
|
|
204
|
+
static inject: any
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
class Corona {
|
|
208
|
+
constructor(...args: any[])
|
|
209
|
+
|
|
210
|
+
init(...args: any[]): any
|
|
211
|
+
|
|
212
|
+
setAlpha(...args: any[]): any
|
|
213
|
+
|
|
214
|
+
static extend: any
|
|
215
|
+
static inject: any
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
class Figure {
|
|
219
|
+
constructor(...args: any[])
|
|
220
|
+
|
|
221
|
+
add(child: any, locator: any, index: any): any
|
|
222
|
+
|
|
223
|
+
addCssClass(className: any): any
|
|
224
|
+
|
|
225
|
+
applyTransformation(): any
|
|
226
|
+
|
|
227
|
+
attr(name: any, value: any): any
|
|
228
|
+
|
|
229
|
+
clone(cloneMetaData: any): any
|
|
230
|
+
|
|
231
|
+
contains(containedFigure: any): any
|
|
232
|
+
|
|
233
|
+
createCommand(request: any): any
|
|
234
|
+
|
|
235
|
+
createShapeElement(): void
|
|
236
|
+
|
|
237
|
+
delegateTarget(draggedFigure: any): any
|
|
238
|
+
|
|
239
|
+
fireEvent(event: any, args: any): void
|
|
240
|
+
|
|
241
|
+
getAbsoluteBounds(): any
|
|
242
|
+
|
|
243
|
+
getAbsolutePosition(): any
|
|
244
|
+
|
|
245
|
+
getAbsoluteX(): any
|
|
246
|
+
|
|
247
|
+
getAbsoluteY(): any
|
|
248
|
+
|
|
249
|
+
getAlpha(): any
|
|
250
|
+
|
|
251
|
+
getBestChild(x: any, y: any, figureToIgnore: any): any
|
|
252
|
+
|
|
253
|
+
getBoundingBox(): any
|
|
254
|
+
|
|
255
|
+
getCanSnapToHelper(): any
|
|
256
|
+
|
|
257
|
+
getCanvas(): any
|
|
258
|
+
|
|
259
|
+
getChildren(): any
|
|
260
|
+
|
|
261
|
+
getComposite(): any
|
|
262
|
+
|
|
263
|
+
getCssClass(): any
|
|
264
|
+
|
|
265
|
+
getHandleBBox(): any
|
|
266
|
+
|
|
267
|
+
getHeight(): any
|
|
268
|
+
|
|
269
|
+
getId(): any
|
|
270
|
+
|
|
271
|
+
getKeepAspectRatio(): any
|
|
272
|
+
|
|
273
|
+
getMinHeight(): any
|
|
274
|
+
|
|
275
|
+
getMinWidth(): any
|
|
276
|
+
|
|
277
|
+
getParent(): any
|
|
278
|
+
|
|
279
|
+
getPersistentAttributes(): any
|
|
280
|
+
|
|
281
|
+
getPosition(): any
|
|
282
|
+
|
|
283
|
+
getRoot(): any
|
|
284
|
+
|
|
285
|
+
getRotationAngle(): any
|
|
286
|
+
|
|
287
|
+
getSelectionAdapter(): any
|
|
288
|
+
|
|
289
|
+
getShapeElement(): any
|
|
290
|
+
|
|
291
|
+
getSnapToGridAnchor(): any
|
|
292
|
+
|
|
293
|
+
getTopLevelShapeElement(): any
|
|
294
|
+
|
|
295
|
+
getUserData(): any
|
|
296
|
+
|
|
297
|
+
getWidth(): any
|
|
298
|
+
|
|
299
|
+
getX(): any
|
|
300
|
+
|
|
301
|
+
getY(): any
|
|
302
|
+
|
|
303
|
+
getZOrder(): any
|
|
304
|
+
|
|
305
|
+
hasCssClass(className: any): any
|
|
306
|
+
|
|
307
|
+
hitTest(iX: any, iY: any, corona: any): any
|
|
308
|
+
|
|
309
|
+
init(attr: any, setter: any, getter: any): any
|
|
310
|
+
|
|
311
|
+
installEditPolicy(policy: any): any
|
|
312
|
+
|
|
313
|
+
isDeleteable(): any
|
|
314
|
+
|
|
315
|
+
isDraggable(): any
|
|
316
|
+
|
|
317
|
+
isResizeable(): any
|
|
318
|
+
|
|
319
|
+
isSelectable(): any
|
|
320
|
+
|
|
321
|
+
isSelected(): any
|
|
322
|
+
|
|
323
|
+
isStrechable(): any
|
|
324
|
+
|
|
325
|
+
isVisible(): any
|
|
326
|
+
|
|
327
|
+
off(eventOrFunction: any): any
|
|
328
|
+
|
|
329
|
+
on(event: any, callback: any, context: any): any
|
|
330
|
+
|
|
331
|
+
onCatch(droppedFigure: any, x: any, y: any, shiftKey: any, ctrlKey: any): void
|
|
332
|
+
|
|
333
|
+
onClick(): void
|
|
334
|
+
|
|
335
|
+
onContextMenu(x: any, y: any): void
|
|
336
|
+
|
|
337
|
+
onDoubleClick(): void
|
|
338
|
+
|
|
339
|
+
onDrag(dx: any, dy: any, dx2: any, dy2: any, shiftKey: any, ctrlKey: any): void
|
|
340
|
+
|
|
341
|
+
onDragEnd(x: any, y: any, shiftKey: any, ctrlKey: any): void
|
|
342
|
+
|
|
343
|
+
onDragEnter(draggedFigure: any): void
|
|
344
|
+
|
|
345
|
+
onDragLeave(draggedFigure: any): void
|
|
346
|
+
|
|
347
|
+
onDragStart(x: any, y: any, shiftKey: any, ctrlKey: any): any
|
|
348
|
+
|
|
349
|
+
onDrop(dropTarget: any, x: any, y: any, shiftKey: any, ctrlKey: any): void
|
|
350
|
+
|
|
351
|
+
onMouseEnter(): void
|
|
352
|
+
|
|
353
|
+
onMouseLeave(): void
|
|
354
|
+
|
|
355
|
+
onPanning(dx: any, dy: any, dx2: any, dy2: any, shiftKey: any, ctrlKey: any): void
|
|
356
|
+
|
|
357
|
+
onPanningEnd(): void
|
|
358
|
+
|
|
359
|
+
onTimer(): void
|
|
360
|
+
|
|
361
|
+
pick(obj: any, var_keys: any, ...args: any[]): any
|
|
362
|
+
|
|
363
|
+
remove(child: any): any
|
|
364
|
+
|
|
365
|
+
removeCssClass(className: any): any
|
|
366
|
+
|
|
367
|
+
repaint(attributes: any): any
|
|
368
|
+
|
|
369
|
+
resetChildren(): any
|
|
370
|
+
|
|
371
|
+
select(asPrimarySelection: any): any
|
|
372
|
+
|
|
373
|
+
setAlpha(percent: any): any
|
|
374
|
+
|
|
375
|
+
setBoundingBox(rect: any): any
|
|
376
|
+
|
|
377
|
+
setCanSnapToHelper(flag: any): any
|
|
378
|
+
|
|
379
|
+
setCanvas(canvas: any): any
|
|
380
|
+
|
|
381
|
+
setComposite(composite: any): any
|
|
382
|
+
|
|
383
|
+
setCssClass(cssClass: any): any
|
|
384
|
+
|
|
385
|
+
setDeleteable(flag: any): any
|
|
386
|
+
|
|
387
|
+
setDimension(w: any, h: any): any
|
|
388
|
+
|
|
389
|
+
setDraggable(flag: any): any
|
|
390
|
+
|
|
391
|
+
setGlow(flag: any): any
|
|
392
|
+
|
|
393
|
+
setHeight(height: any): any
|
|
394
|
+
|
|
395
|
+
setId(newId: any): any
|
|
396
|
+
|
|
397
|
+
setKeepAspectRatio(flag: any): any
|
|
398
|
+
|
|
399
|
+
setMinHeight(h: any): any
|
|
400
|
+
|
|
401
|
+
setMinWidth(w: any): any
|
|
402
|
+
|
|
403
|
+
setParent(parent: any): any
|
|
404
|
+
|
|
405
|
+
setPersistentAttributes(memento: any): any
|
|
406
|
+
|
|
407
|
+
setPosition(x: any, y: any): any
|
|
408
|
+
|
|
409
|
+
setResizeable(flag: any): any
|
|
410
|
+
|
|
411
|
+
setRotationAngle(angle: any): any
|
|
412
|
+
|
|
413
|
+
setSelectable(flag: any): any
|
|
414
|
+
|
|
415
|
+
setSelectionAdapter(adapter: any): any
|
|
416
|
+
|
|
417
|
+
setSnapToGridAnchor(point: any): any
|
|
418
|
+
|
|
419
|
+
setUserData(object: any): any
|
|
420
|
+
|
|
421
|
+
setVisible(flag: any, duration: any): any
|
|
422
|
+
|
|
423
|
+
setWidth(width: any): any
|
|
424
|
+
|
|
425
|
+
setX(x: any): any
|
|
426
|
+
|
|
427
|
+
setY(y: any): any
|
|
428
|
+
|
|
429
|
+
startTimer(milliSeconds: any): any
|
|
430
|
+
|
|
431
|
+
stopTimer(): any
|
|
432
|
+
|
|
433
|
+
toBack(figure: any): any
|
|
434
|
+
|
|
435
|
+
toFront(figure: any): any
|
|
436
|
+
|
|
437
|
+
toggleCssClass(className: any): any
|
|
438
|
+
|
|
439
|
+
translate(dx: any, dy: any): any
|
|
440
|
+
|
|
441
|
+
uninstallEditPolicy(policy: any): any
|
|
442
|
+
|
|
443
|
+
unselect(): any
|
|
444
|
+
|
|
445
|
+
static extend: any
|
|
446
|
+
static inject: any
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
class HeadlessCanvas {
|
|
450
|
+
constructor(...args: any[])
|
|
451
|
+
|
|
452
|
+
add(figure: any, x: any, y: any): any
|
|
453
|
+
|
|
454
|
+
calculateConnectionIntersection(): void
|
|
455
|
+
|
|
456
|
+
clear(): any
|
|
457
|
+
|
|
458
|
+
fireEvent(event: any, args: any): void
|
|
459
|
+
|
|
460
|
+
getAllPorts(): any
|
|
461
|
+
|
|
462
|
+
getCommandStack(): any
|
|
463
|
+
|
|
464
|
+
getFigure(id: any): any
|
|
465
|
+
|
|
466
|
+
getFigures(): any
|
|
467
|
+
|
|
468
|
+
getLine(id: any): any
|
|
469
|
+
|
|
470
|
+
getLines(): any
|
|
471
|
+
|
|
472
|
+
hideDecoration(): void
|
|
473
|
+
|
|
474
|
+
init(): void
|
|
475
|
+
|
|
476
|
+
off(eventOrFunction: any): any
|
|
477
|
+
|
|
478
|
+
on(event: any, callback: any): any
|
|
479
|
+
|
|
480
|
+
registerPort(port: any): any
|
|
481
|
+
|
|
482
|
+
showDecoration(): void
|
|
483
|
+
|
|
484
|
+
static extend: any
|
|
485
|
+
static inject: any
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
class HybridPort extends Port {
|
|
489
|
+
constructor(...args: any[])
|
|
490
|
+
|
|
491
|
+
createCommand(...args: any[]): any
|
|
492
|
+
|
|
493
|
+
init(...args: any[]): any
|
|
494
|
+
|
|
495
|
+
static extend: any
|
|
496
|
+
static inject: any
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
class InputPort extends Port {
|
|
500
|
+
constructor(...args: any[])
|
|
501
|
+
|
|
502
|
+
createCommand(...args: any[]): any
|
|
503
|
+
|
|
504
|
+
init(...args: any[]): any
|
|
505
|
+
|
|
506
|
+
static extend: any
|
|
507
|
+
static inject: any
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
class OutputPort extends Port {
|
|
511
|
+
constructor(...args: any[])
|
|
512
|
+
|
|
513
|
+
createCommand(...args: any[]): any
|
|
514
|
+
|
|
515
|
+
init(...args: any[]): any
|
|
516
|
+
|
|
517
|
+
static extend: any
|
|
518
|
+
static inject: any
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
class Port {
|
|
522
|
+
constructor(...args: any[])
|
|
523
|
+
|
|
524
|
+
createCommand(request: any): any
|
|
525
|
+
|
|
526
|
+
fireEvent(...args: any[]): any
|
|
527
|
+
|
|
528
|
+
getConnectionAnchorLocation(referencePoint: any, inquiringConnection: any): any
|
|
529
|
+
|
|
530
|
+
getConnectionAnchorReferencePoint(inquiringConnection: any): any
|
|
531
|
+
|
|
532
|
+
getConnectionDirection(peerPort: any): any
|
|
533
|
+
|
|
534
|
+
getConnections(): any
|
|
535
|
+
|
|
536
|
+
getCoronaWidth(): any
|
|
537
|
+
|
|
538
|
+
getLocator(): any
|
|
539
|
+
|
|
540
|
+
getMaxFanOut(): any
|
|
541
|
+
|
|
542
|
+
getName(): any
|
|
543
|
+
|
|
544
|
+
getPersistentAttributes(...args: any[]): any
|
|
545
|
+
|
|
546
|
+
getSelectionAdapter(): any
|
|
547
|
+
|
|
548
|
+
getValue(): any
|
|
549
|
+
|
|
550
|
+
hitTest(iX: any, iY: any, corona: any): any
|
|
551
|
+
|
|
552
|
+
init(...args: any[]): any
|
|
553
|
+
|
|
554
|
+
onConnect(connection: any): void
|
|
555
|
+
|
|
556
|
+
onDisconnect(connection: any): void
|
|
557
|
+
|
|
558
|
+
onDrag(...args: any[]): any
|
|
559
|
+
|
|
560
|
+
onDragEnd(x: any, y: any, shiftKey: any, ctrlKey: any): void
|
|
561
|
+
|
|
562
|
+
onDragStart(x: any, y: any, shiftKey: any, ctrlKey: any): any
|
|
563
|
+
|
|
564
|
+
onDrop(dropTarget: any, x: any, y: any, shiftKey: any, ctrlKey: any): void
|
|
565
|
+
|
|
566
|
+
onMouseEnter(): void
|
|
567
|
+
|
|
568
|
+
onMouseLeave(): void
|
|
569
|
+
|
|
570
|
+
repaint(...args: any[]): any
|
|
571
|
+
|
|
572
|
+
setBackgroundColor(...args: any[]): any
|
|
573
|
+
|
|
574
|
+
setConnectionAnchor(anchor: any): any
|
|
575
|
+
|
|
576
|
+
setConnectionDirection(direction: any): any
|
|
577
|
+
|
|
578
|
+
setCoronaWidth(width: any): void
|
|
579
|
+
|
|
580
|
+
setGlow(flag: any): any
|
|
581
|
+
|
|
582
|
+
setLocator(locator: any): any
|
|
583
|
+
|
|
584
|
+
setMaxFanOut(count: number): this
|
|
585
|
+
|
|
586
|
+
setName(name: any): void
|
|
587
|
+
|
|
588
|
+
setParent(...args: any[]): any
|
|
589
|
+
|
|
590
|
+
setPersistentAttributes(...args: any[]): any
|
|
591
|
+
|
|
592
|
+
setValue(value: any): any
|
|
593
|
+
|
|
594
|
+
static extend: any
|
|
595
|
+
static inject: any
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
class ResizeHandle {
|
|
599
|
+
constructor(...args: any[])
|
|
600
|
+
|
|
601
|
+
createShapeElement(...args: any[]): any
|
|
602
|
+
|
|
603
|
+
fireEvent(event: any, args: any): void
|
|
604
|
+
|
|
605
|
+
getOwner(): any
|
|
606
|
+
|
|
607
|
+
getSnapToDirection(): any
|
|
608
|
+
|
|
609
|
+
getType(): any
|
|
610
|
+
|
|
611
|
+
hide(): any
|
|
612
|
+
|
|
613
|
+
init(...args: any[]): any
|
|
614
|
+
|
|
615
|
+
onDrag(...args: any[]): any
|
|
616
|
+
|
|
617
|
+
onDragEnd(x: any, y: any, shiftKey: any, ctrlKey: any): void
|
|
618
|
+
|
|
619
|
+
onDragStart(x: any, y: any, shiftKey: any, ctrlKey: any): any
|
|
620
|
+
|
|
621
|
+
onKeyDown(keyCode: any, ctrl: any): void
|
|
622
|
+
|
|
623
|
+
repaint(...args: any[]): any
|
|
624
|
+
|
|
625
|
+
setBackgroundColor(...args: any[]): any
|
|
626
|
+
|
|
627
|
+
setCanvas(...args: any[]): any
|
|
628
|
+
|
|
629
|
+
setDimension(...args: any[]): any
|
|
630
|
+
|
|
631
|
+
setDraggable(...args: any[]): any
|
|
632
|
+
|
|
633
|
+
setOwner(owner: any): any
|
|
634
|
+
|
|
635
|
+
setPosition(x: any, y: any): any
|
|
636
|
+
|
|
637
|
+
setType(type: any): any
|
|
638
|
+
|
|
639
|
+
show(canvas: any): any
|
|
640
|
+
|
|
641
|
+
supportsSnapToHelper(): any
|
|
642
|
+
|
|
643
|
+
updateCursor(shape: any): any
|
|
644
|
+
|
|
645
|
+
static extend: any
|
|
646
|
+
static inject: any
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
class SVGFigure {
|
|
650
|
+
constructor(...args: any[])
|
|
651
|
+
|
|
652
|
+
createSet(): any
|
|
653
|
+
|
|
654
|
+
getSVG(): any
|
|
655
|
+
|
|
656
|
+
importSVG(canvas: any, rawSVG: any): any
|
|
657
|
+
|
|
658
|
+
init(...args: any[]): any
|
|
659
|
+
|
|
660
|
+
setPersistentAttributes(...args: any[]): any
|
|
661
|
+
|
|
662
|
+
setSVG(svg: any, duration: any): any
|
|
663
|
+
|
|
664
|
+
static extend: any
|
|
665
|
+
static inject: any
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
class Selection {
|
|
669
|
+
constructor(...args: any[])
|
|
670
|
+
|
|
671
|
+
add(figure: any): any
|
|
672
|
+
|
|
673
|
+
clear(): any
|
|
674
|
+
|
|
675
|
+
contains(figure: any, checkDescendant: any): any
|
|
676
|
+
|
|
677
|
+
each(func: any, reverse: any): any
|
|
678
|
+
|
|
679
|
+
getAll(expand: any): any
|
|
680
|
+
|
|
681
|
+
getPrimary(): any
|
|
682
|
+
|
|
683
|
+
getSize(): any
|
|
684
|
+
|
|
685
|
+
init(): void
|
|
686
|
+
|
|
687
|
+
remove(figure: any): any
|
|
688
|
+
|
|
689
|
+
setPrimary(figure: any): any
|
|
690
|
+
|
|
691
|
+
static extend: any
|
|
692
|
+
static inject: any
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
class SetFigure {
|
|
696
|
+
constructor(...args: any[])
|
|
697
|
+
|
|
698
|
+
applyAlpha(): void
|
|
699
|
+
|
|
700
|
+
applyTransformation(): any
|
|
701
|
+
|
|
702
|
+
createSet(): any
|
|
703
|
+
|
|
704
|
+
createShapeElement(): any
|
|
705
|
+
|
|
706
|
+
getTopLevelShapeElement(): any
|
|
707
|
+
|
|
708
|
+
init(...args: any[]): any
|
|
709
|
+
|
|
710
|
+
repaint(...args: any[]): any
|
|
711
|
+
|
|
712
|
+
setCanvas(...args: any[]): any
|
|
713
|
+
|
|
714
|
+
setCssClass(...args: any[]): any
|
|
715
|
+
|
|
716
|
+
setVisible(...args: any[]): any
|
|
717
|
+
|
|
718
|
+
toBack(figure: any): any
|
|
719
|
+
|
|
720
|
+
toFront(figure: any): any
|
|
721
|
+
|
|
722
|
+
static extend: any
|
|
723
|
+
static inject: any
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
class VectorFigure {
|
|
727
|
+
constructor(...args: any[])
|
|
728
|
+
|
|
729
|
+
getBackgroundColor(): any
|
|
730
|
+
|
|
731
|
+
getColor(): any
|
|
732
|
+
|
|
733
|
+
getDashArray(): any
|
|
734
|
+
|
|
735
|
+
getPersistentAttributes(...args: any[]): any
|
|
736
|
+
|
|
737
|
+
getRadius(): any
|
|
738
|
+
|
|
739
|
+
getStroke(): any
|
|
740
|
+
|
|
741
|
+
init(...args: any[]): any
|
|
742
|
+
|
|
743
|
+
repaint(...args: any[]): any
|
|
744
|
+
|
|
745
|
+
setBackgroundColor(color: any): any
|
|
746
|
+
|
|
747
|
+
setColor(color: any): any
|
|
748
|
+
|
|
749
|
+
setDashArray(dashPattern: any): any
|
|
750
|
+
|
|
751
|
+
setGlow(flag: any): any
|
|
752
|
+
|
|
753
|
+
setPersistentAttributes(...args: any[]): any
|
|
754
|
+
|
|
755
|
+
setRadius(radius: any): any
|
|
756
|
+
|
|
757
|
+
setStroke(w: any): any
|
|
758
|
+
|
|
759
|
+
static extend: any
|
|
760
|
+
static inject: any
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
const Configuration: {
|
|
764
|
+
factory: {
|
|
765
|
+
createConnection: any
|
|
766
|
+
createHybridPort: any
|
|
767
|
+
createInputPort: any
|
|
768
|
+
createOutputPort: any
|
|
769
|
+
createResizeHandle: any
|
|
770
|
+
}
|
|
771
|
+
i18n: {
|
|
772
|
+
command: {
|
|
773
|
+
addShape: string
|
|
774
|
+
addVertex: string
|
|
775
|
+
assignShape: string
|
|
776
|
+
changeAttributes: string
|
|
777
|
+
collection: string
|
|
778
|
+
connectPorts: string
|
|
779
|
+
deleteShape: string
|
|
780
|
+
deleteVertex: string
|
|
781
|
+
groupShapes: string
|
|
782
|
+
move: string
|
|
783
|
+
moveLine: string
|
|
784
|
+
moveShape: string
|
|
785
|
+
moveVertex: string
|
|
786
|
+
moveVertices: string
|
|
787
|
+
resizeShape: string
|
|
788
|
+
rotateShape: string
|
|
789
|
+
ungroupShapes: string
|
|
790
|
+
}
|
|
791
|
+
dialog: {
|
|
792
|
+
filenamePrompt: string
|
|
793
|
+
}
|
|
794
|
+
menu: {
|
|
795
|
+
addSegment: string
|
|
796
|
+
deleteSegment: string
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
version: string
|
|
800
|
+
}
|
|
801
|
+
// Circular reference from draw2d.Connection.DROP_FILTER.draw2d
|
|
802
|
+
const Connection: any
|
|
803
|
+
const SnapToHelper: {
|
|
804
|
+
CENTER_H: number
|
|
805
|
+
CENTER_V: number
|
|
806
|
+
EAST: number
|
|
807
|
+
EAST_WEST: number
|
|
808
|
+
NORTH: number
|
|
809
|
+
NORTH_EAST: number
|
|
810
|
+
NORTH_SOUTH: number
|
|
811
|
+
NORTH_WEST: number
|
|
812
|
+
NSEW: number
|
|
813
|
+
SOUTH: number
|
|
814
|
+
SOUTH_EAST: number
|
|
815
|
+
SOUTH_WEST: number
|
|
816
|
+
WEST: number
|
|
817
|
+
}
|
|
818
|
+
const decoration: {
|
|
819
|
+
connection: {
|
|
820
|
+
ArrowDecorator: any
|
|
821
|
+
BarDecorator: any
|
|
822
|
+
CircleDecorator: any
|
|
823
|
+
Decorator: any
|
|
824
|
+
DiamondDecorator: any
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
const isTouchDevice: boolean
|
|
828
|
+
const layout: {
|
|
829
|
+
anchor: {
|
|
830
|
+
CenterEdgeConnectionAnchor: any
|
|
831
|
+
ChopboxConnectionAnchor: any
|
|
832
|
+
ConnectionAnchor: any
|
|
833
|
+
FanConnectionAnchor: any
|
|
834
|
+
ShortesPathConnectionAnchor: any
|
|
835
|
+
}
|
|
836
|
+
connection: {
|
|
837
|
+
CircuitConnectionRouter: any
|
|
838
|
+
ConnectionRouter: any
|
|
839
|
+
DirectRouter: any
|
|
840
|
+
FanConnectionRouter: any
|
|
841
|
+
InteractiveManhattanConnectionRouter: any
|
|
842
|
+
ManhattanBridgedConnectionRouter: any
|
|
843
|
+
ManhattanConnectionRouter: any
|
|
844
|
+
MazeConnectionRouter: any
|
|
845
|
+
MuteableManhattanConnectionRouter: any
|
|
846
|
+
RubberbandRouter: any
|
|
847
|
+
SketchConnectionRouter: any
|
|
848
|
+
SplineConnectionRouter: any
|
|
849
|
+
VertexRouter: any
|
|
850
|
+
}
|
|
851
|
+
locator: {
|
|
852
|
+
BottomLocator: any
|
|
853
|
+
CenterLocator: any
|
|
854
|
+
ConnectionLocator: any
|
|
855
|
+
DraggableLocator: any
|
|
856
|
+
InputPortLocator: any
|
|
857
|
+
LeftLocator: any
|
|
858
|
+
Locator: any
|
|
859
|
+
ManhattanMidpointLocator: any
|
|
860
|
+
OutputPortLocator: any
|
|
861
|
+
ParallelMidpointLocator: any
|
|
862
|
+
PolylineMidpointLocator: any
|
|
863
|
+
PortLocator: any
|
|
864
|
+
RightLocator: any
|
|
865
|
+
SmartDraggableLocator: any
|
|
866
|
+
TopLocator: any
|
|
867
|
+
XYAbsPortLocator: any
|
|
868
|
+
XYRelPortLocator: any
|
|
869
|
+
}
|
|
870
|
+
mesh: {
|
|
871
|
+
ExplodeLayouter: any
|
|
872
|
+
MeshLayouter: any
|
|
873
|
+
ProposedMeshChange: any
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
const shape: {
|
|
877
|
+
analog: {
|
|
878
|
+
OpAmp: any
|
|
879
|
+
ResistorBridge: any
|
|
880
|
+
ResistorVertical: any
|
|
881
|
+
VoltageSupplyHorizontal: any
|
|
882
|
+
VoltageSupplyVertical: any
|
|
883
|
+
}
|
|
884
|
+
arrow: {
|
|
885
|
+
CalligrapherArrowDownLeft: any
|
|
886
|
+
CalligrapherArrowLeft: any
|
|
887
|
+
}
|
|
888
|
+
basic: {
|
|
889
|
+
Arc: any
|
|
890
|
+
Circle: any
|
|
891
|
+
Diamond: any
|
|
892
|
+
GhostVertexResizeHandle: any
|
|
893
|
+
Image: any
|
|
894
|
+
Label: any
|
|
895
|
+
Line: any
|
|
896
|
+
LineEndResizeHandle: any
|
|
897
|
+
LineResizeHandle: any
|
|
898
|
+
LineStartResizeHandle: any
|
|
899
|
+
Oval: any
|
|
900
|
+
PolyLine: any
|
|
901
|
+
Polygon: any
|
|
902
|
+
Rectangle: typeof draw2d.geo.Rectangle
|
|
903
|
+
Text: any
|
|
904
|
+
VertexResizeHandle: any
|
|
905
|
+
}
|
|
906
|
+
composite: {
|
|
907
|
+
Composite: any
|
|
908
|
+
Group: any
|
|
909
|
+
Jailhouse: any
|
|
910
|
+
Raft: any
|
|
911
|
+
StrongComposite: any
|
|
912
|
+
WeakComposite: any
|
|
913
|
+
}
|
|
914
|
+
diagram: {
|
|
915
|
+
Diagram: any
|
|
916
|
+
Pie: any
|
|
917
|
+
Sparkline: any
|
|
918
|
+
}
|
|
919
|
+
dimetric: {
|
|
920
|
+
Rectangle: any
|
|
921
|
+
}
|
|
922
|
+
flowchart: {
|
|
923
|
+
Document: any
|
|
924
|
+
}
|
|
925
|
+
icon: {
|
|
926
|
+
Acw: any
|
|
927
|
+
Alarm: any
|
|
928
|
+
Anonymous: any
|
|
929
|
+
Apple: any
|
|
930
|
+
Apps: any
|
|
931
|
+
ArrowDown: any
|
|
932
|
+
ArrowLeft: any
|
|
933
|
+
ArrowLeft2: any
|
|
934
|
+
ArrowRight: any
|
|
935
|
+
ArrowRight2: any
|
|
936
|
+
ArrowUp: any
|
|
937
|
+
Aumade: any
|
|
938
|
+
BarChart: any
|
|
939
|
+
BioHazard: any
|
|
940
|
+
Book: any
|
|
941
|
+
Bookmark: any
|
|
942
|
+
Books: any
|
|
943
|
+
Bubble: any
|
|
944
|
+
Bug: any
|
|
945
|
+
Calendar: any
|
|
946
|
+
Cart: any
|
|
947
|
+
Ccw: any
|
|
948
|
+
Chat: any
|
|
949
|
+
Check: any
|
|
950
|
+
Chrome: any
|
|
951
|
+
Clip: any
|
|
952
|
+
Clock: any
|
|
953
|
+
Cloud: any
|
|
954
|
+
Cloud2: any
|
|
955
|
+
CloudDown: any
|
|
956
|
+
CloudUp: any
|
|
957
|
+
Cloudy: any
|
|
958
|
+
Code: any
|
|
959
|
+
CodeTalk: any
|
|
960
|
+
CommandLine: any
|
|
961
|
+
Connect: any
|
|
962
|
+
Contract: any
|
|
963
|
+
Crop: any
|
|
964
|
+
Cross: any
|
|
965
|
+
Cube: any
|
|
966
|
+
Customer: any
|
|
967
|
+
Db: any
|
|
968
|
+
Detour: any
|
|
969
|
+
Diagram: any
|
|
970
|
+
Disconnect: any
|
|
971
|
+
DockBottom: any
|
|
972
|
+
DockLeft: any
|
|
973
|
+
DockRight: any
|
|
974
|
+
DockTop: any
|
|
975
|
+
Download: any
|
|
976
|
+
Dry: any
|
|
977
|
+
Employee: any
|
|
978
|
+
End: any
|
|
979
|
+
Ethernet: any
|
|
980
|
+
Exchange: any
|
|
981
|
+
Expand: any
|
|
982
|
+
Export: any
|
|
983
|
+
Fave: any
|
|
984
|
+
Feed: any
|
|
985
|
+
Ff: any
|
|
986
|
+
Firefox: any
|
|
987
|
+
Flag: any
|
|
988
|
+
Flickr: any
|
|
989
|
+
Folder: any
|
|
990
|
+
Font: any
|
|
991
|
+
Fork: any
|
|
992
|
+
ForkAlt: any
|
|
993
|
+
FullCube: any
|
|
994
|
+
Future: any
|
|
995
|
+
GRaphael: any
|
|
996
|
+
Gear: any
|
|
997
|
+
Gear2: any
|
|
998
|
+
GitHub: any
|
|
999
|
+
GitHubAlt: any
|
|
1000
|
+
Glasses: any
|
|
1001
|
+
Globe: any
|
|
1002
|
+
GlobeAlt: any
|
|
1003
|
+
GlobeAlt2: any
|
|
1004
|
+
Hail: any
|
|
1005
|
+
Hammer: any
|
|
1006
|
+
HammerAndScrewDriver: any
|
|
1007
|
+
HangUp: any
|
|
1008
|
+
Help: any
|
|
1009
|
+
History: any
|
|
1010
|
+
Home: any
|
|
1011
|
+
IMac: any
|
|
1012
|
+
Icon: any
|
|
1013
|
+
Icons: any
|
|
1014
|
+
Ie: any
|
|
1015
|
+
Ie9: any
|
|
1016
|
+
Import: any
|
|
1017
|
+
InkScape: any
|
|
1018
|
+
Ipad: any
|
|
1019
|
+
Iphone: any
|
|
1020
|
+
JQuery: any
|
|
1021
|
+
Jigsaw: any
|
|
1022
|
+
Key: any
|
|
1023
|
+
Lab: any
|
|
1024
|
+
Lamp: any
|
|
1025
|
+
Lamp_alt: any
|
|
1026
|
+
Landing: any
|
|
1027
|
+
Landscape1: any
|
|
1028
|
+
Landscape2: any
|
|
1029
|
+
LineChart: any
|
|
1030
|
+
Link: any
|
|
1031
|
+
LinkedIn: any
|
|
1032
|
+
Linux: any
|
|
1033
|
+
List: any
|
|
1034
|
+
Location: any
|
|
1035
|
+
Lock: any
|
|
1036
|
+
Locked: any
|
|
1037
|
+
Magic: any
|
|
1038
|
+
Magnet: any
|
|
1039
|
+
Mail: any
|
|
1040
|
+
Man: any
|
|
1041
|
+
Merge: any
|
|
1042
|
+
Mic: any
|
|
1043
|
+
MicMute: any
|
|
1044
|
+
Minus: any
|
|
1045
|
+
NewWindow: any
|
|
1046
|
+
No: any
|
|
1047
|
+
NoMagnet: any
|
|
1048
|
+
NodeJs: any
|
|
1049
|
+
Notebook: any
|
|
1050
|
+
Noview: any
|
|
1051
|
+
Opera: any
|
|
1052
|
+
Package: any
|
|
1053
|
+
Page: any
|
|
1054
|
+
Page2: any
|
|
1055
|
+
Pallete: any
|
|
1056
|
+
Palm: any
|
|
1057
|
+
Paper: any
|
|
1058
|
+
Parent: any
|
|
1059
|
+
Pc: any
|
|
1060
|
+
Pen: any
|
|
1061
|
+
Pensil: any
|
|
1062
|
+
People: any
|
|
1063
|
+
Phone: any
|
|
1064
|
+
Photo: any
|
|
1065
|
+
Picker: any
|
|
1066
|
+
Picture: any
|
|
1067
|
+
PieChart: any
|
|
1068
|
+
Plane: any
|
|
1069
|
+
Plugin: any
|
|
1070
|
+
Plus: any
|
|
1071
|
+
Power: any
|
|
1072
|
+
Ppt: any
|
|
1073
|
+
Printer: any
|
|
1074
|
+
Quote: any
|
|
1075
|
+
Rain: any
|
|
1076
|
+
Raphael: any
|
|
1077
|
+
ReflectH: any
|
|
1078
|
+
ReflectV: any
|
|
1079
|
+
Refresh: any
|
|
1080
|
+
Resize2: any
|
|
1081
|
+
Rotate: any
|
|
1082
|
+
Ruler: any
|
|
1083
|
+
Run: any
|
|
1084
|
+
Rw: any
|
|
1085
|
+
Safari: any
|
|
1086
|
+
ScrewDriver: any
|
|
1087
|
+
Search: any
|
|
1088
|
+
Sencha: any
|
|
1089
|
+
Settings: any
|
|
1090
|
+
SettingsAlt: any
|
|
1091
|
+
Shuffle: any
|
|
1092
|
+
Skull: any
|
|
1093
|
+
Skype: any
|
|
1094
|
+
SlideShare: any
|
|
1095
|
+
Smile: any
|
|
1096
|
+
Smile2: any
|
|
1097
|
+
Snow: any
|
|
1098
|
+
Split: any
|
|
1099
|
+
Star: any
|
|
1100
|
+
Star2: any
|
|
1101
|
+
Star2Off: any
|
|
1102
|
+
Star3: any
|
|
1103
|
+
Star3Off: any
|
|
1104
|
+
StarOff: any
|
|
1105
|
+
Start: any
|
|
1106
|
+
Sticker: any
|
|
1107
|
+
Stop: any
|
|
1108
|
+
StopWatch: any
|
|
1109
|
+
Sun: any
|
|
1110
|
+
Svg: any
|
|
1111
|
+
TShirt: any
|
|
1112
|
+
Tag: any
|
|
1113
|
+
TakeOff: any
|
|
1114
|
+
Talke: any
|
|
1115
|
+
Talkq: any
|
|
1116
|
+
Thunder: any
|
|
1117
|
+
Trash: any
|
|
1118
|
+
Twitter: any
|
|
1119
|
+
TwitterBird: any
|
|
1120
|
+
Umbrella: any
|
|
1121
|
+
Undo: any
|
|
1122
|
+
Unlock: any
|
|
1123
|
+
Usb: any
|
|
1124
|
+
User: any
|
|
1125
|
+
Users: any
|
|
1126
|
+
Video: any
|
|
1127
|
+
View: any
|
|
1128
|
+
Vim: any
|
|
1129
|
+
Volume0: any
|
|
1130
|
+
Volume1: any
|
|
1131
|
+
Volume2: any
|
|
1132
|
+
Volume3: any
|
|
1133
|
+
Warning: any
|
|
1134
|
+
WheelChair: any
|
|
1135
|
+
Windows: any
|
|
1136
|
+
Woman: any
|
|
1137
|
+
Wrench: any
|
|
1138
|
+
Wrench2: any
|
|
1139
|
+
Wrench3: any
|
|
1140
|
+
ZoomIn: any
|
|
1141
|
+
ZoomOut: any
|
|
1142
|
+
}
|
|
1143
|
+
layout: {
|
|
1144
|
+
FlexGridLayout: any
|
|
1145
|
+
HorizontalLayout: any
|
|
1146
|
+
Layout: any
|
|
1147
|
+
StackLayout: any
|
|
1148
|
+
TableLayout: any
|
|
1149
|
+
VerticalLayout: any
|
|
1150
|
+
}
|
|
1151
|
+
node: {
|
|
1152
|
+
Between: any
|
|
1153
|
+
End: any
|
|
1154
|
+
Fulcrum: any
|
|
1155
|
+
HorizontalBus: any
|
|
1156
|
+
Hub: any
|
|
1157
|
+
Node: any
|
|
1158
|
+
Start: any
|
|
1159
|
+
VerticalBus: any
|
|
1160
|
+
}
|
|
1161
|
+
note: {
|
|
1162
|
+
PostIt: any
|
|
1163
|
+
}
|
|
1164
|
+
pert: {
|
|
1165
|
+
Activity: any
|
|
1166
|
+
Start: any
|
|
1167
|
+
}
|
|
1168
|
+
state: {
|
|
1169
|
+
Connection: any
|
|
1170
|
+
End: any
|
|
1171
|
+
Start: any
|
|
1172
|
+
State: any
|
|
1173
|
+
}
|
|
1174
|
+
widget: {
|
|
1175
|
+
Slider: any
|
|
1176
|
+
Widget: any
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
const storage: {}
|
|
1180
|
+
namespace command {
|
|
1181
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1182
|
+
const Command: any
|
|
1183
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1184
|
+
const CommandAdd: any
|
|
1185
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1186
|
+
const CommandAddVertex: any
|
|
1187
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1188
|
+
const CommandAssignFigure: any
|
|
1189
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1190
|
+
const CommandAttr: any
|
|
1191
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1192
|
+
const CommandBoundingBox: any
|
|
1193
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1194
|
+
const CommandCollection: any
|
|
1195
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1196
|
+
const CommandConnect: any
|
|
1197
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1198
|
+
const CommandDelete: any
|
|
1199
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1200
|
+
const CommandDeleteGroup: any
|
|
1201
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1202
|
+
const CommandGroup: any
|
|
1203
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1204
|
+
const CommandMove: any
|
|
1205
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1206
|
+
const CommandMoveConnection: any
|
|
1207
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1208
|
+
const CommandMoveLine: any
|
|
1209
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1210
|
+
const CommandMoveVertex: any
|
|
1211
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1212
|
+
const CommandMoveVertices: any
|
|
1213
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1214
|
+
const CommandReconnect: any
|
|
1215
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1216
|
+
const CommandRemoveVertex: any
|
|
1217
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1218
|
+
const CommandReplaceVertices: any
|
|
1219
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1220
|
+
const CommandResize: any
|
|
1221
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1222
|
+
const CommandRotate: any
|
|
1223
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1224
|
+
const CommandStack: any
|
|
1225
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1226
|
+
const CommandStackEvent: any
|
|
1227
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1228
|
+
const CommandStackEventListener: any
|
|
1229
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1230
|
+
const CommandType: any
|
|
1231
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.command
|
|
1232
|
+
const CommandUngroup: any
|
|
1233
|
+
}
|
|
1234
|
+
namespace geo {
|
|
1235
|
+
/**
|
|
1236
|
+
* Static util function to determine the minimal distance of point(px,py) on the line(x1,y1,x2,y2)
|
|
1237
|
+
**/
|
|
1238
|
+
const Line: {
|
|
1239
|
+
/**
|
|
1240
|
+
* Returns the relative position of the point on the line between [0..1]
|
|
1241
|
+
* The point "p" must be part of the line!!
|
|
1242
|
+
*
|
|
1243
|
+
* 0 => given point is on the start location
|
|
1244
|
+
* ..=> given point is in between
|
|
1245
|
+
* 1 => given point is at the end
|
|
1246
|
+
*/
|
|
1247
|
+
inverseLerp: (
|
|
1248
|
+
X1: number,
|
|
1249
|
+
Y1: number,
|
|
1250
|
+
X2: number,
|
|
1251
|
+
Y2: number,
|
|
1252
|
+
px: number,
|
|
1253
|
+
py: number
|
|
1254
|
+
) => number
|
|
1255
|
+
/**
|
|
1256
|
+
* Returns the projection of the point onto the line.
|
|
1257
|
+
**/
|
|
1258
|
+
pointProjection: (
|
|
1259
|
+
X1: number,
|
|
1260
|
+
Y1: number,
|
|
1261
|
+
X2: number,
|
|
1262
|
+
Y2: number,
|
|
1263
|
+
px: number,
|
|
1264
|
+
py: number
|
|
1265
|
+
) => draw2d.geo.Point | null
|
|
1266
|
+
distance: (X1: number, Y1: number, X2: number, Y2: number, px: number, py: number) => number
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
/** Represents a point (x, y) in 2-dimensional space. */
|
|
1270
|
+
class Point extends Figure {
|
|
1271
|
+
public readonly x: number
|
|
1272
|
+
public readonly y: number
|
|
1273
|
+
|
|
1274
|
+
public readonly bx: number | null
|
|
1275
|
+
public readonly by: number | null
|
|
1276
|
+
public readonly bw: number | null
|
|
1277
|
+
public readonly bh: number | null
|
|
1278
|
+
|
|
1279
|
+
constructor(x: geo.Point)
|
|
1280
|
+
constructor(x: number, y: number)
|
|
1281
|
+
|
|
1282
|
+
/**
|
|
1283
|
+
* Ensure the boundary of the rectangle. If set, the rectangle keeps always inside
|
|
1284
|
+
* the boundary. It is like a virtual fence.
|
|
1285
|
+
*/
|
|
1286
|
+
setBoundary(bx: number, by: number, bw: number, bh: number): this
|
|
1287
|
+
setBoundary(rectangle: draw2d.geo.Rectangle): this
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* Moves this Rectangle horizontally by dx and vertically by dy, then returns
|
|
1291
|
+
* this Rectangle for convenience.
|
|
1292
|
+
*
|
|
1293
|
+
* The method return the object itself. This allows you to do command chaining, where
|
|
1294
|
+
* you can perform multiple methods on the same elements.
|
|
1295
|
+
**/
|
|
1296
|
+
translate(dx: number, dy: number): this
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* The X value of the point
|
|
1300
|
+
*/
|
|
1301
|
+
getX(): number
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* The y value of the point
|
|
1305
|
+
*/
|
|
1306
|
+
getY(): number
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* Set the new X value of the point
|
|
1310
|
+
*/
|
|
1311
|
+
setX(x: number): this
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* Set the new Y value of the point
|
|
1315
|
+
*/
|
|
1316
|
+
setY(y: number): this
|
|
1317
|
+
|
|
1318
|
+
/**
|
|
1319
|
+
* Set the new x/y coordinates of this point
|
|
1320
|
+
*/
|
|
1321
|
+
setPosition(x: number, y: number): this
|
|
1322
|
+
setPosition(x: Point): this
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* Calculates the relative position of the specified Point to this Point.
|
|
1326
|
+
*/
|
|
1327
|
+
getPosition(p: Point): PositionConstants
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Compares two points and return [true] if x and y are equals.
|
|
1331
|
+
*/
|
|
1332
|
+
equals(p: Point): boolean
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* Return the distance between this point and the hands over.
|
|
1336
|
+
*/
|
|
1337
|
+
distance(other: Point): number
|
|
1338
|
+
|
|
1339
|
+
/**
|
|
1340
|
+
* Return the length of the vector measured from [0,0]
|
|
1341
|
+
* @since 2.10.0
|
|
1342
|
+
*/
|
|
1343
|
+
length(): number
|
|
1344
|
+
|
|
1345
|
+
/**
|
|
1346
|
+
* Return a new Point translated with the x/y values of the hands over point.
|
|
1347
|
+
*/
|
|
1348
|
+
translated(x: number, y: number): Point
|
|
1349
|
+
translated(x: Point): Point
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* Scales this point with the handover factor
|
|
1353
|
+
*/
|
|
1354
|
+
scale(factor: number): this
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* Return a **new** Point scaled with the givben factor
|
|
1358
|
+
*/
|
|
1359
|
+
scaled(factor: number): Point
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* Return an objects with all important attributes for XML or JSON serialization
|
|
1363
|
+
*/
|
|
1364
|
+
getPersistentAttributes(): { x: number; y: number }
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* Read all attributes from the serialized properties and transfer them into the shape.
|
|
1368
|
+
*/
|
|
1369
|
+
setPersistentAttributes(memento: { x: number; y: number }): this
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* Substract the given point and return the **new** point.
|
|
1373
|
+
*/
|
|
1374
|
+
subtract(that: Point): Point
|
|
1375
|
+
|
|
1376
|
+
dot(that: Point): number
|
|
1377
|
+
|
|
1378
|
+
cross(that: Point): number
|
|
1379
|
+
|
|
1380
|
+
lerp(that: Point, t: number): Point
|
|
1381
|
+
|
|
1382
|
+
/**
|
|
1383
|
+
* Return a cloned point
|
|
1384
|
+
*/
|
|
1385
|
+
clone(): Point
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
/**
|
|
1389
|
+
* Static values for point orientation.
|
|
1390
|
+
*/
|
|
1391
|
+
enum PositionConstants {
|
|
1392
|
+
NORTH = 1,
|
|
1393
|
+
SOUTH = 4,
|
|
1394
|
+
WEST = 8,
|
|
1395
|
+
EAST = 16
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
/**
|
|
1399
|
+
* Represents a vector within 2-dimensional Euclidean space.
|
|
1400
|
+
*/
|
|
1401
|
+
class Ray extends Point {
|
|
1402
|
+
isHorizontal(): boolean
|
|
1403
|
+
|
|
1404
|
+
similarity(otherRay: Ray): number
|
|
1405
|
+
|
|
1406
|
+
getAveraged(otherRay: Ray): Ray
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* Represents a Rectangle(x, y, width, height).
|
|
1411
|
+
*/
|
|
1412
|
+
class Rectangle extends Point {
|
|
1413
|
+
public readonly x: number
|
|
1414
|
+
public readonly y: number
|
|
1415
|
+
|
|
1416
|
+
public readonly w: number
|
|
1417
|
+
public readonly h: number
|
|
1418
|
+
|
|
1419
|
+
readonly DIRECTION_UP = RECTANGLE_DIRECTION.UP
|
|
1420
|
+
readonly DIRECTION_RIGHT = RECTANGLE_DIRECTION.RIGHT
|
|
1421
|
+
readonly DIRECTION_DOWN = RECTANGLE_DIRECTION.DOWN
|
|
1422
|
+
readonly DIRECTION_LEFT = RECTANGLE_DIRECTION.LEFT
|
|
1423
|
+
|
|
1424
|
+
/**
|
|
1425
|
+
* Creates a new Point object with the hands over coordinates.
|
|
1426
|
+
* The constructor consumes almost any kind of rectangle definitions
|
|
1427
|
+
* like:
|
|
1428
|
+
* let rect0 = new draw2d.geo.Rectangle({x:0,y:0,width:20,height:20});
|
|
1429
|
+
* let rect1 = new draw2d.geo.Rectangle({x:0,y:0,w:20,h:20});
|
|
1430
|
+
* let rect2 = new draw2d.geo.Rectangle($("#divid")[0].getBoundingClientRect());
|
|
1431
|
+
* let rect3 = new draw2d.geo.Rectangle(rect1);
|
|
1432
|
+
*
|
|
1433
|
+
* The rectangle class is usefull for any kind of intersection, hitTest, contains,...calculation
|
|
1434
|
+
* or to set the bounding box of any shape.
|
|
1435
|
+
*/
|
|
1436
|
+
constructor(x: Rectangle): void
|
|
1437
|
+
constructor(x: DOMRect): void
|
|
1438
|
+
constructor(x: { x: number; y: number; w: number; h: number }): void
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
*
|
|
1442
|
+
* Resizes this Rectangle by the values supplied as input and returns this for
|
|
1443
|
+
* convenience. This Rectangle's width will become this.width + dw. This
|
|
1444
|
+
* Rectangle's height will become this.height + dh.
|
|
1445
|
+
*
|
|
1446
|
+
* The method return the object itself. This allows you to do command chaining, where
|
|
1447
|
+
* you can perform multiple methods on the same elements.
|
|
1448
|
+
**/
|
|
1449
|
+
resize(dw: number, dh: number): this
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* Adds the specified padding to the rectangle's bounds. This Rectangle's width
|
|
1453
|
+
* will become this.width + dw. The Rectangle's height will become this.height + dh.
|
|
1454
|
+
* The top left corner moves -dw/2, -dh/2
|
|
1455
|
+
**/
|
|
1456
|
+
scale(dw: number, dh: number): this
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* Translate the rectangle with the given x/y coordiante.
|
|
1460
|
+
*/
|
|
1461
|
+
translate(x: number, y: number): this
|
|
1462
|
+
translate(x: Point): this
|
|
1463
|
+
|
|
1464
|
+
/**
|
|
1465
|
+
* Returns a copy of the translated rectangle
|
|
1466
|
+
*/
|
|
1467
|
+
translated(x: number, y: number): Rectangle
|
|
1468
|
+
translated(x: Point): Rectangle
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
* Sets the parameters of this Rectangle from the Rectangle passed in and
|
|
1472
|
+
* returns this for convenience.
|
|
1473
|
+
*
|
|
1474
|
+
* The method return the object itself. This allows you to do command chaining, where
|
|
1475
|
+
* you can perform multiple methods on the same elements.
|
|
1476
|
+
*/
|
|
1477
|
+
setBounds(rect: Rectangle): this
|
|
1478
|
+
|
|
1479
|
+
/**
|
|
1480
|
+
* Returns <code>true</code> if this Rectangle's width or height is less than or
|
|
1481
|
+
* equal to 0.
|
|
1482
|
+
*/
|
|
1483
|
+
isEmpty(): boolean
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* The width of the dimension element.
|
|
1487
|
+
**/
|
|
1488
|
+
getWidth(): number
|
|
1489
|
+
|
|
1490
|
+
/**
|
|
1491
|
+
* Set the new width of the rectangle.
|
|
1492
|
+
*/
|
|
1493
|
+
setWidth(w: number): this
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* The height of the dimension element.
|
|
1497
|
+
**/
|
|
1498
|
+
getHeight(): number
|
|
1499
|
+
|
|
1500
|
+
/**
|
|
1501
|
+
* Set the new height of the rectangle.
|
|
1502
|
+
*/
|
|
1503
|
+
setHeight(h: number): this
|
|
1504
|
+
|
|
1505
|
+
/**
|
|
1506
|
+
* The x coordinate of the left corner.
|
|
1507
|
+
**/
|
|
1508
|
+
getLeft(): number
|
|
1509
|
+
|
|
1510
|
+
/**
|
|
1511
|
+
* The x coordinate of the right corner.
|
|
1512
|
+
**/
|
|
1513
|
+
getRight(): number
|
|
1514
|
+
|
|
1515
|
+
/**
|
|
1516
|
+
* The y coordinate of the top.
|
|
1517
|
+
**/
|
|
1518
|
+
getTop(): number
|
|
1519
|
+
|
|
1520
|
+
/**
|
|
1521
|
+
* The y coordinate of the bottom.
|
|
1522
|
+
**/
|
|
1523
|
+
getBottom(): number
|
|
1524
|
+
|
|
1525
|
+
/**
|
|
1526
|
+
* The top left corner of the dimension object.
|
|
1527
|
+
**/
|
|
1528
|
+
getTopLeft(): Point
|
|
1529
|
+
|
|
1530
|
+
/**
|
|
1531
|
+
* The top center coordinate of the dimension object.
|
|
1532
|
+
**/
|
|
1533
|
+
getTopCenter(): Point
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* The top right corner of the dimension object.
|
|
1537
|
+
**/
|
|
1538
|
+
getTopRight(): Point
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* The center left of the dimension object.
|
|
1542
|
+
**/
|
|
1543
|
+
getCenterLeft(): Point
|
|
1544
|
+
|
|
1545
|
+
/**
|
|
1546
|
+
* The center right of the dimension object.
|
|
1547
|
+
**/
|
|
1548
|
+
getCenterRight(): Point
|
|
1549
|
+
|
|
1550
|
+
/**
|
|
1551
|
+
* The bottom left corner of the dimension object.
|
|
1552
|
+
**/
|
|
1553
|
+
getBottomLeft(): Point
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* The bottom center coordinate of the dimension object.
|
|
1557
|
+
**/
|
|
1558
|
+
getBottomCenter(): Point
|
|
1559
|
+
|
|
1560
|
+
/**
|
|
1561
|
+
* The center of the dimension object
|
|
1562
|
+
**/
|
|
1563
|
+
getCenter(): Point
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* Bottom right corner of the object
|
|
1567
|
+
**/
|
|
1568
|
+
getBottomRight(): Point
|
|
1569
|
+
|
|
1570
|
+
/**
|
|
1571
|
+
* Return all points of the rectangle as array. Starting at topLeft and the
|
|
1572
|
+
* clockwise.
|
|
1573
|
+
*/
|
|
1574
|
+
getVertices(): util.ArrayList<Point>
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* Return a new rectangle which fits into this rectangle. <b>ONLY</b> the x/y coordinates
|
|
1578
|
+
* will be changed. Not the dimension of the given rectangle.
|
|
1579
|
+
*/
|
|
1580
|
+
moveInside(rect: Rectangle): Rectangle
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
*
|
|
1584
|
+
* Return the minimum distance of this rectangle to the given {@link draw2d.geo.Point} or
|
|
1585
|
+
* {link draw2d.geo.Rectangle}.
|
|
1586
|
+
*
|
|
1587
|
+
* pointOrRectangle - the reference point/rectangle for the distance calculation
|
|
1588
|
+
*/
|
|
1589
|
+
getDistance(pointOrRectangle: Point | Rectangle): number
|
|
1590
|
+
|
|
1591
|
+
/**
|
|
1592
|
+
* Determin the octant of r2 in relation to this rectangle.
|
|
1593
|
+
* <pre>
|
|
1594
|
+
*
|
|
1595
|
+
* 0 | 1 | 2
|
|
1596
|
+
* __|___|__
|
|
1597
|
+
* 7 | 8 | 3
|
|
1598
|
+
* __|___|__
|
|
1599
|
+
* 6 | 5 | 4
|
|
1600
|
+
* </pre>
|
|
1601
|
+
*/
|
|
1602
|
+
determineOctant(r2: Rectangle): number
|
|
1603
|
+
|
|
1604
|
+
/**
|
|
1605
|
+
* Returns the direction the point <i>p</i> is in relation to the given rectangle.
|
|
1606
|
+
* Util method for inherit router implementations.
|
|
1607
|
+
*
|
|
1608
|
+
* <p>
|
|
1609
|
+
* Possible values:
|
|
1610
|
+
* <ul>
|
|
1611
|
+
* <li>up -> 0</li>
|
|
1612
|
+
* <li>right -> 1</li>
|
|
1613
|
+
* <li>down -> 2</li>
|
|
1614
|
+
* <li>left -> 3</li>
|
|
1615
|
+
* </ul>
|
|
1616
|
+
* <p>
|
|
1617
|
+
*
|
|
1618
|
+
* @returns {Number} the direction from <i>r</i> to <i>p</i>
|
|
1619
|
+
*/
|
|
1620
|
+
getDirection(other: Point): RECTANGLE_DIRECTION
|
|
1621
|
+
|
|
1622
|
+
/**
|
|
1623
|
+
* Compares two rectangle objects
|
|
1624
|
+
**/
|
|
1625
|
+
equals(o: Rectangle): boolean
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* Detect whenever the hands over coordinate is inside the rectangle.
|
|
1629
|
+
*/
|
|
1630
|
+
hitTest(iX: Point): boolean
|
|
1631
|
+
hitTest(iX: number, iY: number): boolean
|
|
1632
|
+
|
|
1633
|
+
/**
|
|
1634
|
+
* return true if this rectangle inside the hand over rectangle
|
|
1635
|
+
*/
|
|
1636
|
+
isInside(rect: Rectangle): boolean
|
|
1637
|
+
|
|
1638
|
+
/**
|
|
1639
|
+
* return true if this rectangle contains the hand over rectangle.
|
|
1640
|
+
*/
|
|
1641
|
+
contains(rect: Rectangle): boolean
|
|
1642
|
+
|
|
1643
|
+
/**
|
|
1644
|
+
* checks whenever the rectangles has an intersection.
|
|
1645
|
+
*/
|
|
1646
|
+
intersects(rect: Rectangle): boolean
|
|
1647
|
+
|
|
1648
|
+
/**
|
|
1649
|
+
* Merge this rectangle with the given one.
|
|
1650
|
+
*/
|
|
1651
|
+
merge(rect: Rectangle): this
|
|
1652
|
+
|
|
1653
|
+
/**
|
|
1654
|
+
* returns the intersection points with the given line if any exists
|
|
1655
|
+
*/
|
|
1656
|
+
intersectionWithLine(start: Point, end: Point): util.ArrayList<Point | null>
|
|
1657
|
+
|
|
1658
|
+
/**
|
|
1659
|
+
* Returns a copy of this rectangle
|
|
1660
|
+
*/
|
|
1661
|
+
clone(): Rectangle
|
|
1662
|
+
|
|
1663
|
+
/**
|
|
1664
|
+
* converts the rectangle to JSON representation. required for the draw2d.io.Writer
|
|
1665
|
+
*/
|
|
1666
|
+
toJSON(): { x: number; y: number; width: number; height: number }
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
const Util: {
|
|
1670
|
+
/**
|
|
1671
|
+
*
|
|
1672
|
+
* start - start point of a line
|
|
1673
|
+
* end - end point of a line
|
|
1674
|
+
* distanceFromStart - distance from the start point to extrapolate a new point
|
|
1675
|
+
* returns a new point with the distance *distanceFromStart* from the start point
|
|
1676
|
+
*/
|
|
1677
|
+
insetPoint(
|
|
1678
|
+
start: Point,
|
|
1679
|
+
end: Point,
|
|
1680
|
+
distanceFromStart: number
|
|
1681
|
+
): Point | { x: number; y: number }
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
namespace io {
|
|
1686
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.io
|
|
1687
|
+
const Reader: any
|
|
1688
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.io
|
|
1689
|
+
const Writer: any
|
|
1690
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.io
|
|
1691
|
+
const json: any
|
|
1692
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.io
|
|
1693
|
+
const png: any
|
|
1694
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.io
|
|
1695
|
+
const svg: any
|
|
1696
|
+
}
|
|
1697
|
+
namespace policy {
|
|
1698
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.policy
|
|
1699
|
+
const EditPolicy: any
|
|
1700
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.policy
|
|
1701
|
+
const canvas: any
|
|
1702
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.policy
|
|
1703
|
+
const connection: any
|
|
1704
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.policy
|
|
1705
|
+
const figure: any
|
|
1706
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.policy
|
|
1707
|
+
const line: any
|
|
1708
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.policy
|
|
1709
|
+
const port: any
|
|
1710
|
+
}
|
|
1711
|
+
namespace ui {
|
|
1712
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.ui
|
|
1713
|
+
const LabelEditor: any
|
|
1714
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.ui
|
|
1715
|
+
const LabelInplaceEditor: any
|
|
1716
|
+
}
|
|
1717
|
+
namespace util {
|
|
1718
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.util
|
|
1719
|
+
class ArrayList<T> {
|
|
1720
|
+
constructor(a: T[]): void
|
|
1721
|
+
|
|
1722
|
+
/**
|
|
1723
|
+
* Clears the array
|
|
1724
|
+
*/
|
|
1725
|
+
clear(): this
|
|
1726
|
+
|
|
1727
|
+
/**
|
|
1728
|
+
* Reverses the order of the elements in the ArrayList. The array will be modified!
|
|
1729
|
+
*/
|
|
1730
|
+
reverse(): this
|
|
1731
|
+
|
|
1732
|
+
/**
|
|
1733
|
+
* The size/count of the stored objects.
|
|
1734
|
+
*/
|
|
1735
|
+
getSize(): number
|
|
1736
|
+
|
|
1737
|
+
/**
|
|
1738
|
+
* checks to see if the Vector has any elements.
|
|
1739
|
+
**/
|
|
1740
|
+
isEmpty(): boolean
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* return the last element.
|
|
1744
|
+
*/
|
|
1745
|
+
last(): T
|
|
1746
|
+
|
|
1747
|
+
/**
|
|
1748
|
+
* Return a reference to the internal javascript native array.
|
|
1749
|
+
*/
|
|
1750
|
+
asArray(): T[]
|
|
1751
|
+
|
|
1752
|
+
/**
|
|
1753
|
+
* returns the first element
|
|
1754
|
+
*/
|
|
1755
|
+
first(): T | null
|
|
1756
|
+
|
|
1757
|
+
/**
|
|
1758
|
+
* returns an element at a specified index
|
|
1759
|
+
*/
|
|
1760
|
+
get(i: number): T | null
|
|
1761
|
+
|
|
1762
|
+
/**
|
|
1763
|
+
* Adds a element at the end of the Vector.
|
|
1764
|
+
*/
|
|
1765
|
+
add(...objs: object[]): this
|
|
1766
|
+
|
|
1767
|
+
/**
|
|
1768
|
+
* The method modifies the array and removes items from an array as necessary so that all remaining items pass a
|
|
1769
|
+
* provided test. The test is a function that is passed an array item and the index of the
|
|
1770
|
+
* item within the array. Only if the test returns true will the item stay in the array.
|
|
1771
|
+
*/
|
|
1772
|
+
grep(func: (value: T, index: number, array: readonly T[]) => boolean): this
|
|
1773
|
+
|
|
1774
|
+
/**
|
|
1775
|
+
* Return ONE element which matches by the given function or <b>null</b>
|
|
1776
|
+
* if no element is found.
|
|
1777
|
+
*
|
|
1778
|
+
* var r1= figures.find(function(figure){
|
|
1779
|
+
* return figure.id===123456
|
|
1780
|
+
* });
|
|
1781
|
+
*/
|
|
1782
|
+
find(func: (value: T, index: number, obj: T[]) => boolean): T
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.util
|
|
1786
|
+
const Base64: any
|
|
1787
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.util
|
|
1788
|
+
const Color: any
|
|
1789
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.util
|
|
1790
|
+
const JSON: any
|
|
1791
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.util
|
|
1792
|
+
const UUID: any
|
|
1793
|
+
// Too-deep object hierarchy from draw2d.Connection.DROP_FILTER.draw2d.util
|
|
1794
|
+
const spline: any
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
type CanvasEvent =
|
|
1798
|
+
| 'clear'
|
|
1799
|
+
| 'mousemove'
|
|
1800
|
+
| 'mouseleave'
|
|
1801
|
+
| 'mouseenter'
|
|
1802
|
+
| 'figure:add'
|
|
1803
|
+
| 'figure:remove'
|
|
1804
|
+
| 'dblclick'
|
|
1805
|
+
| 'click'
|
|
1806
|
+
| 'contextmenu'
|
|
1807
|
+
| 'wheel'
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
enum RECTANGLE_DIRECTION {
|
|
1811
|
+
UP = 0,
|
|
1812
|
+
RIGHT,
|
|
1813
|
+
DOWN,
|
|
1814
|
+
LEFT
|
|
1815
|
+
}
|
|
1816
|
+
}
|