@node-projects/web-component-designer 0.0.154 → 0.0.155
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/helper/ElementHelper.js +18 -3
- package/dist/elements/helper/TransformHelper.d.ts +5 -1
- package/dist/elements/helper/TransformHelper.js +26 -23
- package/dist/elements/helper/contextMenu/ContextMenu.js +9 -1
- package/dist/elements/services/manifestParsers/WebcomponentManifestParserService.d.ts +2 -2
- package/dist/elements/services/manifestParsers/WebcomponentManifestParserService.js +3 -2
- package/dist/elements/services/modelCommandService/DefaultModelCommandService.js +2 -0
- package/dist/elements/services/propertiesService/IPropertiesService.d.ts +6 -1
- package/dist/elements/services/propertiesService/IPropertiesService.js +6 -1
- package/dist/elements/services/propertiesService/services/AbstractPolymerLikePropertiesService.d.ts +2 -1
- package/dist/elements/services/propertiesService/services/AbstractPolymerLikePropertiesService.js +3 -2
- package/dist/elements/services/propertiesService/services/AbstractPropertiesService.d.ts +2 -2
- package/dist/elements/services/propertiesService/services/AbstractPropertiesService.js +3 -0
- package/dist/elements/services/propertiesService/services/AttributesPropertiesService.d.ts +2 -2
- package/dist/elements/services/propertiesService/services/AttributesPropertiesService.js +3 -2
- package/dist/elements/services/propertiesService/services/CommonPropertiesService.d.ts +2 -1
- package/dist/elements/services/propertiesService/services/CommonPropertiesService.js +3 -2
- package/dist/elements/services/propertiesService/services/CssPropertiesService.d.ts +2 -1
- package/dist/elements/services/propertiesService/services/CssPropertiesService.js +3 -2
- package/dist/elements/services/propertiesService/services/ListPropertiesService.d.ts +2 -1
- package/dist/elements/services/propertiesService/services/ListPropertiesService.js +3 -2
- package/dist/elements/services/propertiesService/services/NativeElementsPropertiesService.d.ts +2 -1
- package/dist/elements/services/propertiesService/services/NativeElementsPropertiesService.js +3 -2
- package/dist/elements/services/propertiesService/services/WebcomponentManifestPropertiesService.d.ts +2 -2
- package/dist/elements/services/propertiesService/services/WebcomponentManifestPropertiesService.js +3 -2
- package/dist/elements/widgets/designerView/designerCanvas.js +2 -0
- package/dist/elements/widgets/designerView/extensions/ResizeExtension.js +33 -28
- package/dist/elements/widgets/propertyGrid/PropertyGrid.js +5 -0
- package/dist/elements/widgets/propertyGrid/PropertyGridPropertyList.d.ts +1 -0
- package/dist/elements/widgets/propertyGrid/PropertyGridPropertyList.js +5 -1
- package/package.json +1 -1
|
@@ -47,9 +47,24 @@ export function getElementsWindowOffsetWithoutSelfAndParentTransformations(eleme
|
|
|
47
47
|
var offsetLeft = 0;
|
|
48
48
|
var offsetTop = 0;
|
|
49
49
|
while (element) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
if (element instanceof SVGSVGElement) {
|
|
51
|
+
const bcEl = element.getBoundingClientRect();
|
|
52
|
+
const bcPar = element.parentElement.getBoundingClientRect();
|
|
53
|
+
offsetLeft += bcEl.left - bcPar.left;
|
|
54
|
+
offsetTop += bcEl.top - bcPar.top;
|
|
55
|
+
element = element.parentElement;
|
|
56
|
+
}
|
|
57
|
+
else if (element instanceof SVGGraphicsElement) {
|
|
58
|
+
let bbox = element.getBBox();
|
|
59
|
+
offsetLeft += bbox.x;
|
|
60
|
+
offsetTop += bbox.y;
|
|
61
|
+
element = element.parentElement;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
offsetLeft += element.offsetLeft;
|
|
65
|
+
offsetTop += element.offsetTop;
|
|
66
|
+
element = element.offsetParent;
|
|
67
|
+
}
|
|
53
68
|
}
|
|
54
69
|
return { offsetLeft: offsetLeft, offsetTop: offsetTop };
|
|
55
70
|
}
|
|
@@ -2,7 +2,7 @@ import { IPoint } from "../../interfaces/IPoint.js";
|
|
|
2
2
|
import { IDesignerCanvas } from "../widgets/designerView/IDesignerCanvas.js";
|
|
3
3
|
export declare function combineTransforms(element: HTMLElement, actualTransforms: string, requestedTransformation: string): void;
|
|
4
4
|
export declare function getDomMatrix(element: HTMLElement): DOMMatrix;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function transformPointByInverseMatrix(point: DOMPoint, matrix: DOMMatrix): DOMPoint;
|
|
6
6
|
export declare function getRotationMatrix3d(axisOfRotation: 'x' | 'y' | 'z' | 'X' | 'Y' | 'Z', angle: number): any[];
|
|
7
7
|
export declare function rotateElementByMatrix3d(element: HTMLElement, matrix: number[]): void;
|
|
8
8
|
export declare function matrixArrayToCssMatrix(matrixArray: number[]): string;
|
|
@@ -13,6 +13,10 @@ export declare function getDesignerCanvasNormalizedTransformedOriginWithoutParen
|
|
|
13
13
|
export declare function getResultingTransformationBetweenElementAndAllAncestors(element: HTMLElement, ancestor: HTMLElement, excludeAncestor?: boolean): DOMMatrix;
|
|
14
14
|
export declare function getByParentsTransformedPointRelatedToCanvas(element: HTMLElement, point: DOMPoint, designerCanvas: IDesignerCanvas): IPoint;
|
|
15
15
|
export declare function getDesignerCanvasNormalizedTransformedPoint(element: HTMLElement, point: IPoint, designerCanvas: IDesignerCanvas): IPoint;
|
|
16
|
+
export declare function getElementSize(element: HTMLElement): {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
16
20
|
export declare function getDesignerCanvasNormalizedTransformedCornerDOMPoints(element: HTMLElement, untransformedCornerPointsOffset: IPoint | null, designerCanvas: IDesignerCanvas): [DOMPoint, DOMPoint, DOMPoint, DOMPoint];
|
|
17
21
|
export declare function extractTranslationFromDOMMatrix(matrix: DOMMatrix): DOMPoint;
|
|
18
22
|
export declare function extractRotationAngleFromDOMMatrix(matrix: DOMMatrix): number;
|
|
@@ -18,8 +18,12 @@ export function combineTransforms(element, actualTransforms, requestedTransforma
|
|
|
18
18
|
export function getDomMatrix(element) {
|
|
19
19
|
return new DOMMatrix(window.getComputedStyle(element).transform);
|
|
20
20
|
}
|
|
21
|
-
export function
|
|
22
|
-
|
|
21
|
+
export function transformPointByInverseMatrix(point, matrix) {
|
|
22
|
+
const inverse = matrix.inverse();
|
|
23
|
+
//fix chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1395645
|
|
24
|
+
inverse.m33 = 1;
|
|
25
|
+
inverse.m44 = 1;
|
|
26
|
+
return point.matrixTransform(inverse);
|
|
23
27
|
}
|
|
24
28
|
export function getRotationMatrix3d(axisOfRotation, angle) {
|
|
25
29
|
const angleInRadians = angle / 180 * Math.PI;
|
|
@@ -83,7 +87,7 @@ export function addVectors(vectorA, vectorB) {
|
|
|
83
87
|
return [vectorA[0] + vectorB[0], vectorA[1] + vectorB[1]];
|
|
84
88
|
}
|
|
85
89
|
export function getDesignerCanvasNormalizedTransformedOriginWithoutParentTransformation(element, designerCanvas) {
|
|
86
|
-
const top0 = new DOMPointReadOnly(-
|
|
90
|
+
const top0 = new DOMPointReadOnly(-parseFloat(getComputedStyle(element).transformOrigin.split(' ')[0]), -parseFloat(getComputedStyle(element).transformOrigin.split(' ')[1]), 0, 0);
|
|
87
91
|
const p0Offsets = getElementsWindowOffsetWithoutSelfAndParentTransformations(element);
|
|
88
92
|
const transformOriginAbsolutRelatedToWindowWithoutAnyTransformation = new DOMPoint(p0Offsets.offsetLeft - top0.x, p0Offsets.offsetTop - top0.y);
|
|
89
93
|
const designerCanvasNormalizedTransformedOrigin = new DOMPoint(transformOriginAbsolutRelatedToWindowWithoutAnyTransformation.x - designerCanvas.containerBoundingRect.x, transformOriginAbsolutRelatedToWindowWithoutAnyTransformation.y - designerCanvas.containerBoundingRect.y);
|
|
@@ -113,7 +117,7 @@ export function getByParentsTransformedPointRelatedToCanvas(element, point, desi
|
|
|
113
117
|
let byParentTransformedPointRelatedToCanvas = { x: 0, y: 0 };
|
|
114
118
|
while (actualElement != canvas) {
|
|
115
119
|
const parentElement = getParentElementIncludingSlots(actualElement);
|
|
116
|
-
const parentElementTransformOrigin = new DOMPoint(getElementsWindowOffsetWithoutSelfAndParentTransformations(parentElement).offsetLeft - designerCanvas.outerRect.x +
|
|
120
|
+
const parentElementTransformOrigin = new DOMPoint(getElementsWindowOffsetWithoutSelfAndParentTransformations(parentElement).offsetLeft - designerCanvas.outerRect.x + parseFloat(getComputedStyle(parentElement).transformOrigin.split(' ')[0]), getElementsWindowOffsetWithoutSelfAndParentTransformations(parentElement).offsetTop - designerCanvas.outerRect.y + parseFloat(getComputedStyle(parentElement).transformOrigin.split(' ')[1]));
|
|
117
121
|
parentElementTransformOrigin.x -= extractTranslationFromDOMMatrix(new DOMMatrix(element.style.transform)).x;
|
|
118
122
|
parentElementTransformOrigin.y -= extractTranslationFromDOMMatrix(new DOMMatrix(element.style.transform)).y;
|
|
119
123
|
const parentElementTransformOriginToPointVector = new DOMPointReadOnly(-parentElementTransformOrigin.x + (element == actualElement ? point.x : byParentTransformedPointRelatedToCanvas.x), -parentElementTransformOrigin.y + (element == actualElement ? point.y : byParentTransformedPointRelatedToCanvas.y));
|
|
@@ -126,6 +130,20 @@ export function getByParentsTransformedPointRelatedToCanvas(element, point, desi
|
|
|
126
130
|
export function getDesignerCanvasNormalizedTransformedPoint(element, point, designerCanvas) {
|
|
127
131
|
return getDesignerCanvasNormalizedTransformedCornerDOMPoints(element, { x: -point.x, y: -point.y }, designerCanvas)[0];
|
|
128
132
|
}
|
|
133
|
+
export function getElementSize(element) {
|
|
134
|
+
let width = element.offsetWidth;
|
|
135
|
+
let height = element.offsetHeight;
|
|
136
|
+
if (element instanceof SVGElement && element.width) {
|
|
137
|
+
width = element.width.baseVal.value;
|
|
138
|
+
height = element.height.baseVal.value;
|
|
139
|
+
}
|
|
140
|
+
else if (element instanceof SVGGraphicsElement) {
|
|
141
|
+
let bbox = element.getBBox();
|
|
142
|
+
width = bbox.width;
|
|
143
|
+
height = bbox.height;
|
|
144
|
+
}
|
|
145
|
+
return { width, height };
|
|
146
|
+
}
|
|
129
147
|
export function getDesignerCanvasNormalizedTransformedCornerDOMPoints(element, untransformedCornerPointsOffset, designerCanvas) {
|
|
130
148
|
const topleft = 0;
|
|
131
149
|
const topright = 1;
|
|
@@ -137,22 +155,7 @@ export function getDesignerCanvasNormalizedTransformedCornerDOMPoints(element, u
|
|
|
137
155
|
x: p0Offsets.offsetLeft - designerCanvas.containerBoundingRect.left,
|
|
138
156
|
y: p0Offsets.offsetTop - designerCanvas.containerBoundingRect.top
|
|
139
157
|
});
|
|
140
|
-
let width =
|
|
141
|
-
let height = parseInt(getComputedStyle(element).height.replace('px', ''));
|
|
142
|
-
if (getComputedStyle(element).boxSizing == 'content-box') {
|
|
143
|
-
width += parseInt(getComputedStyle(element).paddingLeft.replace('px', ''))
|
|
144
|
-
+ parseInt(getComputedStyle(element).marginLeft.replace('px', ''))
|
|
145
|
-
+ parseInt(getComputedStyle(element).borderLeft.replace('px', ''))
|
|
146
|
-
+ parseInt(getComputedStyle(element).paddingRight.replace('px', ''))
|
|
147
|
-
+ parseInt(getComputedStyle(element).marginRight.replace('px', ''))
|
|
148
|
-
+ parseInt(getComputedStyle(element).borderRight.replace('px', ''));
|
|
149
|
-
height += parseInt(getComputedStyle(element).paddingTop.replace('px', ''))
|
|
150
|
-
+ parseInt(getComputedStyle(element).marginTop.replace('px', ''))
|
|
151
|
-
+ parseInt(getComputedStyle(element).borderTop.replace('px', ''))
|
|
152
|
-
+ parseInt(getComputedStyle(element).paddingBottom.replace('px', ''))
|
|
153
|
-
+ parseInt(getComputedStyle(element).marginBottom.replace('px', ''))
|
|
154
|
-
+ parseInt(getComputedStyle(element).borderBottom.replace('px', ''));
|
|
155
|
-
}
|
|
158
|
+
let { width, height } = getElementSize(element);
|
|
156
159
|
const elementWithoutTransformCornerDOMPoints = [];
|
|
157
160
|
elementWithoutTransformCornerDOMPoints[topleft] = DOMPoint.fromPoint({
|
|
158
161
|
x: p0OffsetsRelatedToCanvas.x - intUntransformedCornerPointsOffset.x,
|
|
@@ -171,12 +174,12 @@ export function getDesignerCanvasNormalizedTransformedCornerDOMPoints(element, u
|
|
|
171
174
|
y: p0OffsetsRelatedToCanvas.y + height + intUntransformedCornerPointsOffset.y
|
|
172
175
|
});
|
|
173
176
|
const transformOriginWithoutTransformRelatedToCanvas = DOMPointReadOnly.fromPoint({
|
|
174
|
-
x: p0OffsetsRelatedToCanvas.x +
|
|
175
|
-
y: p0OffsetsRelatedToCanvas.y +
|
|
177
|
+
x: p0OffsetsRelatedToCanvas.x + parseFloat(getComputedStyle(element).transformOrigin.split(' ')[0]),
|
|
178
|
+
y: p0OffsetsRelatedToCanvas.y + parseFloat(getComputedStyle(element).transformOrigin.split(' ')[1]),
|
|
176
179
|
z: 0,
|
|
177
180
|
w: 0
|
|
178
181
|
});
|
|
179
|
-
const designerCanvasNormalizedTransformOrigin = getByParentsTransformedPointRelatedToCanvas(element, new DOMPoint(getElementsWindowOffsetWithoutSelfAndParentTransformations(element).offsetLeft - designerCanvas.outerRect.left +
|
|
182
|
+
const designerCanvasNormalizedTransformOrigin = getByParentsTransformedPointRelatedToCanvas(element, new DOMPoint(getElementsWindowOffsetWithoutSelfAndParentTransformations(element).offsetLeft - designerCanvas.outerRect.left + parseFloat(getComputedStyle(element).transformOrigin.split(' ')[0]), getElementsWindowOffsetWithoutSelfAndParentTransformations(element).offsetTop - designerCanvas.outerRect.top + parseFloat(getComputedStyle(element).transformOrigin.split(' ')[1])), designerCanvas);
|
|
180
183
|
let top0 = new DOMPoint(-(transformOriginWithoutTransformRelatedToCanvas.x - elementWithoutTransformCornerDOMPoints[topleft].x), -(transformOriginWithoutTransformRelatedToCanvas.y - elementWithoutTransformCornerDOMPoints[topleft].y));
|
|
181
184
|
let top1 = new DOMPoint(-(transformOriginWithoutTransformRelatedToCanvas.x - elementWithoutTransformCornerDOMPoints[topright].x), -(transformOriginWithoutTransformRelatedToCanvas.y - elementWithoutTransformCornerDOMPoints[topright].y));
|
|
182
185
|
let top2 = new DOMPoint(-(transformOriginWithoutTransformRelatedToCanvas.x - elementWithoutTransformCornerDOMPoints[bottomleft].x), -(transformOriginWithoutTransformRelatedToCanvas.y - elementWithoutTransformCornerDOMPoints[bottomleft].y));
|
|
@@ -178,7 +178,15 @@ export class ContextMenu {
|
|
|
178
178
|
this.close();
|
|
179
179
|
});
|
|
180
180
|
if (item.children != null) {
|
|
181
|
-
|
|
181
|
+
let childmenu = this.renderLevel(item.children);
|
|
182
|
+
li.appendChild(childmenu);
|
|
183
|
+
li.addEventListener('mouseenter', () => {
|
|
184
|
+
const childRect = childmenu.getBoundingClientRect();
|
|
185
|
+
if (childRect.top + childRect.height > window.innerHeight) {
|
|
186
|
+
childmenu.style.top = 'unset';
|
|
187
|
+
childmenu.style.bottom = '0';
|
|
188
|
+
}
|
|
189
|
+
});
|
|
182
190
|
}
|
|
183
191
|
}
|
|
184
192
|
lastWasDivider = false;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BindingTarget } from "../../item/BindingTarget";
|
|
2
2
|
import { IElementDefinition } from "../elementsService/IElementDefinition";
|
|
3
3
|
import { IElementsService } from "../elementsService/IElementsService";
|
|
4
|
-
import { IPropertiesService } from "../propertiesService/IPropertiesService";
|
|
4
|
+
import { IPropertiesService, RefreshMode } from "../propertiesService/IPropertiesService";
|
|
5
5
|
import { IProperty } from "../propertiesService/IProperty";
|
|
6
6
|
import { IDesignItem } from "../../item/IDesignItem";
|
|
7
7
|
import { AbstractPropertiesService } from "../propertiesService/services/AbstractPropertiesService";
|
|
8
8
|
export declare class WebcomponentManifestParserService extends AbstractPropertiesService implements IElementsService, IPropertiesService {
|
|
9
|
-
|
|
9
|
+
getRefreshMode(designItem: IDesignItem): RefreshMode;
|
|
10
10
|
private _name;
|
|
11
11
|
get name(): string;
|
|
12
12
|
private _packageData;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BindingTarget } from "../../item/BindingTarget";
|
|
2
|
+
import { RefreshMode } from "../propertiesService/IPropertiesService";
|
|
2
3
|
import { PropertyType } from "../propertiesService/PropertyType";
|
|
3
4
|
import { AbstractPropertiesService } from "../propertiesService/services/AbstractPropertiesService";
|
|
4
5
|
export class WebcomponentManifestParserService extends AbstractPropertiesService {
|
|
5
|
-
|
|
6
|
-
return
|
|
6
|
+
getRefreshMode(designItem) {
|
|
7
|
+
return RefreshMode.none;
|
|
7
8
|
}
|
|
8
9
|
_name;
|
|
9
10
|
get name() { return this._name; }
|
|
@@ -21,6 +21,7 @@ export class DefaultModelCommandService {
|
|
|
21
21
|
}
|
|
22
22
|
async executeCommand(designerCanvas, command) {
|
|
23
23
|
let sel = designerCanvas.instanceServiceContainer.selectionService.primarySelection;
|
|
24
|
+
const selection = [...designerCanvas.instanceServiceContainer.selectionService.selectedElements];
|
|
24
25
|
if (command.type == CommandType.moveBackward) {
|
|
25
26
|
let idx = sel.parent.indexOf(sel) - 1;
|
|
26
27
|
if (idx >= 0)
|
|
@@ -121,6 +122,7 @@ export class DefaultModelCommandService {
|
|
|
121
122
|
}
|
|
122
123
|
else
|
|
123
124
|
return null;
|
|
125
|
+
designerCanvas.instanceServiceContainer.selectionService.setSelectedElements(selection);
|
|
124
126
|
return true;
|
|
125
127
|
}
|
|
126
128
|
}
|
|
@@ -4,8 +4,13 @@ import { IDesignItem } from '../../item/IDesignItem';
|
|
|
4
4
|
import { ValueType } from './ValueType';
|
|
5
5
|
import { BindingTarget } from '../../item/BindingTarget';
|
|
6
6
|
import { IBinding } from '../../item/IBinding';
|
|
7
|
+
export declare enum RefreshMode {
|
|
8
|
+
none = 0,
|
|
9
|
+
full = 1,
|
|
10
|
+
fullOnValueChange = 2
|
|
11
|
+
}
|
|
7
12
|
export interface IPropertiesService extends IService {
|
|
8
|
-
|
|
13
|
+
getRefreshMode(designItem: IDesignItem): RefreshMode;
|
|
9
14
|
isHandledElement(designItem: IDesignItem): boolean;
|
|
10
15
|
getProperties(designItem: IDesignItem): IProperty[];
|
|
11
16
|
getProperty(designItem: IDesignItem, name: string): IProperty;
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var RefreshMode;
|
|
2
|
+
(function (RefreshMode) {
|
|
3
|
+
RefreshMode[RefreshMode["none"] = 0] = "none";
|
|
4
|
+
RefreshMode[RefreshMode["full"] = 1] = "full";
|
|
5
|
+
RefreshMode[RefreshMode["fullOnValueChange"] = 2] = "fullOnValueChange";
|
|
6
|
+
})(RefreshMode || (RefreshMode = {}));
|
package/dist/elements/services/propertiesService/services/AbstractPolymerLikePropertiesService.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IProperty } from '../IProperty';
|
|
2
2
|
import { IDesignItem } from '../../../item/IDesignItem';
|
|
3
3
|
import { AbstractPropertiesService } from "./AbstractPropertiesService";
|
|
4
|
+
import { RefreshMode } from '../IPropertiesService';
|
|
4
5
|
export declare abstract class AbstractPolymerLikePropertiesService extends AbstractPropertiesService {
|
|
5
|
-
|
|
6
|
+
getRefreshMode(designItem: IDesignItem): RefreshMode;
|
|
6
7
|
getProperties(designItem: IDesignItem): IProperty[];
|
|
7
8
|
protected parseProperties(list: any): IProperty[];
|
|
8
9
|
}
|
package/dist/elements/services/propertiesService/services/AbstractPolymerLikePropertiesService.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { PropertiesHelper } from './PropertiesHelper';
|
|
2
2
|
import { AbstractPropertiesService } from "./AbstractPropertiesService";
|
|
3
3
|
import { PropertyType } from '../PropertyType';
|
|
4
|
+
import { RefreshMode } from '../IPropertiesService';
|
|
4
5
|
export class AbstractPolymerLikePropertiesService extends AbstractPropertiesService {
|
|
5
|
-
|
|
6
|
-
return
|
|
6
|
+
getRefreshMode(designItem) {
|
|
7
|
+
return RefreshMode.full;
|
|
7
8
|
}
|
|
8
9
|
getProperties(designItem) {
|
|
9
10
|
if (!this.isHandledElement(designItem))
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IPropertiesService } from "../IPropertiesService";
|
|
1
|
+
import { IPropertiesService, RefreshMode } from "../IPropertiesService";
|
|
2
2
|
import { IProperty } from '../IProperty';
|
|
3
3
|
import { IDesignItem } from '../../../item/IDesignItem';
|
|
4
4
|
import { ValueType } from "../ValueType";
|
|
5
5
|
import { BindingTarget } from "../../../item/BindingTarget";
|
|
6
6
|
import { IBinding } from "../../../item/IBinding";
|
|
7
7
|
export declare abstract class AbstractPropertiesService implements IPropertiesService {
|
|
8
|
-
abstract
|
|
8
|
+
abstract getRefreshMode(designItem: IDesignItem): RefreshMode;
|
|
9
9
|
abstract isHandledElement(designItem: IDesignItem): boolean;
|
|
10
10
|
protected _notifyChangedProperty(designItem: IDesignItem, property: IProperty, value: any): void;
|
|
11
11
|
getProperty(designItem: IDesignItem, name: string): IProperty;
|
|
@@ -15,6 +15,9 @@ export class AbstractPropertiesService {
|
|
|
15
15
|
if (property.propertyType == PropertyType.cssValue) {
|
|
16
16
|
d.styles.set(property.name, value);
|
|
17
17
|
d.element.style[property.name] = value;
|
|
18
|
+
//unkown css property names do not trigger the mutation observer of property grid,
|
|
19
|
+
//fixed by assinging stle again to the attribute
|
|
20
|
+
d.element.setAttribute('style', d.element.getAttribute('style'));
|
|
18
21
|
}
|
|
19
22
|
else {
|
|
20
23
|
let attributeName = property.attributeName;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPropertiesService } from "../IPropertiesService";
|
|
1
|
+
import { IPropertiesService, RefreshMode } from "../IPropertiesService";
|
|
2
2
|
import { IProperty } from '../IProperty';
|
|
3
3
|
import { IDesignItem } from '../../../item/IDesignItem';
|
|
4
4
|
import { ValueType } from "../ValueType";
|
|
@@ -6,7 +6,7 @@ import { IBinding } from "../../../item/IBinding.js";
|
|
|
6
6
|
import { BindingTarget } from "../../../item/BindingTarget";
|
|
7
7
|
export declare class AttributesPropertiesService implements IPropertiesService {
|
|
8
8
|
name: string;
|
|
9
|
-
|
|
9
|
+
getRefreshMode(designItem: IDesignItem): RefreshMode;
|
|
10
10
|
isHandledElement(designItem: IDesignItem): boolean;
|
|
11
11
|
getProperty(designItem: IDesignItem, name: string): IProperty;
|
|
12
12
|
getProperties(designItem: IDesignItem): IProperty[];
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { RefreshMode } from "../IPropertiesService";
|
|
1
2
|
import { ValueType } from "../ValueType";
|
|
2
3
|
import { BindingTarget } from "../../../item/BindingTarget";
|
|
3
4
|
import { PropertyType } from "../PropertyType";
|
|
4
5
|
export class AttributesPropertiesService {
|
|
5
6
|
name = "attributes";
|
|
6
|
-
|
|
7
|
-
return
|
|
7
|
+
getRefreshMode(designItem) {
|
|
8
|
+
return RefreshMode.fullOnValueChange;
|
|
8
9
|
}
|
|
9
10
|
isHandledElement(designItem) {
|
|
10
11
|
return true;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IProperty } from '../IProperty';
|
|
2
2
|
import { IDesignItem } from '../../../item/IDesignItem';
|
|
3
3
|
import { AbstractPropertiesService } from "./AbstractPropertiesService";
|
|
4
|
+
import { RefreshMode } from '../IPropertiesService';
|
|
4
5
|
export declare class CommonPropertiesService extends AbstractPropertiesService {
|
|
5
|
-
|
|
6
|
+
getRefreshMode(designItem: IDesignItem): RefreshMode;
|
|
6
7
|
private commonProperties;
|
|
7
8
|
name: string;
|
|
8
9
|
isHandledElement(designItem: IDesignItem): boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PropertyType } from "../PropertyType";
|
|
2
2
|
import { AbstractPropertiesService } from "./AbstractPropertiesService";
|
|
3
|
+
import { RefreshMode } from '../IPropertiesService';
|
|
3
4
|
export class CommonPropertiesService extends AbstractPropertiesService {
|
|
4
|
-
|
|
5
|
-
return
|
|
5
|
+
getRefreshMode(designItem) {
|
|
6
|
+
return RefreshMode.none;
|
|
6
7
|
}
|
|
7
8
|
//@ts-ignore
|
|
8
9
|
commonProperties = [
|
|
@@ -2,8 +2,9 @@ import { IProperty } from '../IProperty';
|
|
|
2
2
|
import { IDesignItem } from '../../../item/IDesignItem';
|
|
3
3
|
import { BindingTarget } from '../../../item/BindingTarget.js';
|
|
4
4
|
import { CommonPropertiesService } from './CommonPropertiesService';
|
|
5
|
+
import { RefreshMode } from '../IPropertiesService';
|
|
5
6
|
export declare class CssPropertiesService extends CommonPropertiesService {
|
|
6
|
-
|
|
7
|
+
getRefreshMode(designItem: IDesignItem): RefreshMode.none | RefreshMode.fullOnValueChange;
|
|
7
8
|
layout: IProperty[];
|
|
8
9
|
grid: IProperty[];
|
|
9
10
|
flex: IProperty[];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BindingTarget } from '../../../item/BindingTarget.js';
|
|
2
2
|
import { PropertyType } from '../PropertyType';
|
|
3
3
|
import { CommonPropertiesService } from './CommonPropertiesService';
|
|
4
|
+
import { RefreshMode } from '../IPropertiesService';
|
|
4
5
|
export class CssPropertiesService extends CommonPropertiesService {
|
|
5
|
-
|
|
6
|
-
return this.name == 'styles' ?
|
|
6
|
+
getRefreshMode(designItem) {
|
|
7
|
+
return this.name == 'styles' ? RefreshMode.fullOnValueChange : RefreshMode.none;
|
|
7
8
|
}
|
|
8
9
|
layout = [
|
|
9
10
|
{
|
|
@@ -2,8 +2,9 @@ import { IProperty } from '../IProperty';
|
|
|
2
2
|
import { IDesignItem } from '../../../item/IDesignItem';
|
|
3
3
|
import { IJsonPropertyDefinitions } from './IJsonPropertyDefinitions';
|
|
4
4
|
import { AbstractPropertiesService } from './AbstractPropertiesService';
|
|
5
|
+
import { RefreshMode } from '../IPropertiesService';
|
|
5
6
|
export declare class ListPropertiesService extends AbstractPropertiesService {
|
|
6
|
-
|
|
7
|
+
getRefreshMode(designItem: IDesignItem): RefreshMode;
|
|
7
8
|
name: string;
|
|
8
9
|
private _propertys;
|
|
9
10
|
constructor(propertyDefinitions: IJsonPropertyDefinitions);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AbstractPropertiesService } from './AbstractPropertiesService';
|
|
2
2
|
import { PropertyType } from '../PropertyType';
|
|
3
|
+
import { RefreshMode } from '../IPropertiesService';
|
|
3
4
|
export class ListPropertiesService extends AbstractPropertiesService {
|
|
4
|
-
|
|
5
|
-
return
|
|
5
|
+
getRefreshMode(designItem) {
|
|
6
|
+
return RefreshMode.full;
|
|
6
7
|
}
|
|
7
8
|
name = "list";
|
|
8
9
|
_propertys = new Map();
|
package/dist/elements/services/propertiesService/services/NativeElementsPropertiesService.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IProperty } from '../IProperty';
|
|
2
2
|
import { IDesignItem } from '../../../item/IDesignItem';
|
|
3
3
|
import { CommonPropertiesService } from "./CommonPropertiesService";
|
|
4
|
+
import { RefreshMode } from '../IPropertiesService';
|
|
4
5
|
export declare class NativeElementsPropertiesService extends CommonPropertiesService {
|
|
5
6
|
private inputProperties;
|
|
6
7
|
private textareaProperties;
|
|
@@ -12,7 +13,7 @@ export declare class NativeElementsPropertiesService extends CommonPropertiesSer
|
|
|
12
13
|
private iframeProperties;
|
|
13
14
|
private formElementProperties;
|
|
14
15
|
name: string;
|
|
15
|
-
|
|
16
|
+
getRefreshMode(designItem: IDesignItem): RefreshMode;
|
|
16
17
|
isHandledElement(designItem: IDesignItem): boolean;
|
|
17
18
|
getProperty(designItem: IDesignItem, name: string): IProperty;
|
|
18
19
|
getProperties(designItem: IDesignItem): IProperty[];
|
package/dist/elements/services/propertiesService/services/NativeElementsPropertiesService.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CommonPropertiesService } from "./CommonPropertiesService";
|
|
2
2
|
import { PropertyType } from '../PropertyType';
|
|
3
|
+
import { RefreshMode } from '../IPropertiesService';
|
|
3
4
|
export class NativeElementsPropertiesService extends CommonPropertiesService {
|
|
4
5
|
inputProperties = [
|
|
5
6
|
{
|
|
@@ -156,8 +157,8 @@ export class NativeElementsPropertiesService extends CommonPropertiesService {
|
|
|
156
157
|
}
|
|
157
158
|
];
|
|
158
159
|
name = "native";
|
|
159
|
-
|
|
160
|
-
return
|
|
160
|
+
getRefreshMode(designItem) {
|
|
161
|
+
return RefreshMode.full;
|
|
161
162
|
}
|
|
162
163
|
isHandledElement(designItem) {
|
|
163
164
|
switch (designItem.element.localName) {
|
package/dist/elements/services/propertiesService/services/WebcomponentManifestPropertiesService.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BindingTarget } from "../../../item/BindingTarget.js";
|
|
2
2
|
import { IDesignItem } from "../../../item/IDesignItem.js";
|
|
3
|
-
import { IPropertiesService } from "../IPropertiesService.js";
|
|
3
|
+
import { IPropertiesService, RefreshMode } from "../IPropertiesService.js";
|
|
4
4
|
import { IProperty } from "../IProperty.js";
|
|
5
5
|
import { AbstractPropertiesService } from "./AbstractPropertiesService.js";
|
|
6
6
|
export declare class WebcomponentManifestPropertiesService extends AbstractPropertiesService implements IPropertiesService {
|
|
7
|
-
|
|
7
|
+
getRefreshMode(designItem: IDesignItem): RefreshMode;
|
|
8
8
|
private _name;
|
|
9
9
|
get name(): string;
|
|
10
10
|
private _propertiesList;
|
package/dist/elements/services/propertiesService/services/WebcomponentManifestPropertiesService.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BindingTarget } from "../../../item/BindingTarget.js";
|
|
2
|
+
import { RefreshMode } from "../IPropertiesService.js";
|
|
2
3
|
import { PropertyType } from "../PropertyType.js";
|
|
3
4
|
import { AbstractPropertiesService } from "./AbstractPropertiesService.js";
|
|
4
5
|
export class WebcomponentManifestPropertiesService extends AbstractPropertiesService {
|
|
5
|
-
|
|
6
|
-
return
|
|
6
|
+
getRefreshMode(designItem) {
|
|
7
|
+
return RefreshMode.full;
|
|
7
8
|
}
|
|
8
9
|
_name;
|
|
9
10
|
get name() { return this._name; }
|
|
@@ -663,6 +663,8 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
663
663
|
di.setStyle('position', 'absolute');
|
|
664
664
|
di.setStyle('left', (position.x - pos.x) + 'px');
|
|
665
665
|
di.setStyle('top', (position.y - pos.y) + 'px');
|
|
666
|
+
const containerService = this.serviceContainer.getLastServiceWhere('containerService', x => x.serviceForContainer(newContainer, getComputedStyle(newContainer.element)));
|
|
667
|
+
containerService.enterContainer(newContainer, [di]);
|
|
666
668
|
this.instanceServiceContainer.undoService.execute(new InsertAction(newContainer, newContainer.childCount, di));
|
|
667
669
|
grp.commit();
|
|
668
670
|
requestAnimationFrame(() => this.instanceServiceContainer.selectionService.setSelectedElements([di]));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventNames } from "../../../../enums/EventNames";
|
|
2
|
-
import {
|
|
2
|
+
import { transformPointByInverseMatrix, getDomMatrix, getDesignerCanvasNormalizedTransformedCornerDOMPoints, normalizeToAbsolutePosition } from "../../../helper/TransformHelper.js";
|
|
3
3
|
import { AbstractExtension } from './AbstractExtension';
|
|
4
4
|
export class ResizeExtension extends AbstractExtension {
|
|
5
5
|
resizeAllSelected;
|
|
@@ -158,116 +158,121 @@ export class ResizeExtension extends AbstractExtension {
|
|
|
158
158
|
let trackX = Math.round(diff.x - this._initialPoint.x - this._offsetPoint.x);
|
|
159
159
|
let trackY = Math.round(diff.y - this._initialPoint.y - this._offsetPoint.y);
|
|
160
160
|
let matrix = getDomMatrix(this.extendedItem.element);
|
|
161
|
-
let transformedTrack =
|
|
161
|
+
let transformedTrack = transformPointByInverseMatrix(new DOMPoint(trackX, trackY, 0, 0), matrix);
|
|
162
|
+
let deltaX = transformedTrack.x;
|
|
163
|
+
let deltaY = transformedTrack.y;
|
|
164
|
+
if (event.shiftKey) {
|
|
165
|
+
deltaX = deltaX < deltaY ? deltaX : deltaY;
|
|
166
|
+
deltaY = deltaX;
|
|
167
|
+
}
|
|
162
168
|
let i = 0;
|
|
163
169
|
let width = null;
|
|
164
170
|
let height = null;
|
|
165
171
|
switch (this._actionModeStarted) {
|
|
166
172
|
case 'e-resize':
|
|
167
|
-
width = (this._initialSizes[i].width +
|
|
173
|
+
width = (this._initialSizes[i].width + deltaX);
|
|
168
174
|
this.extendedItem.element.style.width = width + 'px';
|
|
169
175
|
if (this.resizeAllSelected) {
|
|
170
176
|
i++;
|
|
171
177
|
for (const designItem of this.designerCanvas.instanceServiceContainer.selectionService.selectedElements) {
|
|
172
178
|
if (designItem !== this.extendedItem) {
|
|
173
|
-
designItem.element.style.width = this._initialSizes[i].width +
|
|
179
|
+
designItem.element.style.width = this._initialSizes[i].width + deltaX + 'px';
|
|
174
180
|
}
|
|
175
181
|
}
|
|
176
182
|
}
|
|
177
183
|
break;
|
|
178
184
|
case 'se-resize':
|
|
179
|
-
width = (this._initialSizes[i].width +
|
|
185
|
+
width = (this._initialSizes[i].width + deltaX);
|
|
180
186
|
this.extendedItem.element.style.width = width + 'px';
|
|
181
|
-
height = (this._initialSizes[i].height +
|
|
187
|
+
height = (this._initialSizes[i].height + deltaY);
|
|
182
188
|
this.extendedItem.element.style.height = height + 'px';
|
|
183
|
-
console.log(this.extendedItem.element.style.transformOrigin);
|
|
184
189
|
if (this.resizeAllSelected) {
|
|
185
190
|
i++;
|
|
186
191
|
for (const designItem of this.designerCanvas.instanceServiceContainer.selectionService.selectedElements) {
|
|
187
192
|
if (designItem !== this.extendedItem) {
|
|
188
|
-
designItem.element.style.width = this._initialSizes[i].width +
|
|
189
|
-
designItem.element.style.height = this._initialSizes[i].height +
|
|
193
|
+
designItem.element.style.width = this._initialSizes[i].width + deltaX + 'px';
|
|
194
|
+
designItem.element.style.height = this._initialSizes[i].height + deltaY + 'px';
|
|
190
195
|
}
|
|
191
196
|
}
|
|
192
197
|
}
|
|
193
198
|
break;
|
|
194
199
|
case 's-resize':
|
|
195
|
-
height = (this._initialSizes[i].height +
|
|
200
|
+
height = (this._initialSizes[i].height + deltaY);
|
|
196
201
|
this.extendedItem.element.style.height = height + 'px';
|
|
197
202
|
if (this.resizeAllSelected) {
|
|
198
203
|
i++;
|
|
199
204
|
for (const designItem of this.designerCanvas.instanceServiceContainer.selectionService.selectedElements) {
|
|
200
205
|
if (designItem !== this.extendedItem) {
|
|
201
|
-
designItem.element.style.height = this._initialSizes[i].height +
|
|
206
|
+
designItem.element.style.height = this._initialSizes[i].height + deltaY + 'px';
|
|
202
207
|
}
|
|
203
208
|
}
|
|
204
209
|
}
|
|
205
210
|
break;
|
|
206
211
|
case 'sw-resize':
|
|
207
|
-
width = (this._initialSizes[i].width -
|
|
212
|
+
width = (this._initialSizes[i].width - deltaX);
|
|
208
213
|
this.extendedItem.element.style.width = width + 'px';
|
|
209
|
-
height = (this._initialSizes[i].height +
|
|
214
|
+
height = (this._initialSizes[i].height + deltaY);
|
|
210
215
|
this.extendedItem.element.style.height = height + 'px';
|
|
211
216
|
if (this.resizeAllSelected) {
|
|
212
217
|
i++;
|
|
213
218
|
for (const designItem of this.designerCanvas.instanceServiceContainer.selectionService.selectedElements) {
|
|
214
219
|
if (designItem !== this.extendedItem) {
|
|
215
|
-
designItem.element.style.width = this._initialSizes[i].width +
|
|
216
|
-
designItem.element.style.height = this._initialSizes[i].height +
|
|
220
|
+
designItem.element.style.width = this._initialSizes[i].width + deltaX + 'px';
|
|
221
|
+
designItem.element.style.height = this._initialSizes[i].height + deltaY + 'px';
|
|
217
222
|
}
|
|
218
223
|
}
|
|
219
224
|
}
|
|
220
225
|
break;
|
|
221
226
|
case 'w-resize':
|
|
222
|
-
width = (this._initialSizes[i].width -
|
|
227
|
+
width = (this._initialSizes[i].width - deltaX);
|
|
223
228
|
this.extendedItem.element.style.width = width + 'px';
|
|
224
229
|
if (this.resizeAllSelected) {
|
|
225
230
|
i++;
|
|
226
231
|
for (const designItem of this.designerCanvas.instanceServiceContainer.selectionService.selectedElements) {
|
|
227
232
|
if (designItem !== this.extendedItem) {
|
|
228
|
-
designItem.element.style.width = this._initialSizes[i].width +
|
|
233
|
+
designItem.element.style.width = this._initialSizes[i].width + deltaX + 'px';
|
|
229
234
|
}
|
|
230
235
|
}
|
|
231
236
|
}
|
|
232
237
|
break;
|
|
233
238
|
case 'nw-resize':
|
|
234
|
-
width = (this._initialSizes[i].width -
|
|
239
|
+
width = (this._initialSizes[i].width - deltaX);
|
|
235
240
|
this.extendedItem.element.style.width = width + 'px';
|
|
236
|
-
height = (this._initialSizes[i].height -
|
|
241
|
+
height = (this._initialSizes[i].height - deltaY);
|
|
237
242
|
this.extendedItem.element.style.height = height + 'px';
|
|
238
243
|
if (this.resizeAllSelected) {
|
|
239
244
|
i++;
|
|
240
245
|
for (const designItem of this.designerCanvas.instanceServiceContainer.selectionService.selectedElements) {
|
|
241
246
|
if (designItem !== this.extendedItem) {
|
|
242
|
-
designItem.element.style.width = this._initialSizes[i].width +
|
|
243
|
-
designItem.element.style.height = this._initialSizes[i].height +
|
|
247
|
+
designItem.element.style.width = this._initialSizes[i].width + deltaX + 'px';
|
|
248
|
+
designItem.element.style.height = this._initialSizes[i].height + deltaY + 'px';
|
|
244
249
|
}
|
|
245
250
|
}
|
|
246
251
|
}
|
|
247
252
|
break;
|
|
248
253
|
case 'n-resize':
|
|
249
|
-
height = (this._initialSizes[i].height -
|
|
254
|
+
height = (this._initialSizes[i].height - deltaY);
|
|
250
255
|
this.extendedItem.element.style.height = height + 'px';
|
|
251
256
|
if (this.resizeAllSelected) {
|
|
252
257
|
i++;
|
|
253
258
|
for (const designItem of this.designerCanvas.instanceServiceContainer.selectionService.selectedElements) {
|
|
254
259
|
if (designItem !== this.extendedItem) {
|
|
255
|
-
designItem.element.style.height = this._initialSizes[i].height +
|
|
260
|
+
designItem.element.style.height = this._initialSizes[i].height + deltaY + 'px';
|
|
256
261
|
}
|
|
257
262
|
}
|
|
258
263
|
}
|
|
259
264
|
break;
|
|
260
265
|
case 'ne-resize':
|
|
261
|
-
width = (this._initialSizes[i].width +
|
|
266
|
+
width = (this._initialSizes[i].width + deltaX);
|
|
262
267
|
this.extendedItem.element.style.width = width + 'px';
|
|
263
|
-
height = (this._initialSizes[i].height -
|
|
268
|
+
height = (this._initialSizes[i].height - deltaY);
|
|
264
269
|
this.extendedItem.element.style.height = height + 'px';
|
|
265
270
|
if (this.resizeAllSelected) {
|
|
266
271
|
i++;
|
|
267
272
|
for (const designItem of this.designerCanvas.instanceServiceContainer.selectionService.selectedElements) {
|
|
268
273
|
if (designItem !== this.extendedItem) {
|
|
269
|
-
designItem.element.style.width = this._initialSizes[i].width +
|
|
270
|
-
designItem.element.style.height = this._initialSizes[i].height +
|
|
274
|
+
designItem.element.style.width = this._initialSizes[i].width + deltaX + 'px';
|
|
275
|
+
designItem.element.style.height = this._initialSizes[i].height + deltaY + 'px';
|
|
271
276
|
}
|
|
272
277
|
}
|
|
273
278
|
}
|
|
@@ -293,7 +298,7 @@ export class ResizeExtension extends AbstractExtension {
|
|
|
293
298
|
let matrix = new DOMMatrix(getComputedStyle(this.extendedItem.element).transform);
|
|
294
299
|
let deltaX = 0;
|
|
295
300
|
let deltaY = 0;
|
|
296
|
-
let p1transformed = p1
|
|
301
|
+
let p1transformed = transformPointByInverseMatrix(p1, matrix);
|
|
297
302
|
let p2Abs = new DOMPoint(p3Abs.x + p1transformed.x, p3Abs.y - p1transformed.y);
|
|
298
303
|
let p1p2 = new DOMPoint(p2Abs.x - p1Abs.x, -(p2Abs.y - p1Abs.y));
|
|
299
304
|
let p1p2transformed = p1p2.matrixTransform(matrix);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropertyGridPropertyList } from './PropertyGridPropertyList';
|
|
2
2
|
import { DesignerTabControl } from '../../controls/DesignerTabControl';
|
|
3
3
|
import { BaseCustomWebComponentLazyAppend, css } from '@node-projects/base-custom-webcomponent';
|
|
4
|
+
import { RefreshMode } from '../../services/propertiesService/IPropertiesService';
|
|
4
5
|
export class PropertyGrid extends BaseCustomWebComponentLazyAppend {
|
|
5
6
|
_serviceContainer;
|
|
6
7
|
_designerTabControl;
|
|
@@ -35,6 +36,10 @@ export class PropertyGrid extends BaseCustomWebComponentLazyAppend {
|
|
|
35
36
|
});
|
|
36
37
|
this._itemsObserver = new MutationObserver((m) => {
|
|
37
38
|
for (const a of this._propertyGridPropertyLists) {
|
|
39
|
+
if (a.propertiesService.getRefreshMode(this._selectedItems[0]) == RefreshMode.fullOnValueChange) {
|
|
40
|
+
a.createElements(this._selectedItems[0]);
|
|
41
|
+
a.designItemsChanged(this._selectedItems);
|
|
42
|
+
}
|
|
38
43
|
a.refreshForDesignItems(this._selectedItems);
|
|
39
44
|
}
|
|
40
45
|
});
|
|
@@ -9,6 +9,7 @@ export declare class PropertyGridPropertyList extends BaseCustomWebComponentLazy
|
|
|
9
9
|
private _serviceContainer;
|
|
10
10
|
private _propertiesService;
|
|
11
11
|
private _designItems;
|
|
12
|
+
get propertiesService(): IPropertiesService;
|
|
12
13
|
static get style(): CSSStyleSheet;
|
|
13
14
|
constructor(serviceContainer: ServiceContainer);
|
|
14
15
|
setPropertiesService(propertiesService: IPropertiesService): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css, DomHelper } from '@node-projects/base-custom-webcomponent';
|
|
2
|
+
import { RefreshMode } from '../../services/propertiesService/IPropertiesService';
|
|
2
3
|
import { ValueType } from '../../services/propertiesService/ValueType';
|
|
3
4
|
import { ContextMenu } from '../../helper/contextMenu/ContextMenu';
|
|
4
5
|
import { PropertyType } from '../../services/propertiesService/PropertyType';
|
|
@@ -8,6 +9,9 @@ export class PropertyGridPropertyList extends BaseCustomWebComponentLazyAppend {
|
|
|
8
9
|
_serviceContainer;
|
|
9
10
|
_propertiesService;
|
|
10
11
|
_designItems;
|
|
12
|
+
get propertiesService() {
|
|
13
|
+
return this._propertiesService;
|
|
14
|
+
}
|
|
11
15
|
static get style() {
|
|
12
16
|
return css `
|
|
13
17
|
:host{
|
|
@@ -93,7 +97,7 @@ export class PropertyGridPropertyList extends BaseCustomWebComponentLazyAppend {
|
|
|
93
97
|
}
|
|
94
98
|
}
|
|
95
99
|
createElements(designItem) {
|
|
96
|
-
if (this._propertiesService && (this._propertiesService.
|
|
100
|
+
if (this._propertiesService && (this._propertiesService.getRefreshMode(designItem) != RefreshMode.none) || this._propertyMap.size == 0) {
|
|
97
101
|
DomHelper.removeAllChildnodes(this._div);
|
|
98
102
|
this._propertyMap.clear();
|
|
99
103
|
if (this._propertiesService) {
|