@node-projects/web-component-designer 0.1.8 → 0.1.10

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.
@@ -2,6 +2,12 @@ export function switchContainer(items, newContainer, resizeNewContainer = false,
2
2
  //todo...
3
3
  //- switch to other containers? like grid, flexbox, ...
4
4
  //- position non absolute, or absolute from bottom or right
5
+ for (let i of items) {
6
+ if (i == newContainer || i.element.contains(newContainer.element)) {
7
+ console.warn('could not move items into of itself or a child');
8
+ return;
9
+ }
10
+ }
5
11
  const firstItem = items[0];
6
12
  const grp = firstItem.openGroup('switchContainerHelper');
7
13
  const designerCanvas = firstItem.instanceServiceContainer.designerCanvas;
@@ -16,7 +16,7 @@ export function getElementCombinedTransform(element) {
16
16
  m = m.multiply(new DOMMatrix('rotate(' + s.rotate + ')'));
17
17
  }
18
18
  if (s.scale != 'none') {
19
- m = m.multiply(new DOMMatrix('scale(' + s.rotate + ')'));
19
+ m = m.multiply(new DOMMatrix('scale(' + s.scale + ')'));
20
20
  }
21
21
  if (s.transform != 'none') {
22
22
  m = m.multiply(new DOMMatrix(s.transform));
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.8",
4
+ "version": "0.1.10",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "jochen.kuehner@gmx.de",
@@ -12,7 +12,7 @@
12
12
  "prepublishOnly": "npm run build"
13
13
  },
14
14
  "dependencies": {
15
- "@node-projects/base-custom-webcomponent": "^0.18.1"
15
+ "@node-projects/base-custom-webcomponent": "^0.19.0"
16
16
  },
17
17
  "devDependencies": {
18
18
  "mdn-data": "^2.1.0"