@mindfusion/diagramming-controls 1.1.0 → 1.2.1
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.
- package/diagramming-controls.d.mts +830 -0
- package/diagramming-controls.d.ts +568 -4
- package/dist/cjs/diagramming-controls.js +1 -1
- package/dist/esm/diagramming-controls.js +1 -1
- package/dist/esm/diagramming-controls.mjs +1 -0
- package/dist/umd/diagramming-controls.js +1 -1
- package/package.json +22 -8
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/// <reference types="../../@mindfusion/diagramming" />
|
|
3
3
|
/// <reference types="../../@mindfusion/common-ui" />
|
|
4
4
|
/// <reference types="../../@mindfusion/common-collections" />
|
|
5
|
+
/// <reference types="../../@mindfusion/drawing" />
|
|
5
6
|
declare module "Diagramming.Controls/Enum" {
|
|
6
7
|
/**
|
|
7
8
|
* Specifies the alignment of a tab strip relative to its container control.
|
|
@@ -12,6 +13,11 @@ declare module "Diagramming.Controls/Enum" {
|
|
|
12
13
|
const Top: number;
|
|
13
14
|
const Bottom: number;
|
|
14
15
|
}
|
|
16
|
+
export namespace AnchorType {
|
|
17
|
+
const In: number;
|
|
18
|
+
const Out: number;
|
|
19
|
+
const BothWays: number;
|
|
20
|
+
}
|
|
15
21
|
}
|
|
16
22
|
declare module "Diagramming.Controls/Events" {
|
|
17
23
|
/**
|
|
@@ -40,7 +46,7 @@ declare module "Diagramming.Controls/Events" {
|
|
|
40
46
|
*/
|
|
41
47
|
static get pageAdding(): string;
|
|
42
48
|
/**
|
|
43
|
-
* Raised when
|
|
49
|
+
* Raised when a page has been added to a TabbedDiagramView control.
|
|
44
50
|
* @type {String}
|
|
45
51
|
* @summary A string containing the event name.
|
|
46
52
|
*/
|
|
@@ -52,11 +58,17 @@ declare module "Diagramming.Controls/Events" {
|
|
|
52
58
|
*/
|
|
53
59
|
static get pageRemoving(): string;
|
|
54
60
|
/**
|
|
55
|
-
* Raised when
|
|
61
|
+
* Raised when a page has been removed from a TabbedDiagramView control.
|
|
56
62
|
* @type {String}
|
|
57
63
|
* @summary A string containing the event name.
|
|
58
64
|
*/
|
|
59
65
|
static get pageRemoved(): string;
|
|
66
|
+
/**
|
|
67
|
+
* Raised when the shape drawing changes in a ShapeDesigner control.
|
|
68
|
+
* @type {String}
|
|
69
|
+
* @summary A string containing the event name.
|
|
70
|
+
*/
|
|
71
|
+
static get shapeChanged(): string;
|
|
60
72
|
}
|
|
61
73
|
}
|
|
62
74
|
declare module "Diagramming.Controls/EventArgs" {
|
|
@@ -106,6 +118,13 @@ declare module "Diagramming.Controls/TabbedDiagramView" {
|
|
|
106
118
|
*/
|
|
107
119
|
static create(element: HTMLCanvasElement, document?: DiagramDocument): TabbedDiagramView;
|
|
108
120
|
/**
|
|
121
|
+
* Returns the specified TabbedDiagramView object. This member is static and can be
|
|
122
|
+
* invoked without creating an instance of the class.
|
|
123
|
+
* @param {String} id The id of the TabbedDiagramView's element.
|
|
124
|
+
* @returns {TabbedDiagramView} A TabbedDiagramView object with the specified id, if found; otherwise, null.
|
|
125
|
+
*/
|
|
126
|
+
static find(id: string): TabbedDiagramView;
|
|
127
|
+
/**
|
|
109
128
|
* Initializes a new instance of the TabbedDiagramView class.
|
|
110
129
|
* @constructor
|
|
111
130
|
* @param {HTMLCanvasElement} element The Canvas DOM Element this TabbedDiagramView is associated with.
|
|
@@ -208,6 +227,8 @@ declare module "Diagramming.Controls/TabbedDiagramView" {
|
|
|
208
227
|
resetTabs(): void;
|
|
209
228
|
addPage(page: any): void;
|
|
210
229
|
removePage(page: any): void;
|
|
230
|
+
savePageState(page: any): void;
|
|
231
|
+
restorePageState(page: any): void;
|
|
211
232
|
onTabMouseDown(sender: any, args: any): void;
|
|
212
233
|
onTabDrop(sender: any, args: any): void;
|
|
213
234
|
_selectedPage: DiagramPage;
|
|
@@ -238,6 +259,60 @@ declare module "Diagramming.Controls/TabbedDiagramView" {
|
|
|
238
259
|
inplaceController: any;
|
|
239
260
|
inplaceHandler: () => void;
|
|
240
261
|
onPageRenameEnd(sender: any, args: any): void;
|
|
262
|
+
/**
|
|
263
|
+
* Raised before the selected page is changed.
|
|
264
|
+
* @event pageChanging
|
|
265
|
+
* @type {EventDispatcher}
|
|
266
|
+
* @property {TabbedDiagramView} sender
|
|
267
|
+
* @property {PageEventArgs} args
|
|
268
|
+
*/
|
|
269
|
+
get pageChanging(): EventDispatcher;
|
|
270
|
+
_pageChanging: EventDispatcher;
|
|
271
|
+
/**
|
|
272
|
+
* Raised when the selected page is changed.
|
|
273
|
+
* @event pageChanged
|
|
274
|
+
* @type {EventDispatcher}
|
|
275
|
+
* @property {TabbedDiagramView} sender
|
|
276
|
+
* @property {PageEventArgs} args
|
|
277
|
+
*/
|
|
278
|
+
get pageChanged(): EventDispatcher;
|
|
279
|
+
_pageChanged: EventDispatcher;
|
|
280
|
+
/**
|
|
281
|
+
* Raised before a page is added.
|
|
282
|
+
* @event pageAdding
|
|
283
|
+
* @type {EventDispatcher}
|
|
284
|
+
* @property {TabbedDiagramView} sender
|
|
285
|
+
* @property {PageEventArgs} args
|
|
286
|
+
*/
|
|
287
|
+
get pageAdding(): EventDispatcher;
|
|
288
|
+
_pageAdding: EventDispatcher;
|
|
289
|
+
/**
|
|
290
|
+
* Raised when a page has been added.
|
|
291
|
+
* @event pageAdded
|
|
292
|
+
* @type {EventDispatcher}
|
|
293
|
+
* @property {TabbedDiagramView} sender
|
|
294
|
+
* @property {PageEventArgs} args
|
|
295
|
+
*/
|
|
296
|
+
get pageAdded(): EventDispatcher;
|
|
297
|
+
_pageAdded: EventDispatcher;
|
|
298
|
+
/**
|
|
299
|
+
* Raised before a page is removed.
|
|
300
|
+
* @event pageRemoving
|
|
301
|
+
* @type {EventDispatcher}
|
|
302
|
+
* @property {TabbedDiagramView} sender
|
|
303
|
+
* @property {PageEventArgs} args
|
|
304
|
+
*/
|
|
305
|
+
get pageRemoving(): EventDispatcher;
|
|
306
|
+
_pageRemoving: EventDispatcher;
|
|
307
|
+
/**
|
|
308
|
+
* Raised when a page has been removed.
|
|
309
|
+
* @event pageRemoved
|
|
310
|
+
* @type {EventDispatcher}
|
|
311
|
+
* @property {TabbedDiagramView} sender
|
|
312
|
+
* @property {PageEventArgs} args
|
|
313
|
+
*/
|
|
314
|
+
get pageRemoved(): EventDispatcher;
|
|
315
|
+
_pageRemoved: EventDispatcher;
|
|
241
316
|
}
|
|
242
317
|
import { DiagramView } from "@mindfusion/diagramming";
|
|
243
318
|
import { TabStrip } from "@mindfusion/common-ui";
|
|
@@ -245,22 +320,511 @@ declare module "Diagramming.Controls/TabbedDiagramView" {
|
|
|
245
320
|
import { List } from "@mindfusion/common-collections";
|
|
246
321
|
import { DiagramPage } from "@mindfusion/diagramming";
|
|
247
322
|
import { Theme } from "@mindfusion/diagramming";
|
|
323
|
+
import { EventDispatcher } from "@mindfusion/controls";
|
|
248
324
|
}
|
|
249
325
|
declare module "Diagramming.Controls/WebComponents" {
|
|
250
326
|
/**
|
|
251
|
-
* @class
|
|
327
|
+
* @class Implements registration of web components.
|
|
252
328
|
*/
|
|
253
329
|
export class WebComponents {
|
|
254
330
|
/**
|
|
255
|
-
*
|
|
331
|
+
* Registers the controls in the package as web components.
|
|
256
332
|
*/
|
|
257
333
|
static register(): void;
|
|
258
334
|
}
|
|
259
335
|
}
|
|
336
|
+
declare module "Diagramming.Controls/ShapeElements" {
|
|
337
|
+
export class InteractiveElement {
|
|
338
|
+
static get defaultSize(): Size;
|
|
339
|
+
drawControlPoint(context: any, size: any, location: any, brush: any): void;
|
|
340
|
+
get firstHandle(): number;
|
|
341
|
+
get lastHandle(): number;
|
|
342
|
+
saveState(): {
|
|
343
|
+
strokeColor: any;
|
|
344
|
+
strokeThickness: any;
|
|
345
|
+
strokeDashStyle: any;
|
|
346
|
+
};
|
|
347
|
+
loadState(state: any): void;
|
|
348
|
+
strokeColor: any;
|
|
349
|
+
strokeThickness: any;
|
|
350
|
+
strokeDashStyle: any;
|
|
351
|
+
isDummy(): boolean;
|
|
352
|
+
}
|
|
353
|
+
export class LineBuilder extends InteractiveElement {
|
|
354
|
+
static fromCenter(point: any): LineBuilder;
|
|
355
|
+
static default(): LineBuilder;
|
|
356
|
+
constructor(p1: any, p2: any);
|
|
357
|
+
startPoint: any;
|
|
358
|
+
endPoint: any;
|
|
359
|
+
clone(): LineBuilder;
|
|
360
|
+
get center(): any;
|
|
361
|
+
distance(point: any): number;
|
|
362
|
+
offset(point: any): void;
|
|
363
|
+
orientate(from: any, to: any): void;
|
|
364
|
+
scale(scale: any, center: any): void;
|
|
365
|
+
toShape(): Shape;
|
|
366
|
+
addToContext(context: any, startPath: any): void;
|
|
367
|
+
draw(context: any, pen: any): void;
|
|
368
|
+
drawControlPoints(context: any, size: any, brush: any): void;
|
|
369
|
+
hitTestHandle(point: any, maxDist: any): 1 | 0 | -1;
|
|
370
|
+
updateFromHandle(handle: any, point: any): void;
|
|
371
|
+
exportElement(startPath: any): string;
|
|
372
|
+
exportShapeElement(): any[];
|
|
373
|
+
}
|
|
374
|
+
export class BezierBuilder extends InteractiveElement {
|
|
375
|
+
static fromPoints(points: any): BezierBuilder;
|
|
376
|
+
static fromCenter(point: any): BezierBuilder;
|
|
377
|
+
static default(): BezierBuilder;
|
|
378
|
+
constructor(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any, x4: any, y4: any);
|
|
379
|
+
points: Point[];
|
|
380
|
+
clone(): BezierBuilder;
|
|
381
|
+
get startPoint(): Point;
|
|
382
|
+
get endPoint(): Point;
|
|
383
|
+
get center(): Point;
|
|
384
|
+
distance(point: any): number;
|
|
385
|
+
offset(point: any): void;
|
|
386
|
+
orientate(from: any, to: any): void;
|
|
387
|
+
scale(scale: any, center: any): void;
|
|
388
|
+
addToContext(context: any, startPath: any): void;
|
|
389
|
+
draw(context: any, pen: any): void;
|
|
390
|
+
drawControlPoints(context: any, size: any, brush: any): void;
|
|
391
|
+
hitTestHandle(point: any, maxDist: any): number;
|
|
392
|
+
updateFromHandle(handle: any, point: any): void;
|
|
393
|
+
toShape(): Shape;
|
|
394
|
+
exportElement(startPath: any): string;
|
|
395
|
+
exportShapeElement(): any[];
|
|
396
|
+
}
|
|
397
|
+
export class ArcBuilder extends InteractiveElement {
|
|
398
|
+
static fromPoints(p1: any, p2: any, p3: any): ArcBuilder;
|
|
399
|
+
static fromCenter(point: any): ArcBuilder;
|
|
400
|
+
static default(): ArcBuilder;
|
|
401
|
+
constructor(x: any, y: any, radius: any, startAngle: any, endAngle: any, anticlockwise: any);
|
|
402
|
+
startPoint: Point;
|
|
403
|
+
controlPoint: Point;
|
|
404
|
+
endPoint: Point;
|
|
405
|
+
clone(): ArcBuilder;
|
|
406
|
+
get center(): Point;
|
|
407
|
+
distance(point: any): any;
|
|
408
|
+
offset(point: any): void;
|
|
409
|
+
orientate(from: any, to: any): void;
|
|
410
|
+
scale(scale: any, center: any): void;
|
|
411
|
+
addToContext(context: any): void;
|
|
412
|
+
draw(context: any, pen: any): void;
|
|
413
|
+
drawControlPoints(context: any, size: any, brush: any): void;
|
|
414
|
+
hitTestHandle(point: any, maxDist: any): 1 | 0 | 2 | -1;
|
|
415
|
+
updateFromHandle(handle: any, point: any): void;
|
|
416
|
+
toShape(): Shape;
|
|
417
|
+
exportElement(): string;
|
|
418
|
+
exportShapeElement(): any[];
|
|
419
|
+
}
|
|
420
|
+
export class RoundRectBuilder extends InteractiveElement {
|
|
421
|
+
static fromPoints(p1: any, p2: any): RoundRectBuilder;
|
|
422
|
+
static fromCenter(point: any): RoundRectBuilder;
|
|
423
|
+
static fromBounds(bounds: any): RoundRectBuilder;
|
|
424
|
+
static default(): RoundRectBuilder;
|
|
425
|
+
constructor(x1: any, y1: any, x2: any, y2: any, cornerRadius: any);
|
|
426
|
+
topLeft: Point;
|
|
427
|
+
bottomRight: Point;
|
|
428
|
+
cornerRadius: any;
|
|
429
|
+
clone(): RoundRectBuilder;
|
|
430
|
+
get startPoint(): Point;
|
|
431
|
+
get endPoint(): Point;
|
|
432
|
+
get center(): any;
|
|
433
|
+
distance(point: any): number;
|
|
434
|
+
offset(point: any): void;
|
|
435
|
+
orientate(from: any, to: any): void;
|
|
436
|
+
scale(scale: any, center: any): void;
|
|
437
|
+
draw(context: any, pen: any): void;
|
|
438
|
+
drawControlPoints(context: any, size: any, brush: any): void;
|
|
439
|
+
hitTestHandle(point: any, maxDist: any): 1 | 0 | -1;
|
|
440
|
+
updateFromHandle(handle: any, point: any): void;
|
|
441
|
+
toShape(): Shape;
|
|
442
|
+
exportElement(startPath: any): string;
|
|
443
|
+
exportShapeElement(): any[];
|
|
444
|
+
}
|
|
445
|
+
export class Composite {
|
|
446
|
+
static fromCenter(point: any, type: any): Composite;
|
|
447
|
+
static fromBounds(bounds: any, type: any): Composite;
|
|
448
|
+
constructor(type: any, bounds: any);
|
|
449
|
+
type: any;
|
|
450
|
+
bounds: any;
|
|
451
|
+
clone(): Composite;
|
|
452
|
+
getElements(bounds: any): LineBuilder[] | ArcBuilder[];
|
|
453
|
+
}
|
|
454
|
+
export class Command {
|
|
455
|
+
constructor(type: any, dropLocation: any, hitElement: any, element: any, elementIndex: any, outline: any, filledDecoration: any);
|
|
456
|
+
type: any;
|
|
457
|
+
states: Map<any, any>;
|
|
458
|
+
newStates: Map<any, any>;
|
|
459
|
+
dropLocation: any;
|
|
460
|
+
hitElement: any;
|
|
461
|
+
element: any;
|
|
462
|
+
elementIndex: any;
|
|
463
|
+
outline: any;
|
|
464
|
+
filledDecoration: any;
|
|
465
|
+
registerElement(element: any): void;
|
|
466
|
+
execute(canvas: any): void;
|
|
467
|
+
newDecoration: FilledDecorationBuilder;
|
|
468
|
+
oldOutline: any;
|
|
469
|
+
newOutline: any;
|
|
470
|
+
nextState: any;
|
|
471
|
+
prevState: any;
|
|
472
|
+
target: any;
|
|
473
|
+
drawHighlight(context: any): void;
|
|
474
|
+
undo(canvas: any): void;
|
|
475
|
+
redo(canvas: any): void;
|
|
476
|
+
removeElements(array: any, elements: any): void;
|
|
477
|
+
}
|
|
478
|
+
export class FilledDecorationBuilder extends InteractiveElement {
|
|
479
|
+
constructor(outline: any);
|
|
480
|
+
outline: any;
|
|
481
|
+
fillColor: string;
|
|
482
|
+
set bounds(arg: any);
|
|
483
|
+
get bounds(): any;
|
|
484
|
+
_bounds: any;
|
|
485
|
+
draw(context: any): void;
|
|
486
|
+
drawControlPoints(context: any, size: any, brush: any): void;
|
|
487
|
+
distance(point: any): any;
|
|
488
|
+
hitTestHandle(point: any, maxDist: any): 1 | 0 | -1;
|
|
489
|
+
get center(): Point;
|
|
490
|
+
exportElement(): {
|
|
491
|
+
path: string;
|
|
492
|
+
};
|
|
493
|
+
exportShapeElement(): any;
|
|
494
|
+
getElements(bounds: any): any[];
|
|
495
|
+
}
|
|
496
|
+
export class AnchorPointBuilder extends InteractiveElement {
|
|
497
|
+
static fromPoint(point: any): AnchorPointBuilder;
|
|
498
|
+
static default(type: any): AnchorPointBuilder;
|
|
499
|
+
constructor(x: any, y: any, type: any, style: any, size: any, color: any);
|
|
500
|
+
center: Point;
|
|
501
|
+
style: any;
|
|
502
|
+
size: any;
|
|
503
|
+
anchorSize: number;
|
|
504
|
+
anchorType: any;
|
|
505
|
+
clone(): AnchorPointBuilder;
|
|
506
|
+
distance(point: any): any;
|
|
507
|
+
offset(point: any): void;
|
|
508
|
+
setCenter(point: any): void;
|
|
509
|
+
toShape(): Shape;
|
|
510
|
+
draw(context: any, pen: any): void;
|
|
511
|
+
drawControlPoints(context: any, size: any, brush: any): void;
|
|
512
|
+
hitTestHandle(point: any, maxDist: any): 0 | -1;
|
|
513
|
+
updateFromHandle(handle: any, point: any): void;
|
|
514
|
+
exportElement(startPath: any): string;
|
|
515
|
+
}
|
|
516
|
+
export class TextAreaBuilder extends InteractiveElement {
|
|
517
|
+
static default(): TextAreaBuilder;
|
|
518
|
+
constructor(outline: any);
|
|
519
|
+
outline: any;
|
|
520
|
+
set bounds(arg: any);
|
|
521
|
+
get bounds(): any;
|
|
522
|
+
_bounds: any;
|
|
523
|
+
draw(context: any): void;
|
|
524
|
+
drawControlPoints(context: any, size: any, brush: any): void;
|
|
525
|
+
distance(point: any): any;
|
|
526
|
+
hitTestHandle(point: any, maxDist: any): 1 | 0 | -1;
|
|
527
|
+
get center(): Point;
|
|
528
|
+
exportElement(): {
|
|
529
|
+
path: string;
|
|
530
|
+
};
|
|
531
|
+
exportShapeElement(): any;
|
|
532
|
+
getElements(bounds: any): any[];
|
|
533
|
+
}
|
|
534
|
+
import { Size } from "@mindfusion/drawing";
|
|
535
|
+
import { Shape } from "@mindfusion/diagramming";
|
|
536
|
+
import { Point } from "@mindfusion/drawing";
|
|
537
|
+
}
|
|
538
|
+
declare module "Diagramming.Controls/ShapeBuilder" {
|
|
539
|
+
export class ShapeBuilder {
|
|
540
|
+
static createShape(id: any, outlineElements: any, decorationElements: any, shapeDecorationElements: any, anchorPattern: any, fillMode: any): Shape;
|
|
541
|
+
constructor(shape: any, offset: any);
|
|
542
|
+
outline: any[];
|
|
543
|
+
decorations: any[];
|
|
544
|
+
filledDecorations: any[];
|
|
545
|
+
anchorPoints: any[];
|
|
546
|
+
shape: any;
|
|
547
|
+
offset: any;
|
|
548
|
+
draw(context: any): void;
|
|
549
|
+
parseShape(): void;
|
|
550
|
+
textArea: TextAreaBuilder;
|
|
551
|
+
createBuilders(commands: any): any[];
|
|
552
|
+
lastPoint: any;
|
|
553
|
+
createBuilder(command: any): any;
|
|
554
|
+
exportShape(shapeId: any): Shape;
|
|
555
|
+
exportElements(elementBuilders: any, merge: any, array: any): string | any[];
|
|
556
|
+
exportShapeElements(elementBuilders: any, array: any): any[];
|
|
557
|
+
useTextArea(): any;
|
|
558
|
+
allElements(): any[];
|
|
559
|
+
nearestElement(point: any, maxDist: any, elements: any): any;
|
|
560
|
+
hitTestDropTarget(point: any, newElement: any): Command;
|
|
561
|
+
hitTestOutlineTarget(outline: any, point: any, newElement: any): Command;
|
|
562
|
+
hitTest(point: any, activeElement: any): ElementController;
|
|
563
|
+
hitTestOutline(outline: any, child: any, point: any, filledDecoration: any): ElementController;
|
|
564
|
+
}
|
|
565
|
+
import { TextAreaBuilder } from "Diagramming.Controls/ShapeElements";
|
|
566
|
+
import { Shape } from "@mindfusion/diagramming";
|
|
567
|
+
import { Command } from "Diagramming.Controls/ShapeElements";
|
|
568
|
+
class ElementController {
|
|
569
|
+
constructor(type: any, element: any, handle: any, filledDecoration: any, adjacent: any, adjacentHandle: any);
|
|
570
|
+
type: any;
|
|
571
|
+
element: any;
|
|
572
|
+
handle: any;
|
|
573
|
+
filledDecoration: any;
|
|
574
|
+
adjacent: any;
|
|
575
|
+
adjacentHandle: any;
|
|
576
|
+
changeCommand: Command;
|
|
577
|
+
center: any;
|
|
578
|
+
currentScale: number;
|
|
579
|
+
onMouseDown(point: any): void;
|
|
580
|
+
hasMoved: boolean;
|
|
581
|
+
previousPosition: any;
|
|
582
|
+
initialDistance: any;
|
|
583
|
+
onMouseMove(point: any): void;
|
|
584
|
+
onMouseUp(point: any): void;
|
|
585
|
+
}
|
|
586
|
+
export {};
|
|
587
|
+
}
|
|
588
|
+
declare module "Diagramming.Controls/ShapeCanvas" {
|
|
589
|
+
export class ShapeCanvas extends Diagram {
|
|
590
|
+
shapeSize: number;
|
|
591
|
+
selectedHandlesBrush: string;
|
|
592
|
+
pointedHandlesBrush: string;
|
|
593
|
+
clearOutline(filledDecoration: any): any;
|
|
594
|
+
removeFromOutline(outline: any, element: any): {
|
|
595
|
+
index: number;
|
|
596
|
+
prevState?: undefined;
|
|
597
|
+
nextState?: undefined;
|
|
598
|
+
} | {
|
|
599
|
+
index: any;
|
|
600
|
+
prevState: any;
|
|
601
|
+
nextState: any;
|
|
602
|
+
};
|
|
603
|
+
set selectedElement(arg: any);
|
|
604
|
+
get selectedElement(): any;
|
|
605
|
+
_selectedElement: any;
|
|
606
|
+
set shapeBuilder(arg: any);
|
|
607
|
+
get shapeBuilder(): any;
|
|
608
|
+
_shapeBuilder: any;
|
|
609
|
+
get handlesSize(): number;
|
|
610
|
+
}
|
|
611
|
+
import { Diagram } from "@mindfusion/diagramming";
|
|
612
|
+
}
|
|
613
|
+
declare module "Diagramming.Controls/ShapeView" {
|
|
614
|
+
export class ShapeView extends DiagramView {
|
|
615
|
+
/**
|
|
616
|
+
* Creates and initializes a new ShapeDesigner from the specified element.
|
|
617
|
+
* This method is static and can be called without creating an instance of the class.
|
|
618
|
+
* @param {HTMLCanvasElement} element The DOM element that the DiagramView should be attached to.
|
|
619
|
+
* @param {DiagramDocument} [document] The DiagramDocument instance this control is associated with.
|
|
620
|
+
* @returns {ShapeDesigner} The newly created ShapeDesigner object.
|
|
621
|
+
*/
|
|
622
|
+
static create(element: HTMLCanvasElement, document?: DiagramDocument): any;
|
|
623
|
+
constructor(element: any);
|
|
624
|
+
undoHistory: any[];
|
|
625
|
+
currentCommand: number;
|
|
626
|
+
offset: Point;
|
|
627
|
+
onElementDrag(element: any, position: any): void;
|
|
628
|
+
onElementDrop(element: any): void;
|
|
629
|
+
onPointerDown(position: any, button: any, id: any): void;
|
|
630
|
+
controller: any;
|
|
631
|
+
onPointerMove(position: any, id: any): Promise<void>;
|
|
632
|
+
set pointedElement(arg: any);
|
|
633
|
+
get pointedElement(): any;
|
|
634
|
+
onPointerUp(position: any, button: any, id: any): Promise<void>;
|
|
635
|
+
set selectedElement(arg: any);
|
|
636
|
+
get selectedElement(): any;
|
|
637
|
+
onKeyUp(target: any, keyCode: any, recorded: any, value: any): Promise<void>;
|
|
638
|
+
removeElement(element: any): void;
|
|
639
|
+
saveCommand(command: any): void;
|
|
640
|
+
undo(): void;
|
|
641
|
+
fromCommand: boolean;
|
|
642
|
+
redo(): void;
|
|
643
|
+
importShape(shape: any): void;
|
|
644
|
+
exportShape(): void;
|
|
645
|
+
alignPointToGrid(point: any): Point;
|
|
646
|
+
}
|
|
647
|
+
import { DiagramView } from "@mindfusion/diagramming";
|
|
648
|
+
import { Point } from "@mindfusion/drawing";
|
|
649
|
+
import { DiagramDocument } from "@mindfusion/diagramming";
|
|
650
|
+
}
|
|
651
|
+
declare module "Diagramming.Controls/ShapePalette" {
|
|
652
|
+
export class ShapePalette extends NodeListView {
|
|
653
|
+
static create(element: any): any;
|
|
654
|
+
constructor(element: any);
|
|
655
|
+
templatesLabel: string;
|
|
656
|
+
primitivesLabel: string;
|
|
657
|
+
anchorPointsLabel: string;
|
|
658
|
+
labelBrush: string;
|
|
659
|
+
fillShapes(): void;
|
|
660
|
+
}
|
|
661
|
+
import { NodeListView } from "@mindfusion/diagramming";
|
|
662
|
+
}
|
|
663
|
+
declare module "Diagramming.Controls/ShapeDesigner" {
|
|
664
|
+
/**
|
|
665
|
+
* @class Represents an interactive vector-drawing control that can be used to design node shapes.
|
|
666
|
+
*/
|
|
667
|
+
export class ShapeDesigner extends Control {
|
|
668
|
+
/**
|
|
669
|
+
* Creates and initializes a new ShapeDesigner from the specified element.
|
|
670
|
+
* This method is static and can be called without creating an instance of the class.
|
|
671
|
+
* @param {HTMLDivElement} element The DOM element that the ShapeDesigner should be attached to.
|
|
672
|
+
* @returns {ShapeDesigner} The newly created ShapeDesigner object.
|
|
673
|
+
*/
|
|
674
|
+
static create(element: HTMLDivElement): ShapeDesigner;
|
|
675
|
+
/**
|
|
676
|
+
* Initializes a new instance of the ShapeDesigner class.
|
|
677
|
+
* @constructor
|
|
678
|
+
* @param {HTMLDivElement} element The DOM Element this ShapeDesigner is associated with.
|
|
679
|
+
*/
|
|
680
|
+
constructor(element: HTMLDivElement);
|
|
681
|
+
view: any;
|
|
682
|
+
palette: any;
|
|
683
|
+
propertyPanel: Window;
|
|
684
|
+
set showShapeProperties(arg: boolean);
|
|
685
|
+
/**
|
|
686
|
+
* Gets or sets a value indicating whether to display the property panel.
|
|
687
|
+
* @type {Boolean}
|
|
688
|
+
* @summary true to display the property panel, or false otherwise.
|
|
689
|
+
* The default value is true.
|
|
690
|
+
*/
|
|
691
|
+
get showShapeProperties(): boolean;
|
|
692
|
+
getContent(): HTMLElement;
|
|
693
|
+
generatePropertyPanelTemplate(): string;
|
|
694
|
+
rebindPropertyPanel(element: any): void;
|
|
695
|
+
setProp(e: any): void;
|
|
696
|
+
/**
|
|
697
|
+
* Imports a Shape into the designer's drawing canvas.
|
|
698
|
+
* @param {Shape} shape A Shape instance.
|
|
699
|
+
*/
|
|
700
|
+
importShape(shape: any): void;
|
|
701
|
+
set selectedElement(arg: InteractiveElement);
|
|
702
|
+
/**
|
|
703
|
+
* Gets or sets the selected element in the shape designer.
|
|
704
|
+
* @type {InteractiveElement}
|
|
705
|
+
* @summary An InteractiveElement instance.
|
|
706
|
+
*/
|
|
707
|
+
get selectedElement(): InteractiveElement;
|
|
708
|
+
/**
|
|
709
|
+
* Creates a new Shape from the current content of the design canvas.
|
|
710
|
+
* @param {String} shapeId The shape's string identifier.
|
|
711
|
+
*/
|
|
712
|
+
exportShape(shapeId: string): any;
|
|
713
|
+
/**
|
|
714
|
+
* Undoes the most recent user action.
|
|
715
|
+
*/
|
|
716
|
+
undo(): void;
|
|
717
|
+
/**
|
|
718
|
+
* Executes again the most recently undone user action.
|
|
719
|
+
*/
|
|
720
|
+
redo(): void;
|
|
721
|
+
removeElement(element: any): void;
|
|
722
|
+
/**
|
|
723
|
+
* Copies the currently selected element to the clipboard.
|
|
724
|
+
*/
|
|
725
|
+
copyToClipboard(): void;
|
|
726
|
+
/**
|
|
727
|
+
* Pastes a previously copied element from the clipboard.
|
|
728
|
+
*/
|
|
729
|
+
pasteFromClipboard(offsetX: any, offsetY: any): void;
|
|
730
|
+
refresh(): void;
|
|
731
|
+
_showShapeProperties: any;
|
|
732
|
+
set showTextArea(arg: boolean);
|
|
733
|
+
/**
|
|
734
|
+
* Gets or sets a value indicating whether to display the shape's text area.
|
|
735
|
+
* @type {Boolean}
|
|
736
|
+
* @summary true to display the text area, or false otherwise.
|
|
737
|
+
* The default value is false.
|
|
738
|
+
*/
|
|
739
|
+
get showTextArea(): boolean;
|
|
740
|
+
set templatesLabel(arg: string);
|
|
741
|
+
/**
|
|
742
|
+
* Gets or sets a string specifying the label of outline templates category in shape designer toolbox.
|
|
743
|
+
* @type {String}
|
|
744
|
+
* @summary The label of outline templates category.
|
|
745
|
+
*/
|
|
746
|
+
get templatesLabel(): string;
|
|
747
|
+
set primitivesLabel(arg: string);
|
|
748
|
+
/**
|
|
749
|
+
* Gets or sets a string specifying the label of graphic primitives category in shape designer toolbox.
|
|
750
|
+
* @type {String}
|
|
751
|
+
* @summary The label of graphic primitives category.
|
|
752
|
+
*/
|
|
753
|
+
get primitivesLabel(): string;
|
|
754
|
+
set anchorPointsLabel(arg: string);
|
|
755
|
+
/**
|
|
756
|
+
* Gets or sets a string specifying the label of graphic AnchorPoints category in shape designer toolbox.
|
|
757
|
+
* @type {String}
|
|
758
|
+
* @summary The label of graphic AnchorPoints category.
|
|
759
|
+
*/
|
|
760
|
+
get anchorPointsLabel(): string;
|
|
761
|
+
set showGrid(arg: boolean);
|
|
762
|
+
/**
|
|
763
|
+
* Gets or sets a value indicating whether the alignment grid is visible.
|
|
764
|
+
* @type {Boolean}
|
|
765
|
+
* @summary true if the alignment grid is visible, or false otherwise.
|
|
766
|
+
*/
|
|
767
|
+
get showGrid(): boolean;
|
|
768
|
+
set alignToGrid(arg: boolean);
|
|
769
|
+
/**
|
|
770
|
+
* Gets or sets a value indicating whether the diagram items should be aligned to a grid.
|
|
771
|
+
* @type {Boolean}
|
|
772
|
+
* @summary true if the diagram items should be aligned to a grid, or false otherwise.
|
|
773
|
+
*/
|
|
774
|
+
get alignToGrid(): boolean;
|
|
775
|
+
set gridSizeX(arg: number);
|
|
776
|
+
/**
|
|
777
|
+
* Gets or sets the horizontal distance between adjacent grid points.
|
|
778
|
+
* @type {Number}
|
|
779
|
+
* @summary The horizontal distance between adjacent grid points.
|
|
780
|
+
*/
|
|
781
|
+
get gridSizeX(): number;
|
|
782
|
+
set gridSizeY(arg: number);
|
|
783
|
+
/**
|
|
784
|
+
* Gets or sets the vertical distance between adjacent grid points.
|
|
785
|
+
* @type {Number}
|
|
786
|
+
* @summary The vertical distance between adjacent grid points.
|
|
787
|
+
*/
|
|
788
|
+
get gridSizeY(): number;
|
|
789
|
+
set theme(arg: Theme);
|
|
790
|
+
/**
|
|
791
|
+
* Gets or sets the theme of the control.
|
|
792
|
+
* @type {Theme}
|
|
793
|
+
* @summary An instance of the Theme class.
|
|
794
|
+
*/
|
|
795
|
+
get theme(): Theme;
|
|
796
|
+
_theme: any;
|
|
797
|
+
set themesPath(arg: string);
|
|
798
|
+
/**
|
|
799
|
+
* Gets or sets the path to the control's css themes.
|
|
800
|
+
* @type {String}
|
|
801
|
+
* @summary A string specifying the path.
|
|
802
|
+
* @remarks Only applies to web components.
|
|
803
|
+
*/
|
|
804
|
+
get themesPath(): string;
|
|
805
|
+
_themesPath: any;
|
|
806
|
+
/**
|
|
807
|
+
* Raised when the shape has changed.
|
|
808
|
+
* @event shapeChanged
|
|
809
|
+
* @type {EventDispatcher}
|
|
810
|
+
* @property {ShapeDesigner} sender
|
|
811
|
+
* @property {EventArgs} args
|
|
812
|
+
*/
|
|
813
|
+
get shapeChanged(): EventDispatcher;
|
|
814
|
+
_shapeChanged: EventDispatcher;
|
|
815
|
+
connectedCallback(): void;
|
|
816
|
+
}
|
|
817
|
+
import { Control } from "@mindfusion/controls";
|
|
818
|
+
import { Window } from "@mindfusion/common-ui";
|
|
819
|
+
import { InteractiveElement } from "Diagramming.Controls/ShapeElements";
|
|
820
|
+
import { Theme } from "@mindfusion/diagramming";
|
|
821
|
+
import { EventDispatcher } from "@mindfusion/controls";
|
|
822
|
+
}
|
|
260
823
|
declare module "@mindfusion/diagramming-controls" {
|
|
261
824
|
export { TabAlignment } from "Diagramming.Controls/Enum";
|
|
262
825
|
export { Events } from "Diagramming.Controls/Events";
|
|
263
826
|
export { PageEventArgs } from "Diagramming.Controls/EventArgs";
|
|
264
827
|
export { TabbedDiagramView } from "Diagramming.Controls/TabbedDiagramView";
|
|
265
828
|
export { WebComponents } from "Diagramming.Controls/WebComponents";
|
|
829
|
+
export { ShapeDesigner } from "Diagramming.Controls/ShapeDesigner";
|
|
266
830
|
}
|