修复双击无效的BUG
This commit is contained in:
parent
a07f7e29b7
commit
250a5fa448
|
@ -282,6 +282,7 @@ export default defineComponent({
|
|||
let focused = ref(false);
|
||||
let can_move = ref(true);
|
||||
let can_resize = ref(true);
|
||||
let move_flag = false;
|
||||
|
||||
const onUnSelectAllWindows = () => {
|
||||
selected.value = false;
|
||||
|
@ -331,6 +332,7 @@ export default defineComponent({
|
|||
mouse_down_flag = false;
|
||||
mouse_last_pos_x = 0;
|
||||
mouse_last_pos_y = 0;
|
||||
move_flag = false;
|
||||
};
|
||||
|
||||
const flags = new _Flags();
|
||||
|
@ -373,6 +375,7 @@ export default defineComponent({
|
|||
|
||||
mouse_last_pos_x = evt.x;
|
||||
mouse_last_pos_y = evt.y;
|
||||
move_flag = true;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -411,22 +414,27 @@ export default defineComponent({
|
|||
|
||||
mouse_last_pos_x = evt.x;
|
||||
mouse_last_pos_y = evt.y;
|
||||
move_flag = true;
|
||||
}
|
||||
},
|
||||
|
||||
cleanMouseDownFlag,
|
||||
onMouseLeave(evt: MouseEvent) {
|
||||
if (selected.value && mouse_down_flag) {
|
||||
cleanMouseDownFlag();
|
||||
if (move_flag) {
|
||||
emit("commit_geometry", props.window);
|
||||
}
|
||||
cleanMouseDownFlag();
|
||||
}
|
||||
},
|
||||
|
||||
onMouseUp(evt: MouseEvent) {
|
||||
if (selected.value && mouse_down_flag) {
|
||||
cleanMouseDownFlag();
|
||||
if (move_flag) {
|
||||
emit("commit_geometry", props.window);
|
||||
}
|
||||
cleanMouseDownFlag();
|
||||
}
|
||||
|
||||
if (!focused) {
|
||||
emit("window_fouse_in", props.window.window_id);
|
||||
|
|
Loading…
Reference in New Issue