修复4点校正先拖动在使用键盘移动时位置不对

This commit is contained in:
shefengchun 2023-02-08 15:33:12 +08:00
parent c7eb71ee72
commit 063d9d8652
1 changed files with 9 additions and 0 deletions

View File

@ -528,6 +528,9 @@ export default defineComponent({
four[0].x = x > config.width ? config.width : x && x < 0 ? 0 : x; four[0].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
four[0].y = y > config.height ? config.height : y && y < 0 ? 0 : y; four[0].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
isactivearray.value[0] = true; isactivearray.value[0] = true;
points[now_index.value].x = data.left
points[now_index.value].y = data.top
save_set_cache(); save_set_cache();
}; };
const moveHandler_2 = (data: any) => { const moveHandler_2 = (data: any) => {
@ -539,6 +542,8 @@ export default defineComponent({
); );
four[1].x = x > config.width ? config.width : x && x < 0 ? 0 : x; four[1].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
four[1].y = y > config.height ? config.height : y && y < 0 ? 0 : y; four[1].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
points[now_index.value].x = data.left
points[now_index.value].y = data.top
save_set_cache(); save_set_cache();
}; };
const moveHandler_3 = (data: any) => { const moveHandler_3 = (data: any) => {
@ -550,6 +555,8 @@ export default defineComponent({
); );
four[2].x = x > config.width ? config.width : x && x < 0 ? 0 : x; four[2].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
four[2].y = y > config.height ? config.height : y && y < 0 ? 0 : y; four[2].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
points[now_index.value].x = data.left
points[now_index.value].y = data.top
save_set_cache(); save_set_cache();
}; };
const moveHandler_4 = (data: any) => { const moveHandler_4 = (data: any) => {
@ -561,6 +568,8 @@ export default defineComponent({
); );
four[3].x = x > config.width ? config.width : x && x < 0 ? 0 : x; four[3].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
four[3].y = y > config.height ? config.height : y && y < 0 ? 0 : y; four[3].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
points[now_index.value].x = data.left
points[now_index.value].y = data.top
save_set_cache(); save_set_cache();
}; };
// //