@node-projects/web-component-designer 0.1.72 → 0.1.73

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.
@@ -1,4 +1,3 @@
1
- import { DomHelper } from '@node-projects/base-custom-webcomponent';
2
1
  export const provideSnaplinesWithDistance = 'provideSnaplinesWithDistance';
3
2
  export const provideSnaplinesWithDistanceDistance = 'provideSnaplinesWithDistanceDistance';
4
3
  export class SnaplinesProviderService {
@@ -13,8 +12,7 @@ export class SnaplinesProviderService {
13
12
  const positionsMiddleH = [];
14
13
  const positionsV = [];
15
14
  const positionsMiddleV = [];
16
- let ignoreElements = ignoredItems.map(x => x.element);
17
- for (let n of DomHelper.getAllChildNodes(containerItem.element, false, ignoreElements)) {
15
+ for (let n of containerItem.querySelectorAll('*')) {
18
16
  if (!ignMap.has(n)) {
19
17
  const p = n.getBoundingClientRect();
20
18
  const pLeft = (p.x - outerRect.x) / canvas.scaleFactor;
@@ -439,7 +439,7 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
439
439
  let maxX = 0, maxY = 0, minX = 0, minY = 0;
440
440
  this.canvasOffset = { x: 0, y: 0 };
441
441
  this.zoomFactor = 1;
442
- for (let n of DomHelper.getAllChildNodes(this.rootDesignItem.element)) {
442
+ for (let n of this.rootDesignItem.querySelectorAll('*')) {
443
443
  if (n instanceof Element) {
444
444
  const rect = n.getBoundingClientRect();
445
445
  minX = minX < rect.x ? minX : rect.x;
@@ -314,7 +314,6 @@ export class DesignerView extends BaseCustomWebComponentConstructorAppend {
314
314
  this._toolbar.initialize(this.serviceContainer, this);
315
315
  }
316
316
  getHTML() {
317
- //this.instanceServiceContainer.selectionService.setSelectedElements(null);
318
317
  if (this._designerCanvas.rootDesignItem.childCount > 0) {
319
318
  return DomConverter.ConvertToString(Array.from(this._designerCanvas.rootDesignItem.children()), true, true);
320
319
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "A UI designer for Polymer apps",
3
3
  "name": "@node-projects/web-component-designer",
4
- "version": "0.1.72",
4
+ "version": "0.1.73",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "jochen.kuehner@gmx.de",