@node-projects/web-component-designer 0.0.54 → 0.0.55
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.
|
@@ -44,10 +44,9 @@ export function placeDesignItem(container, designItem, offset, mode) {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
if (!hasPositionedLayout)
|
|
47
|
-
designItem.
|
|
48
|
-
designItem.setStyle('
|
|
49
|
-
designItem.setStyle('
|
|
50
|
-
designItem.setStyle('top', (offset.y + oldTop + containerTop) + "px");
|
|
47
|
+
designItem.setStyle('position', 'absolute');
|
|
48
|
+
designItem.setStyle('left', (offset.x + (oldLeft ?? 0) + containerLeft) + "px");
|
|
49
|
+
designItem.setStyle('top', (offset.y + (oldTop ?? 0) + containerTop) + "px");
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
/*function placeViaPosition(container: IDesignItem, designItem: IDesignItem, offset: IPoint, mode: 'position' | 'transform' | 'margin' | 'padding') {
|
|
@@ -99,17 +99,8 @@ export class DefaultPlacementService {
|
|
|
99
99
|
finishPlace(event, placementView, container, startPoint, offsetInControl, newPoint, items) {
|
|
100
100
|
let track = this.calculateTrack(event, placementView, startPoint, offsetInControl, newPoint, items[0]);
|
|
101
101
|
for (const designItem of items) {
|
|
102
|
-
/*let movedElement = designItem.element;
|
|
103
|
-
let oldLeft = parseFloat((<HTMLElement>movedElement).style.left);
|
|
104
|
-
oldLeft = Number.isNaN(oldLeft) ? 0 : oldLeft;
|
|
105
|
-
let oldTop = parseFloat((<HTMLElement>movedElement).style.top);
|
|
106
|
-
oldTop = Number.isNaN(oldTop) ? 0 : oldTop;*/
|
|
107
|
-
//let oldPosition = movedElement.style.position;
|
|
108
102
|
designItem.element.style.transform = designItem.styles.get('transform') ?? '';
|
|
109
103
|
placeDesignItem(container, designItem, track, 'position');
|
|
110
|
-
/*designItem.setStyle('position', 'absolute');
|
|
111
|
-
designItem.setStyle('left', (track.x + oldLeft) + "px");
|
|
112
|
-
designItem.setStyle('top', (track.y + oldTop) + "px");*/
|
|
113
104
|
}
|
|
114
105
|
}
|
|
115
106
|
}
|