|
@@ -1,6 +1,6 @@
|
|
|
import { Row, showToast, showConfirmDialog } from "vant";
|
|
|
import { defineComponent, onMounted, onUnmounted, reactive, nextTick, ref } from "vue";
|
|
|
-import state from "/src/state";
|
|
|
+import state, { IPlatform } from "/src/state";
|
|
|
import request from "/src/utils/request";
|
|
|
import { getQuery } from "/src/utils/queryString";
|
|
|
import styles from "./index.module.less";
|
|
@@ -363,7 +363,11 @@ async function setModelPostion(item: any, x: number, y: number, repeatEdit?: boo
|
|
|
const original = document.getElementById(item.id)?.getBoundingClientRect() || { x: 0, y: 0 };
|
|
|
tsX = targetX - original.x;
|
|
|
tsY = targetY - original.y;
|
|
|
- // console.log('距离',tsX,tsY,x,y)
|
|
|
+ // console.log('距离',tsX,tsY,x,y,moveData.zoom)
|
|
|
+ if (state.platform === IPlatform.PC) {
|
|
|
+ tsX = tsX / 1.5
|
|
|
+ tsY = tsY / 1.8
|
|
|
+ }
|
|
|
g && g.setAttribute("transform", `translate(${tsX / moveData.zoom}, ${tsY / moveData.zoom})`);
|
|
|
el && (el.style.transform = `translate(${tsX}px, ${tsY}px)`);
|
|
|
} else {
|