@node-projects/web-component-designer 0.1.94 → 0.1.95
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/widgets/designerView/IDesignerCanvas.d.ts +1 -0
- package/dist/elements/widgets/designerView/designerCanvas.d.ts +2 -0
- package/dist/elements/widgets/designerView/designerCanvas.js +6 -0
- package/dist/elements/widgets/designerView/extensions/EditText/EditTextExtension.js +5 -1
- package/package.json +1 -1
|
@@ -32,6 +32,7 @@ export interface IDesignerCanvas extends IPlacementView, IUiCommandHandler {
|
|
|
32
32
|
canvasOffset: IPoint;
|
|
33
33
|
canvas: HTMLElement;
|
|
34
34
|
additionalStyles: CSSStyleSheet[];
|
|
35
|
+
ignoreEvent(event: Event): any;
|
|
35
36
|
initialize(serviceContainer: ServiceContainer): any;
|
|
36
37
|
getNormalizedEventCoordinates(event: MouseEvent): IPoint;
|
|
37
38
|
getViewportCoordinates(event: MouseEvent): IPoint;
|
|
@@ -63,6 +63,7 @@ export declare class DesignerCanvas extends BaseCustomWebComponentLazyAppend imp
|
|
|
63
63
|
extensionManager: IExtensionManager;
|
|
64
64
|
private _pointerextensions;
|
|
65
65
|
private _lastCopiedPrimaryItem;
|
|
66
|
+
private _ignoreEvent;
|
|
66
67
|
constructor();
|
|
67
68
|
get designerWidth(): string;
|
|
68
69
|
set designerWidth(value: string);
|
|
@@ -74,6 +75,7 @@ export declare class DesignerCanvas extends BaseCustomWebComponentLazyAppend imp
|
|
|
74
75
|
set additionalStyles(value: CSSStyleSheet[]);
|
|
75
76
|
get additionalStyles(): CSSStyleSheet[];
|
|
76
77
|
private applyAllStyles;
|
|
78
|
+
ignoreEvent(event: Event): void;
|
|
77
79
|
executeCommand(command: IUiCommand): Promise<void>;
|
|
78
80
|
disableBackgroud(): void;
|
|
79
81
|
enableBackground(): void;
|
|
@@ -275,6 +275,7 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
275
275
|
extensionManager;
|
|
276
276
|
_pointerextensions;
|
|
277
277
|
_lastCopiedPrimaryItem;
|
|
278
|
+
_ignoreEvent;
|
|
278
279
|
constructor() {
|
|
279
280
|
super();
|
|
280
281
|
this._restoreCachedInititalValues();
|
|
@@ -342,6 +343,9 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
342
343
|
}
|
|
343
344
|
this._canvasShadowRoot.adoptedStyleSheets = styles;
|
|
344
345
|
}
|
|
346
|
+
ignoreEvent(event) {
|
|
347
|
+
this._ignoreEvent = event;
|
|
348
|
+
}
|
|
345
349
|
/* --- start IUiCommandHandler --- */
|
|
346
350
|
async executeCommand(command) {
|
|
347
351
|
const modelCommandService = this.serviceContainer.modelCommandService;
|
|
@@ -1026,6 +1030,8 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
1026
1030
|
}
|
|
1027
1031
|
}
|
|
1028
1032
|
_pointerEventHandler(event, forceElement = null) {
|
|
1033
|
+
if (this._ignoreEvent === event)
|
|
1034
|
+
return;
|
|
1029
1035
|
if (!this.serviceContainer)
|
|
1030
1036
|
return;
|
|
1031
1037
|
if (this._touchGestureHelper.multitouchEventActive)
|
|
@@ -47,7 +47,11 @@ export class EditTextExtension extends AbstractExtension {
|
|
|
47
47
|
let itemRect = this.extendedItem.element.getBoundingClientRect();
|
|
48
48
|
const elements = EditTextExtension.template.content.cloneNode(true);
|
|
49
49
|
FontPropertyEditor.addFontsToSelect(elements.querySelector('#fontFamily'));
|
|
50
|
-
elements.querySelectorAll('button').forEach(x => x.onpointerdown = () =>
|
|
50
|
+
elements.querySelectorAll('button').forEach(x => x.onpointerdown = (e) => {
|
|
51
|
+
this.designerCanvas.ignoreEvent(e);
|
|
52
|
+
this._formatSelection(x.dataset['command'], x.dataset['commandParameter']);
|
|
53
|
+
});
|
|
54
|
+
elements.querySelectorAll('select').forEach(x => x.onpointerdown = (e) => this.designerCanvas.ignoreEvent(e));
|
|
51
55
|
elements.querySelectorAll('select').forEach(x => x.onchange = () => this._formatSelection(x.dataset['command'], x.value));
|
|
52
56
|
//Button overlay
|
|
53
57
|
const foreignObject = document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject');
|