重置所有只发一条指令
This commit is contained in:
parent
3afdf5c3bc
commit
5f3f9fd074
|
@ -391,17 +391,17 @@ export default defineComponent({
|
|||
save_set_cache()
|
||||
}
|
||||
|
||||
const chang = (index: number, $event: any, type: string) => {
|
||||
const chang = (index: number, $event: any, type: string, send: boolean) => {
|
||||
$event = Number($event)
|
||||
if (type == 'v') {
|
||||
let tmp = coordinate_transformation_value_to_xy(0, $event)
|
||||
value_v_point.value[index].y = Math.trunc(tmp.y)
|
||||
send_value(index, type, Math.trunc(value_v.value[index].y))
|
||||
send_value(index, type, Math.trunc(value_v.value[index].y), send)
|
||||
}
|
||||
if (type == 'h') {
|
||||
let tmp = coordinate_transformation_value_to_xy($event, 0)
|
||||
value_h_point.value[index].x = Math.trunc(tmp.x)
|
||||
send_value(index, type, Math.trunc(value_h.value[index].x))
|
||||
send_value(index, type, Math.trunc(value_h.value[index].x), send)
|
||||
}
|
||||
save_set_cache()
|
||||
}
|
||||
|
@ -531,16 +531,17 @@ export default defineComponent({
|
|||
if (type == 'v') {
|
||||
value_v.value[index].x = value_v.value[index].def_x
|
||||
value_v.value[index].y = value_v.value[index].def_y
|
||||
chang(index, value_v.value[index].def_y, type)
|
||||
chang(index, value_v.value[index].def_y, type, send)
|
||||
}
|
||||
if (type == 'h') {
|
||||
value_h.value[index].x = value_h.value[index].def_x
|
||||
value_h.value[index].y = value_h.value[index].def_y
|
||||
chang(index, value_h.value[index].def_x, type)
|
||||
chang(index, value_h.value[index].def_x, type, send)
|
||||
}
|
||||
save_set_cache()
|
||||
}
|
||||
const send_value = (index: number, type: string, value: number) => {
|
||||
const send_value = (index: number, type: string, value: number, send: boolean = true) => {
|
||||
if (!send) return;
|
||||
let row = $store.getters.GetTheCurrentlySelectedCamera[0]
|
||||
let col = $store.getters.GetTheCurrentlySelectedCamera[1]
|
||||
if (type == 'v') {
|
||||
|
@ -554,19 +555,18 @@ export default defineComponent({
|
|||
switch (now_v_h.value) {
|
||||
case 'vertical':
|
||||
for (let index = 0; index < value_v_point_amount.value; index++) {
|
||||
reset(index, true, 'v')
|
||||
reset(index, false, 'v')
|
||||
}
|
||||
break;
|
||||
case 'level':
|
||||
for (let index = 0; index < value_h_point_amount.value; index++) {
|
||||
reset(index, true, 'h')
|
||||
reset(index, false, 'h')
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
send_value(-2, 'v', 0);
|
||||
}
|
||||
const del_dialog = ref(false)
|
||||
const add_control_points = (amount: number, type: string) => {
|
||||
|
|
Loading…
Reference in New Issue