允许9点校正7-9点为负数

This commit is contained in:
shefengchun 2023-02-03 13:49:06 +08:00
parent 13d71b2a6b
commit 17b91ca8ee
2 changed files with 24 additions and 11 deletions

View File

@ -387,7 +387,7 @@ export default defineComponent({
array[1].isshow, array[1].isshow,
Number(array[1].value) Number(array[1].value)
); );
if (auto_sync.value) left_right_auto_add(newVal - oldVal); if (auto_sync.value) left_right_auto_add(newVal);
save_set_cache(); save_set_cache();
}, },
{ deep: true } { deep: true }
@ -403,7 +403,7 @@ export default defineComponent({
array[2].isshow, array[2].isshow,
Number(array[2].value) Number(array[2].value)
); );
if (auto_sync.value) left_right_auto_add(newVal - oldVal); if (auto_sync.value) left_right_auto_add(newVal);
save_set_cache(); save_set_cache();
}, },
{ deep: true } { deep: true }
@ -451,7 +451,7 @@ export default defineComponent({
array[1].isshow, array[1].isshow,
Number(array[1].value) Number(array[1].value)
); );
if (auto_sync.value) left_right_auto_add(0); if (auto_sync.value) left_right_auto_add(-1);
save_set_cache(); save_set_cache();
}, },
{ deep: true } { deep: true }
@ -467,7 +467,7 @@ export default defineComponent({
array[2].isshow, array[2].isshow,
Number(array[2].value) Number(array[2].value)
); );
if (auto_sync.value) left_right_auto_add(0); if (auto_sync.value) left_right_auto_add(-1);
save_set_cache(); save_set_cache();
}, },
{ deep: true } { deep: true }
@ -527,8 +527,13 @@ export default defineComponent({
set_cache_tmp = tmp set_cache_tmp = tmp
} }
if (ste_status.value == 0) { if (ste_status.value == 0) {
set_cache_tmp[1].value = Number(set_cache_tmp[1].value) + difference //set_cache_tmp[1].value = Number(set_cache_tmp[1].value) + difference
if(difference==-1){
set_cache_tmp[1].isshow = array[2].isshow set_cache_tmp[1].isshow = array[2].isshow
}else{
set_cache_tmp[1].value = difference
}
set?.SetBlendingOverlap(0, 1, 0, set_cache_tmp[1].isshow, Number(set_cache_tmp[1].value)); set?.SetBlendingOverlap(0, 1, 0, set_cache_tmp[1].isshow, Number(set_cache_tmp[1].value));
set_cache.value[1] = JSON.stringify(set_cache_tmp); set_cache.value[1] = JSON.stringify(set_cache_tmp);
} }
@ -546,8 +551,13 @@ export default defineComponent({
set_cache_tmp = tmp set_cache_tmp = tmp
} }
if (ste_status.value == 0) { if (ste_status.value == 0) {
set_cache_tmp[2].value = Number(set_cache_tmp[2].value) + difference //set_cache_tmp[2].value = Number(set_cache_tmp[2].value) + difference
if(difference==-1){
set_cache_tmp[2].isshow = array[1].isshow set_cache_tmp[2].isshow = array[1].isshow
}else{
set_cache_tmp[2].value = difference
}
set?.SetBlendingOverlap(0, 0, 2, set_cache_tmp[2].isshow, Number(set_cache_tmp[2].value)); set?.SetBlendingOverlap(0, 0, 2, set_cache_tmp[2].isshow, Number(set_cache_tmp[2].value));
set_cache.value[0] = JSON.stringify(set_cache_tmp); set_cache.value[0] = JSON.stringify(set_cache_tmp);
} }

View File

@ -339,8 +339,9 @@ export default defineComponent({
let y = Math.abs( let y = Math.abs(
Math.ceil((data.top - ninepostion.value[6].y) * Proportion.value.y) Math.ceil((data.top - ninepostion.value[6].y) * Proportion.value.y)
); );
if(data.top>ninepostion.value[6].y)y= Math.ceil((ninepostion.value[6].y-data.top ) * Proportion.value.y)
nine[6].x = x > config.width ? config.width : x && x < 0 ? 0 : x; nine[6].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
nine[6].y = y > config.height ? config.height : y && y < 0 ? 0 : y; nine[6].y = y > config.height ? config.height : y;
save_set_cache(); save_set_cache();
}; };
const moveHandler_8 = (data: any) => { const moveHandler_8 = (data: any) => {
@ -350,8 +351,9 @@ export default defineComponent({
let y = Math.abs( let y = Math.abs(
Math.ceil((data.top - ninepostion.value[7].y) * Proportion.value.y) Math.ceil((data.top - ninepostion.value[7].y) * Proportion.value.y)
); );
if(data.top>ninepostion.value[7].y)y= Math.ceil((ninepostion.value[7].y-data.top ) * Proportion.value.y)
nine[7].x = x > config.width ? config.width : x && x < 0 ? 0 : x; nine[7].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
nine[7].y = y > config.height ? config.height : y && y < 0 ? 0 : y; nine[7].y = y > config.height ? config.height : y ;
save_set_cache(); save_set_cache();
}; };
const moveHandler_9 = (data: any) => { const moveHandler_9 = (data: any) => {
@ -361,8 +363,9 @@ export default defineComponent({
let y = Math.abs( let y = Math.abs(
Math.ceil((data.top - ninepostion.value[8].y) * Proportion.value.y) Math.ceil((data.top - ninepostion.value[8].y) * Proportion.value.y)
); );
if(data.top>ninepostion.value[8].y)y= Math.ceil((ninepostion.value[8].y-data.top ) * Proportion.value.y)
nine[8].x = x > config.width ? config.width : x && x < 0 ? 0 : x; nine[8].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
nine[8].y = y > config.height ? config.height : y && y < 0 ? 0 : y; nine[8].y = y > config.height ? config.height : y ;
save_set_cache(); save_set_cache();
}; };