@social-mail/social-mail-client 1.8.438 → 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/HtmlPageEditor.d.ts +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.d.ts.map +1 -1
- package/dist/site-editor/editor/HtmlPageEditor.js +13 -3
- package/dist/site-editor/editor/HtmlPageEditor.js.map +1 -1
- 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 +18 -4
- 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/site-editor-app/pages/websites/studio/layers/StudioLayers.d.ts.map +1 -1
- package/dist/site-editor-app/pages/websites/studio/layers/StudioLayers.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/site-editor/editor/HtmlPageEditor.tsx +10 -1
- package/src/site-editor/editor/ui/SelectionUI.tsx +7 -1
- package/src/site-editor-app/pages/websites/studio/layers/StudioLayers.tsx +1 -0
package/package.json
CHANGED
|
@@ -62,6 +62,7 @@ import { IAppFile } from "../../model/model";
|
|
|
62
62
|
import { SelectionUI } from "./ui/SelectionUI";
|
|
63
63
|
import { desktopScreenWidth, mobileScreenWidth, tabletScreenWidth } from "./sizes";
|
|
64
64
|
import UIGuides from "./guides/UIGuides";
|
|
65
|
+
import PopupService from "@web-atoms/core/dist/web/services/PopupService";
|
|
65
66
|
|
|
66
67
|
const desktopWidth = desktopScreenWidth;
|
|
67
68
|
const tabletWidth = tabletScreenWidth;
|
|
@@ -613,6 +614,14 @@ export default class HtmlPageEditor extends AtomControl {
|
|
|
613
614
|
onEventTarget: document.body
|
|
614
615
|
})
|
|
615
616
|
async onToolSelected(item: IToolItem) {
|
|
617
|
+
|
|
618
|
+
const { selection } = this;
|
|
619
|
+
if (selection.element.tagName === "INJECT") {
|
|
620
|
+
return PopupService.alert({
|
|
621
|
+
message: "Cannot insert tool into injected component"
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
|
|
616
625
|
const t = await this.copyAssets(item);
|
|
617
626
|
const s = this.selectedTarget();
|
|
618
627
|
|
|
@@ -630,7 +639,7 @@ export default class HtmlPageEditor extends AtomControl {
|
|
|
630
639
|
const copy = root.firstElementChild as HTMLElement;
|
|
631
640
|
|
|
632
641
|
setTimeout(() => {
|
|
633
|
-
|
|
642
|
+
selection.update(copy);
|
|
634
643
|
}, 10);
|
|
635
644
|
|
|
636
645
|
if(/^(inject|footer)/i.test(s.lastElementChild?.tagName)) {
|
|
@@ -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});
|