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