@node-projects/web-component-designer 0.1.83 → 0.1.84
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.
|
@@ -97,8 +97,8 @@ export class DefaultPlacementService {
|
|
|
97
97
|
}
|
|
98
98
|
let filteredItems = filterChildPlaceItems(items);
|
|
99
99
|
for (const designItem of filteredItems) {
|
|
100
|
-
const canvas = designItem.element
|
|
101
|
-
let originalElementAndAllAncestorsMultipliedMatrix = getResultingTransformationBetweenElementAndAllAncestors(designItem.element
|
|
100
|
+
const canvas = designItem.instanceServiceContainer.designerCanvas.rootDesignItem.element;
|
|
101
|
+
let originalElementAndAllAncestorsMultipliedMatrix = getResultingTransformationBetweenElementAndAllAncestors(designItem.parent.element, canvas, true);
|
|
102
102
|
let transformMatrixParentTransformsCompensated = null;
|
|
103
103
|
if (originalElementAndAllAncestorsMultipliedMatrix) {
|
|
104
104
|
transformMatrixParentTransformsCompensated = new DOMPoint(track.x, track.y, 0, 0).matrixTransform(originalElementAndAllAncestorsMultipliedMatrix.inverse());
|
|
@@ -12,8 +12,13 @@ export class SnaplinesProviderService {
|
|
|
12
12
|
const positionsMiddleH = [];
|
|
13
13
|
const positionsV = [];
|
|
14
14
|
const positionsMiddleV = [];
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const tw = document.createTreeWalker(containerItem.isRootItem ? containerItem.element.shadowRoot : containerItem.element, NodeFilter.SHOW_ELEMENT);
|
|
16
|
+
let n = tw.nextNode();
|
|
17
|
+
while (n != null) {
|
|
18
|
+
if (ignMap.has(n)) {
|
|
19
|
+
n = tw.nextSibling();
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
17
22
|
const p = n.getBoundingClientRect();
|
|
18
23
|
const pLeft = (p.x - outerRect.x) / canvas.scaleFactor;
|
|
19
24
|
const pMidH = (p.x - outerRect.x + p.width / 2) / canvas.scaleFactor;
|
|
@@ -36,6 +41,7 @@ export class SnaplinesProviderService {
|
|
|
36
41
|
positionsV.push([pBottom, transformedP]);
|
|
37
42
|
if (provideWithDist)
|
|
38
43
|
positionsV.push([pBottom + provideWithDistDist, transformedP]);
|
|
44
|
+
n = tw.nextNode();
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
47
|
positionsH.push([0, { x: 0, y: 0, width: 0, height: 0 }]);
|
|
@@ -749,13 +749,6 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
749
749
|
_lastDdElement = null;
|
|
750
750
|
_onDragOver(event) {
|
|
751
751
|
event.preventDefault();
|
|
752
|
-
/*if (this.alignOnSnap) {
|
|
753
|
-
this.snapLines.calculateSnaplines(this.instanceServiceContainer.selectionService.selectedElements);
|
|
754
|
-
//TODO: fix this following code...
|
|
755
|
-
const currentPoint = this.getDesignerMousepoint(event);
|
|
756
|
-
let containerService = this.serviceContainer.getLastServiceWhere('containerService', x => x.serviceForContainer(this.rootDesignItem))
|
|
757
|
-
containerService.finishPlace(this, this.rootDesignItem, this._initialPoint, currentPoint, this.instanceServiceContainer.selectionService.selectedElements);
|
|
758
|
-
}*/
|
|
759
752
|
this.fillCalculationrects();
|
|
760
753
|
if (event.dataTransfer.types.length > 0 && event.dataTransfer.types[0] == 'Files') {
|
|
761
754
|
const ddService = this.serviceContainer.externalDragDropService;
|