@node-projects/web-component-designer 0.0.140 → 0.0.141
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/services/InstanceServiceContainer.d.ts +1 -0
- package/dist/elements/services/InstanceServiceContainer.js +1 -0
- package/dist/elements/widgets/designerView/designerCanvas.js +3 -1
- package/dist/elements/widgets/designerView/extensions/InvisibleDivExtension.js +1 -6
- package/dist/elements/widgets/propertyGrid/PropertyGridPropertyList.js +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ interface InstanceServiceNameMap {
|
|
|
12
12
|
export declare class InstanceServiceContainer extends BaseServiceContainer<InstanceServiceNameMap> {
|
|
13
13
|
designContext: IDesignContext;
|
|
14
14
|
readonly designerCanvas: IDesignerCanvas;
|
|
15
|
+
designer: any;
|
|
15
16
|
constructor(designerCanvas: IDesignerCanvas);
|
|
16
17
|
get undoService(): IUndoService;
|
|
17
18
|
get selectionService(): ISelectionService;
|
|
@@ -3,6 +3,7 @@ import { DesignContext } from '../widgets/designerView/DesignContext';
|
|
|
3
3
|
export class InstanceServiceContainer extends BaseServiceContainer {
|
|
4
4
|
designContext = new DesignContext();
|
|
5
5
|
designerCanvas;
|
|
6
|
+
designer; //usable to assign designer from outside
|
|
6
7
|
constructor(designerCanvas) {
|
|
7
8
|
super();
|
|
8
9
|
this.designerCanvas = designerCanvas;
|
|
@@ -465,8 +465,10 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
465
465
|
this._updateTransform();
|
|
466
466
|
this._fillCalculationrects();
|
|
467
467
|
this.onZoomFactorChanged.emit(this._zoomFactor);
|
|
468
|
-
if (refreshExtensions)
|
|
468
|
+
if (refreshExtensions) {
|
|
469
469
|
this.extensionManager.refreshAllAppliedExtentions();
|
|
470
|
+
setTimeout(() => this.extensionManager.refreshAllAppliedExtentions(), 200);
|
|
471
|
+
}
|
|
470
472
|
}
|
|
471
473
|
_updateTransform() {
|
|
472
474
|
this._scaleFactor = this._zoomFactor;
|
|
@@ -10,12 +10,7 @@ export class InvisibleDivExtension extends AbstractExtension {
|
|
|
10
10
|
}
|
|
11
11
|
refresh() {
|
|
12
12
|
const itemRect = this.designerCanvas.getNormalizedElementCoordinates(this.extendedItem.element);
|
|
13
|
-
|
|
14
|
-
const left = Number.parseFloat(computedStyle.marginLeft.replace('px', ''));
|
|
15
|
-
const top = Number.parseFloat(computedStyle.marginTop.replace('px', ''));
|
|
16
|
-
const right = Number.parseFloat(computedStyle.marginRight.replace('px', ''));
|
|
17
|
-
const bottom = Number.parseFloat(computedStyle.marginBottom.replace('px', ''));
|
|
18
|
-
this._rect = this._drawRect(itemRect.x - left, itemRect.y - top, left + itemRect.width + right, top + itemRect.height + bottom, 'svg-invisible-div', this._rect, OverlayLayer.Background);
|
|
13
|
+
this._rect = this._drawRect(itemRect.x, itemRect.y, itemRect.width, itemRect.height, 'svg-invisible-div', this._rect, OverlayLayer.Background);
|
|
19
14
|
}
|
|
20
15
|
dispose() {
|
|
21
16
|
this._removeAllOverlays();
|
|
@@ -93,7 +93,7 @@ export class PropertyGridPropertyList extends BaseCustomWebComponentLazyAppend {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
createElements(designItem) {
|
|
96
|
-
if (this._propertiesService.listNeedsRefresh(designItem) || this._propertyMap.size == 0) {
|
|
96
|
+
if (this._propertiesService && (this._propertiesService.listNeedsRefresh(designItem)) || this._propertyMap.size == 0) {
|
|
97
97
|
DomHelper.removeAllChildnodes(this._div);
|
|
98
98
|
this._propertyMap.clear();
|
|
99
99
|
if (this._propertiesService) {
|