@node-projects/web-component-designer 0.0.87 → 0.0.90
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/dist/elements/controls/PlainScrollbar.js +122 -116
- package/dist/elements/controls/SimpleSplitView.js +1 -1
- package/dist/elements/documentContainer.js +2 -0
- package/dist/elements/helper/ArrangeHelper.d.ts +7 -0
- package/dist/elements/helper/ArrangeHelper.js +79 -0
- package/dist/elements/services/modelCommandService/DefaultModelCommandService.js +17 -13
- package/dist/elements/services/undoService/UndoService.js +2 -2
- package/dist/elements/widgets/designerView/IDesignerCanvas.d.ts +8 -0
- package/dist/elements/widgets/designerView/designerCanvas.d.ts +13 -3
- package/dist/elements/widgets/designerView/designerCanvas.js +93 -36
- package/dist/elements/widgets/designerView/designerCanvas.ts.BASE.d.ts +92 -0
- package/dist/elements/widgets/designerView/designerCanvas.ts.BASE.js +734 -0
- package/dist/elements/widgets/designerView/designerCanvas.ts.LOCAL.d.ts +95 -0
- package/dist/elements/widgets/designerView/designerCanvas.ts.LOCAL.js +768 -0
- package/dist/elements/widgets/designerView/designerCanvas.ts.REMOTE.d.ts +94 -0
- package/dist/elements/widgets/designerView/designerCanvas.ts.REMOTE.js +745 -0
- package/dist/elements/widgets/designerView/designerView.js +19 -15
- package/dist/elements/widgets/designerView/extensions/ElementDragTitleExtension.js +2 -2
- package/dist/elements/widgets/designerView/extensions/PathExtension.js +1 -0
- package/dist/elements/widgets/designerView/extensions/ResizeExtension.js +2 -1
- package/dist/elements/widgets/designerView/extensions/TransformOriginExtension.js +1 -0
- package/dist/elements/widgets/designerView/tools/DrawEllipsisTool.js +1 -0
- package/dist/elements/widgets/designerView/tools/DrawLineTool.js +1 -0
- package/dist/elements/widgets/designerView/tools/DrawPathTool.js +1 -0
- package/dist/elements/widgets/designerView/tools/DrawRectTool.js +1 -0
- package/dist/elements/widgets/designerView/tools/MagicWandSelectorTool.js +10 -9
- package/dist/elements/widgets/designerView/tools/PanTool.js +1 -0
- package/dist/elements/widgets/designerView/tools/PointerTool.d.ts +1 -0
- package/dist/elements/widgets/designerView/tools/PointerTool.js +23 -2
- package/dist/elements/widgets/designerView/tools/RectangleSelectorTool.js +10 -9
- package/dist/elements/widgets/designerView/tools/ZoomTool.d.ts +8 -1
- package/dist/elements/widgets/designerView/tools/ZoomTool.js +69 -0
- package/dist/elements/widgets/paletteView/paletteTreeView.js +5 -0
- package/dist/elements/widgets/treeView/treeViewExtended.js +10 -13
- package/dist/enums/Orientation.d.ts +8 -0
- package/dist/enums/Orientation.js +9 -0
- package/package.json +1 -1
|
@@ -39,12 +39,14 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
39
39
|
_zoomFactor = 1; //if scale or zoom css property is used this needs to be the value
|
|
40
40
|
_scaleFactor = 1; //if scale css property is used this need to be the scale value
|
|
41
41
|
_canvasOffset = { x: 0, y: 0 };
|
|
42
|
+
_currentContextMenu;
|
|
43
|
+
_lastPointerDownHandler;
|
|
42
44
|
get zoomFactor() {
|
|
43
45
|
return this._zoomFactor;
|
|
44
46
|
}
|
|
45
47
|
set zoomFactor(value) {
|
|
46
48
|
this._zoomFactor = value;
|
|
47
|
-
this.
|
|
49
|
+
this._zoomFactorChanged();
|
|
48
50
|
}
|
|
49
51
|
get scaleFactor() {
|
|
50
52
|
return this._scaleFactor;
|
|
@@ -54,15 +56,21 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
54
56
|
}
|
|
55
57
|
set canvasOffset(value) {
|
|
56
58
|
this._canvasOffset = value;
|
|
57
|
-
this.
|
|
59
|
+
this._zoomFactorChanged();
|
|
60
|
+
}
|
|
61
|
+
get canvasOffsetUnzoomed() {
|
|
62
|
+
return { x: this._canvasOffset.x * this.zoomFactor, y: this._canvasOffset.y * this.zoomFactor };
|
|
63
|
+
}
|
|
64
|
+
set canvasOffsetUnzoomed(value) {
|
|
65
|
+
this.canvasOffset = { x: value.x / this.zoomFactor, y: value.y / this.zoomFactor };
|
|
58
66
|
}
|
|
59
67
|
onContentChanged = new TypedEvent();
|
|
68
|
+
onZoomFactorChanged = new TypedEvent();
|
|
60
69
|
// Private Variables
|
|
61
70
|
_canvas;
|
|
62
71
|
_canvasContainer;
|
|
63
72
|
_outercanvas2;
|
|
64
73
|
_lastHoverDesignItem;
|
|
65
|
-
_onContextMenuBound;
|
|
66
74
|
_pointerEventHandlerBound;
|
|
67
75
|
_firstConnect;
|
|
68
76
|
_onKeyDownBound;
|
|
@@ -135,10 +143,9 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
135
143
|
static template = html `
|
|
136
144
|
<div style="display: flex;flex-direction: column;width: 100%;height: 100%;">
|
|
137
145
|
<div style="width: 100%;height: 100%;">
|
|
138
|
-
<div id="node-projects-designer-canvas-outercanvas2"
|
|
139
|
-
style="width:100%;height:100%;position:relative;">
|
|
146
|
+
<div id="node-projects-designer-canvas-outercanvas2" style="width:100%;height:100%;position:relative;">
|
|
140
147
|
<div id="node-projects-designer-canvas-canvasContainer"
|
|
141
|
-
style="width: 100%;height: 100%;
|
|
148
|
+
style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;user-select: none;">
|
|
142
149
|
<div id="node-projects-designer-canvas-canvas" part="canvas"></div>
|
|
143
150
|
</div>
|
|
144
151
|
</div>
|
|
@@ -159,23 +166,31 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
159
166
|
this._onKeyDownBound = this.onKeyDown.bind(this);
|
|
160
167
|
this._onKeyUpBound = this.onKeyUp.bind(this);
|
|
161
168
|
this._onDblClickBound = this._onDblClick.bind(this);
|
|
162
|
-
this._onContextMenuBound = this._onContextMenu.bind(this);
|
|
163
169
|
this._pointerEventHandlerBound = this._pointerEventHandler.bind(this);
|
|
164
|
-
this.clickOverlay.oncontextmenu =
|
|
170
|
+
this.clickOverlay.oncontextmenu = (e) => e.preventDefault();
|
|
165
171
|
}
|
|
166
172
|
get designerWidth() {
|
|
167
173
|
return this._canvasContainer.style.width;
|
|
168
174
|
}
|
|
169
175
|
set designerWidth(value) {
|
|
170
176
|
this._canvasContainer.style.width = value;
|
|
171
|
-
this.
|
|
177
|
+
this._zoomFactorChanged();
|
|
172
178
|
}
|
|
173
179
|
get designerHeight() {
|
|
174
180
|
return this._canvasContainer.style.height;
|
|
175
181
|
}
|
|
176
182
|
set designerHeight(value) {
|
|
177
183
|
this._canvasContainer.style.height = value;
|
|
178
|
-
this.
|
|
184
|
+
this._zoomFactorChanged();
|
|
185
|
+
}
|
|
186
|
+
getDesignSurfaceDimensions() {
|
|
187
|
+
let ret = { width: null, height: null };
|
|
188
|
+
const cs = getComputedStyle(this._canvasContainer);
|
|
189
|
+
if (this._canvasContainer.style.width)
|
|
190
|
+
ret.width = parseFloat(cs.width);
|
|
191
|
+
if (this._canvasContainer.style.height)
|
|
192
|
+
ret.height = parseFloat(cs.height);
|
|
193
|
+
return ret;
|
|
179
194
|
}
|
|
180
195
|
get designerOffsetWidth() {
|
|
181
196
|
return this._canvasContainer.offsetWidth;
|
|
@@ -371,7 +386,7 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
371
386
|
this.clickOverlay.addEventListener(EventNames.DblClick, this._onDblClickBound, true);
|
|
372
387
|
}
|
|
373
388
|
}
|
|
374
|
-
|
|
389
|
+
_zoomFactorChanged() {
|
|
375
390
|
//a@ts-ignore
|
|
376
391
|
//this._canvasContainer.style.zoom = <any>this._zoomFactor;
|
|
377
392
|
//this._canvasContainer.style.transform = 'scale(' + this._zoomFactor+') translate(' + this._translate.x + ', '+this._translate.y+')';
|
|
@@ -379,10 +394,11 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
379
394
|
this._canvasContainer.style.bottom = this._outercanvas2.offsetHeight >= this._canvasContainer.offsetHeight ? '0' : '';
|
|
380
395
|
this._canvasContainer.style.right = this._outercanvas2.offsetWidth >= this._canvasContainer.offsetWidth ? '0' : '';
|
|
381
396
|
this._updateTransform();
|
|
397
|
+
this.onZoomFactorChanged.emit(this._zoomFactor);
|
|
382
398
|
}
|
|
383
399
|
_updateTransform() {
|
|
384
400
|
this._scaleFactor = this._zoomFactor;
|
|
385
|
-
this._canvasContainer.style.transform = 'scale(' + this._zoomFactor + ') translate(' + this._canvasOffset.x + 'px, ' + this._canvasOffset.y + 'px)';
|
|
401
|
+
this._canvasContainer.style.transform = 'scale(' + this._zoomFactor + ') translate(' + (isNaN(this._canvasOffset.x) ? '0' : this._canvasOffset.x) + 'px, ' + (isNaN(this._canvasOffset.y) ? '0' : this._canvasOffset.y) + 'px)';
|
|
386
402
|
this._canvasContainer.style.transformOrigin = '0 0';
|
|
387
403
|
this.snapLines.clearSnaplines();
|
|
388
404
|
}
|
|
@@ -497,30 +513,16 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
497
513
|
}
|
|
498
514
|
}
|
|
499
515
|
}
|
|
500
|
-
_onContextMenu(event) {
|
|
501
|
-
event.preventDefault();
|
|
502
|
-
if (!event.shiftKey) {
|
|
503
|
-
let items = this.getItemsBelowMouse(event);
|
|
504
|
-
if (items.indexOf(this.instanceServiceContainer.selectionService.primarySelection.element) >= 0)
|
|
505
|
-
this.showDesignItemContextMenu(this.instanceServiceContainer.selectionService.primarySelection, event);
|
|
506
|
-
else {
|
|
507
|
-
const designItem = DesignItem.GetOrCreateDesignItem(event.target, this.serviceContainer, this.instanceServiceContainer);
|
|
508
|
-
if (!this.instanceServiceContainer.selectionService.isSelected(designItem)) {
|
|
509
|
-
this.instanceServiceContainer.selectionService.setSelectedElements([designItem]);
|
|
510
|
-
}
|
|
511
|
-
this.showDesignItemContextMenu(designItem, event);
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
516
|
showDesignItemContextMenu(designItem, event) {
|
|
517
|
+
this._currentContextMenu?.close();
|
|
516
518
|
const mnuItems = [];
|
|
517
519
|
for (let cme of this.serviceContainer.designerContextMenuExtensions) {
|
|
518
520
|
if (cme.shouldProvideContextmenu(event, this, designItem, 'designer')) {
|
|
519
521
|
mnuItems.push(...cme.provideContextMenuItems(event, this, designItem));
|
|
520
522
|
}
|
|
521
523
|
}
|
|
522
|
-
|
|
523
|
-
return
|
|
524
|
+
this._currentContextMenu = ContextMenuHelper.showContextMenu(null, event, null, mnuItems);
|
|
525
|
+
return this._currentContextMenu;
|
|
524
526
|
}
|
|
525
527
|
_onDblClick(event) {
|
|
526
528
|
event.preventDefault();
|
|
@@ -591,12 +593,26 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
591
593
|
}
|
|
592
594
|
getNormalizedEventCoordinates(event) {
|
|
593
595
|
const offsetOfOuterX = (event.clientX - this.outerRect.x) / this.zoomFactor;
|
|
594
|
-
const offsetOfCanvasX = this.containerBoundingRect.x - this.outerRect.x
|
|
596
|
+
const offsetOfCanvasX = this.containerBoundingRect.x - this.outerRect.x;
|
|
595
597
|
const offsetOfOuterY = (event.clientY - this.outerRect.y) / this.zoomFactor;
|
|
596
|
-
const offsetOfCanvasY = this.containerBoundingRect.y - this.outerRect.y
|
|
598
|
+
const offsetOfCanvasY = this.containerBoundingRect.y - this.outerRect.y;
|
|
599
|
+
return {
|
|
600
|
+
x: offsetOfOuterX - offsetOfCanvasX / this.zoomFactor,
|
|
601
|
+
y: offsetOfOuterY - offsetOfCanvasY / this.zoomFactor
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
convertEventToViewPortCoordinates(point) {
|
|
605
|
+
const offsetOfCanvasX = this.containerBoundingRect.x - this.outerRect.x;
|
|
606
|
+
const offsetOfCanvasY = this.containerBoundingRect.y - this.outerRect.y;
|
|
607
|
+
return {
|
|
608
|
+
x: (point.x + offsetOfCanvasX / this.zoomFactor) * this.zoomFactor,
|
|
609
|
+
y: (point.y + offsetOfCanvasY / this.zoomFactor) * this.zoomFactor
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
getViewportCoordinates(event) {
|
|
597
613
|
return {
|
|
598
|
-
x:
|
|
599
|
-
y:
|
|
614
|
+
x: (event.clientX - this.outerRect.x),
|
|
615
|
+
y: (event.clientY - this.outerRect.y)
|
|
600
616
|
};
|
|
601
617
|
}
|
|
602
618
|
getNormalizedElementCoordinates(element) {
|
|
@@ -661,8 +677,6 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
661
677
|
}
|
|
662
678
|
if (event.composedPath().indexOf(this.eatEvents) >= 0)
|
|
663
679
|
return;
|
|
664
|
-
if (event.buttons == 2)
|
|
665
|
-
return;
|
|
666
680
|
let currentElement;
|
|
667
681
|
if (forceElement)
|
|
668
682
|
currentElement = forceElement;
|
|
@@ -675,9 +689,20 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
675
689
|
if (!DesignerCanvas.hasOrIsParent(currentElement, this._canvas))
|
|
676
690
|
return;
|
|
677
691
|
}*/
|
|
692
|
+
if (this._lastPointerDownHandler) {
|
|
693
|
+
try {
|
|
694
|
+
this._lastPointerDownHandler(event);
|
|
695
|
+
}
|
|
696
|
+
catch { }
|
|
697
|
+
if (event.type == EventNames.PointerUp)
|
|
698
|
+
this._lastPointerDownHandler = null;
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
678
701
|
if (currentElement instanceof SVGGraphicsElement && currentElement?.ownerSVGElement?.parentNode?.host == this.overlayLayer) {
|
|
679
702
|
this.clickOverlay.style.cursor = getComputedStyle(currentElement).cursor;
|
|
680
|
-
|
|
703
|
+
if (event.type == EventNames.PointerDown) {
|
|
704
|
+
this._lastPointerDownHandler = (evt) => currentElement.dispatchEvent(new evt.constructor(evt.type, evt));
|
|
705
|
+
}
|
|
681
706
|
currentElement.dispatchEvent(new event.constructor(event.type, event));
|
|
682
707
|
return;
|
|
683
708
|
}
|
|
@@ -700,8 +725,14 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
700
725
|
this._fillCalculationrects();
|
|
701
726
|
let tool = this.serviceContainer.globalContext.tool ?? this.serviceContainer.designerTools.get(NamedTools.Pointer);
|
|
702
727
|
this._canvas.style.cursor = tool.cursor;
|
|
728
|
+
if (event.type == EventNames.PointerDown) {
|
|
729
|
+
this._lastPointerDownHandler = (evt) => tool.pointerEventHandler(this, evt, currentElement);
|
|
730
|
+
}
|
|
703
731
|
tool.pointerEventHandler(this, event, currentElement);
|
|
704
732
|
}
|
|
733
|
+
removeCurrentPointerEventHandler() {
|
|
734
|
+
this._lastPointerDownHandler = null;
|
|
735
|
+
}
|
|
705
736
|
_fillCalculationrects() {
|
|
706
737
|
this.containerBoundingRect = this._canvasContainer.getBoundingClientRect();
|
|
707
738
|
this.outerRect = this._outercanvas2.getBoundingClientRect();
|
|
@@ -746,5 +777,31 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
746
777
|
}
|
|
747
778
|
return lstEl;
|
|
748
779
|
}
|
|
780
|
+
zoomOntoRectangle(startPoint, endPoint) {
|
|
781
|
+
let rect = {
|
|
782
|
+
x: startPoint.x < endPoint.x ? startPoint.x : endPoint.x,
|
|
783
|
+
y: startPoint.y < endPoint.y ? startPoint.y : endPoint.y,
|
|
784
|
+
width: Math.abs(startPoint.x - endPoint.x),
|
|
785
|
+
height: Math.abs(startPoint.y - endPoint.y),
|
|
786
|
+
};
|
|
787
|
+
let zFactorWidth = this.outerRect.width / rect.width;
|
|
788
|
+
let zFactorHeight = this.outerRect.height / rect.height;
|
|
789
|
+
let zoomFactor = zFactorWidth >= zFactorHeight ? zFactorHeight : zFactorWidth;
|
|
790
|
+
let rectCenter = {
|
|
791
|
+
x: (rect.width / 2) + rect.x,
|
|
792
|
+
y: (rect.height / 2) + rect.y
|
|
793
|
+
};
|
|
794
|
+
this.zoomTowardsPoint(rectCenter, zoomFactor);
|
|
795
|
+
}
|
|
796
|
+
zoomTowardsPoint(canvasPoint, newZoom) {
|
|
797
|
+
const scaleChange = newZoom / this.zoomFactor;
|
|
798
|
+
const point = this.convertEventToViewPortCoordinates(canvasPoint);
|
|
799
|
+
const newCanvasOffset = {
|
|
800
|
+
x: -(point.x * (scaleChange - 1) + scaleChange * -this.canvasOffsetUnzoomed.x),
|
|
801
|
+
y: -(point.y * (scaleChange - 1) + scaleChange * -this.canvasOffsetUnzoomed.y)
|
|
802
|
+
};
|
|
803
|
+
this.zoomFactor = newZoom;
|
|
804
|
+
this.canvasOffsetUnzoomed = newCanvasOffset;
|
|
805
|
+
}
|
|
749
806
|
}
|
|
750
807
|
customElements.define('node-projects-designer-canvas', DesignerCanvas);
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { ServiceContainer } from '../../services/ServiceContainer';
|
|
2
|
+
import { InstanceServiceContainer } from '../../services/InstanceServiceContainer';
|
|
3
|
+
import { IDesignItem } from '../../item/IDesignItem';
|
|
4
|
+
import { BaseCustomWebComponentLazyAppend, TypedEvent } from '@node-projects/base-custom-webcomponent';
|
|
5
|
+
import { IDesignerCanvas } from './IDesignerCanvas';
|
|
6
|
+
import { Snaplines } from './Snaplines';
|
|
7
|
+
import { ContextMenuHelper } from '../../helper/contextMenu/ContextMenuHelper';
|
|
8
|
+
import { IPlacementView } from './IPlacementView';
|
|
9
|
+
import { IUiCommandHandler } from '../../../commandHandling/IUiCommandHandler';
|
|
10
|
+
import { IUiCommand } from '../../../commandHandling/IUiCommand';
|
|
11
|
+
import { IExtensionManager } from "./extensions/IExtensionManger";
|
|
12
|
+
import { IPoint } from "../../../interfaces/IPoint";
|
|
13
|
+
import { OverlayLayer } from "./extensions/OverlayLayer";
|
|
14
|
+
import { OverlayLayerView } from './overlayLayerView';
|
|
15
|
+
import { IRect } from "../../../interfaces/IRect.js";
|
|
16
|
+
export declare class DesignerCanvas extends BaseCustomWebComponentLazyAppend implements IDesignerCanvas, IPlacementView, IUiCommandHandler {
|
|
17
|
+
serviceContainer: ServiceContainer;
|
|
18
|
+
instanceServiceContainer: InstanceServiceContainer;
|
|
19
|
+
containerBoundingRect: DOMRect;
|
|
20
|
+
outerRect: DOMRect;
|
|
21
|
+
gridSize: number;
|
|
22
|
+
alignOnGrid: boolean;
|
|
23
|
+
alignOnSnap: boolean;
|
|
24
|
+
snapLines: Snaplines;
|
|
25
|
+
overlayLayer: OverlayLayerView;
|
|
26
|
+
rootDesignItem: IDesignItem;
|
|
27
|
+
eatEvents: Element;
|
|
28
|
+
transformHelperElement: HTMLDivElement;
|
|
29
|
+
private _zoomFactor;
|
|
30
|
+
private _scaleFactor;
|
|
31
|
+
private _canvasOffset;
|
|
32
|
+
get zoomFactor(): number;
|
|
33
|
+
set zoomFactor(value: number);
|
|
34
|
+
get scaleFactor(): number;
|
|
35
|
+
get canvasOffset(): IPoint;
|
|
36
|
+
set canvasOffset(value: IPoint);
|
|
37
|
+
onContentChanged: TypedEvent<void>;
|
|
38
|
+
private _canvas;
|
|
39
|
+
private _canvasContainer;
|
|
40
|
+
private _outercanvas2;
|
|
41
|
+
private _lastHoverDesignItem;
|
|
42
|
+
private _onContextMenuBound;
|
|
43
|
+
private _pointerEventHandlerBound;
|
|
44
|
+
private _firstConnect;
|
|
45
|
+
private _onKeyDownBound;
|
|
46
|
+
private _onKeyUpBound;
|
|
47
|
+
static readonly style: CSSStyleSheet;
|
|
48
|
+
static readonly template: HTMLTemplateElement;
|
|
49
|
+
extensionManager: IExtensionManager;
|
|
50
|
+
private _pointerextensions;
|
|
51
|
+
private _onDblClickBound;
|
|
52
|
+
constructor();
|
|
53
|
+
get designerWidth(): string;
|
|
54
|
+
set designerWidth(value: string);
|
|
55
|
+
get designerHeight(): string;
|
|
56
|
+
set designerHeight(value: string);
|
|
57
|
+
get designerOffsetWidth(): number;
|
|
58
|
+
get designerOffsetHeight(): number;
|
|
59
|
+
set additionalStyle(value: CSSStyleSheet);
|
|
60
|
+
executeCommand(command: IUiCommand): Promise<void>;
|
|
61
|
+
canExecuteCommand(command: IUiCommand): boolean;
|
|
62
|
+
handleSelectAll(): void;
|
|
63
|
+
handleCopyCommand(): Promise<void>;
|
|
64
|
+
handlePasteCommand(): Promise<void>;
|
|
65
|
+
handleDeleteCommand(): void;
|
|
66
|
+
initialize(serviceContainer: ServiceContainer): void;
|
|
67
|
+
elementFromPoint(x: number, y: number): Element;
|
|
68
|
+
connectedCallback(): void;
|
|
69
|
+
zoomFactorChanged(): void;
|
|
70
|
+
_updateTransform(): void;
|
|
71
|
+
setDesignItems(designItems: IDesignItem[]): void;
|
|
72
|
+
addDesignItems(designItems: IDesignItem[]): void;
|
|
73
|
+
private _onDragEnter;
|
|
74
|
+
private _onDragLeave;
|
|
75
|
+
private _onDragOver;
|
|
76
|
+
private _onDrop;
|
|
77
|
+
private _onContextMenu;
|
|
78
|
+
showDesignItemContextMenu(designItem: IDesignItem, event: MouseEvent): ContextMenuHelper;
|
|
79
|
+
private _onDblClick;
|
|
80
|
+
private onKeyUp;
|
|
81
|
+
private onKeyDown;
|
|
82
|
+
getNormalizedEventCoordinates(event: MouseEvent): IPoint;
|
|
83
|
+
getNormalizedElementCoordinates(element: Element): IRect;
|
|
84
|
+
getNormalizedOffsetInElement(event: MouseEvent, element: Element): IPoint;
|
|
85
|
+
getElementAtPoint(point: IPoint, ignoreElementCallback?: (element: HTMLElement) => boolean): HTMLElement;
|
|
86
|
+
_rect: SVGRectElement;
|
|
87
|
+
private _pointerEventHandler;
|
|
88
|
+
private _fillCalculationrects;
|
|
89
|
+
addOverlay(element: SVGGraphicsElement, overlayLayer?: OverlayLayer): void;
|
|
90
|
+
removeOverlay(element: SVGGraphicsElement): void;
|
|
91
|
+
getItemsBelowMouse(event: MouseEvent): Element[];
|
|
92
|
+
}
|