|
@@ -56,7 +56,7 @@ import {
|
|
|
getAddTLItemTimeByTime,
|
|
|
} from "@/components/drawing-time-line/check";
|
|
|
import { Dialog, Message } from "bill/expose-common";
|
|
|
-import { mergeFuns, uuid } from "@/components/drawing/hook";
|
|
|
+import { listener, mergeFuns, uuid } from "@/components/drawing/hook";
|
|
|
import { title } from "./type";
|
|
|
import {
|
|
|
amMap,
|
|
@@ -328,26 +328,35 @@ const deleteAm = (am: AnimationModel) => {
|
|
|
|
|
|
let unMount: () => void;
|
|
|
onUnmounted(
|
|
|
- clickListener(
|
|
|
- document.querySelector("#layout-app .scene-canvas") as HTMLDivElement,
|
|
|
- (pixel) => {
|
|
|
- const pos = sdk.getPositionByScreen(pixel);
|
|
|
- if (!focusAM.value) return;
|
|
|
- unMount && unMount();
|
|
|
- setTimeout(() => {
|
|
|
- unMount = useRMenus(pixel, [
|
|
|
- {
|
|
|
- label: "移动到这里",
|
|
|
- icon: "move",
|
|
|
- handler() {
|
|
|
- amMap[getAMKey(focusAM.value!)]?.am?.moveModelTo(pixel, pos?.worldPos);
|
|
|
+ mergeFuns([
|
|
|
+ // listener(
|
|
|
+ // document.querySelector("#layout-app .scene-canvas") as HTMLDivElement,
|
|
|
+ // "contextmenu",
|
|
|
+ // (ev) => {
|
|
|
+ // ev.preventDefault();
|
|
|
+ // }
|
|
|
+ // ),
|
|
|
+ clickListener(
|
|
|
+ document.querySelector("#layout-app .scene-canvas") as HTMLDivElement,
|
|
|
+ (pixel) => {
|
|
|
+ const pos = sdk.getPositionByScreen(pixel);
|
|
|
+ if (!focusAM.value) return;
|
|
|
+ unMount && unMount();
|
|
|
+ setTimeout(() => {
|
|
|
+ unMount = useRMenus(pixel, [
|
|
|
+ {
|
|
|
+ label: "移动到这里",
|
|
|
+ icon: "move",
|
|
|
+ handler() {
|
|
|
+ amMap[getAMKey(focusAM.value!)]?.am?.moveModelTo(pixel, pos?.worldPos);
|
|
|
+ },
|
|
|
},
|
|
|
- },
|
|
|
- ]);
|
|
|
- });
|
|
|
- },
|
|
|
- 2
|
|
|
- )
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ 2
|
|
|
+ ),
|
|
|
+ ])
|
|
|
);
|
|
|
frameAction.value = "translate";
|
|
|
</script>
|