@node-projects/web-component-designer 0.0.230 → 0.0.231
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,7 @@ import { DomConverter } from '../../widgets/designerView/DomConverter.js';
|
|
|
2
2
|
import { combineTransforms, extractTranslationFromDOMMatrix, getResultingTransformationBetweenElementAndAllAncestors } from '../../helper/TransformHelper.js';
|
|
3
3
|
import { filterChildPlaceItems, placeDesignItem } from '../../helper/LayoutHelper.js';
|
|
4
4
|
import { ExtensionType } from '../../widgets/designerView/extensions/ExtensionType.js';
|
|
5
|
+
import { straightenLine } from '../../helper/PathDataPolyfill.js';
|
|
5
6
|
export class DefaultPlacementService {
|
|
6
7
|
serviceForContainer(container, containerStyle) {
|
|
7
8
|
if (containerStyle.display === 'grid' || containerStyle.display === 'inline-grid' ||
|
|
@@ -90,6 +91,9 @@ export class DefaultPlacementService {
|
|
|
90
91
|
//TODO:, this should revert all undo actions while active
|
|
91
92
|
//maybe a undo actions returns itself or an id so it could be changed?
|
|
92
93
|
let track = this.calculateTrack(event, placementView, startPoint, offsetInControl, newPoint, items[0]);
|
|
94
|
+
if (event.shiftKey) {
|
|
95
|
+
track = straightenLine({ x: 0, y: 0 }, track);
|
|
96
|
+
}
|
|
93
97
|
let filteredItems = filterChildPlaceItems(items);
|
|
94
98
|
for (const designItem of filteredItems) {
|
|
95
99
|
const canvas = designItem.element.closest('#node-projects-designer-canvas-canvas');
|