@social-mail/social-mail-client 1.8.439 → 1.8.440
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.
- package/dist/site-editor/editor/ui/SelectionUI.d.ts.map +1 -1
- package/dist/site-editor/editor/ui/SelectionUI.js +5 -1
- package/dist/site-editor/editor/ui/SelectionUI.js.map +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.js +5 -1
- package/dist/site-editor-app/SiteEditorApp.pack.js.map +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.min.js +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.min.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/site-editor/editor/ui/SelectionUI.tsx +7 -1
package/package.json
CHANGED
|
@@ -217,12 +217,18 @@ const setCapture = (direction: string, editor: HtmlPageEditor, element: HTMLElem
|
|
|
217
217
|
let sx = e.clientX;
|
|
218
218
|
let sy = e.clientY;
|
|
219
219
|
|
|
220
|
+
const aspectRatio = element.offsetHeight / element.offsetWidth;
|
|
221
|
+
|
|
220
222
|
const captureMove = (evt: PointerEvent) => {
|
|
221
223
|
const dx = evt.clientX - sx;
|
|
222
|
-
|
|
224
|
+
let dy = evt.clientY - sy;
|
|
223
225
|
if (dx === 0 && dy === 0) {
|
|
224
226
|
return;
|
|
225
227
|
}
|
|
228
|
+
if(evt.shiftKey || evt.ctrlKey) {
|
|
229
|
+
// fix aspect ratio...
|
|
230
|
+
dy = dx * aspectRatio;
|
|
231
|
+
}
|
|
226
232
|
sx = evt.clientX;
|
|
227
233
|
sy = evt.clientY;
|
|
228
234
|
sc.move({ dx, dy, fx});
|