@node-projects/web-component-designer 0.0.29 → 0.0.30
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.
|
@@ -199,8 +199,12 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
199
199
|
this.snapLines = new Snaplines(this.overlayLayer);
|
|
200
200
|
this.snapLines.initialize(this.rootDesignItem);
|
|
201
201
|
if (this.children) {
|
|
202
|
+
let children = this.children;
|
|
203
|
+
if (this.children.length == 1 && this.children[0] instanceof HTMLSlotElement) {
|
|
204
|
+
children = this.children[0].assignedElements();
|
|
205
|
+
}
|
|
202
206
|
const parser = this.serviceContainer.getLastServiceWhere('htmlParserService', x => x.constructor == DefaultHtmlParserService);
|
|
203
|
-
this.addDesignItems(parser.createDesignItems(
|
|
207
|
+
this.addDesignItems(parser.createDesignItems(children, this.serviceContainer, this.instanceServiceContainer));
|
|
204
208
|
}
|
|
205
209
|
}
|
|
206
210
|
elementFromPoint(x, y) {
|
|
@@ -8,6 +8,7 @@ export class DesignerView extends BaseCustomWebComponentConstructorAppend {
|
|
|
8
8
|
const outer = this._getDomElement('outer');
|
|
9
9
|
this._designerCanvas = new DesignerCanvas();
|
|
10
10
|
this._designerCanvas.id = "canvas";
|
|
11
|
+
this._designerCanvas.appendChild(document.createElement("slot"));
|
|
11
12
|
outer.insertAdjacentElement('afterbegin', this._designerCanvas);
|
|
12
13
|
this._zoomInput = this._getDomElement('zoomInput');
|
|
13
14
|
this._zoomInput.onchange = () => { this._designerCanvas.zoomFactor = parseFloat(this._zoomInput.value) / 100; };
|