魔墙:修复未选中元素键盘上下左右报错

This commit is contained in:
miao 2022-12-28 16:30:58 +08:00
parent c0b97255d3
commit 4f83a9b0e5
1 changed files with 4 additions and 5 deletions

View File

@ -9,18 +9,17 @@
if (!loading && evt.keyCode == 27) {
show_dialog = false;
}
if(evt.keyCode == 37){//
if(evt.keyCode == 37&&(current_index!=-1||multiple_select.length>1)){//
sub_x();
}
if(evt.keyCode==38){//
if(evt.keyCode==38&&(current_index!=-1||multiple_select.length>1)){//
sub_y();
}
if(evt.keyCode==39){//
if(evt.keyCode==39&&(current_index!=-1||multiple_select.length>1)){//
add_x();
}
if(evt.keyCode==40){//
if(evt.keyCode==40&&(current_index!=-1||multiple_select.length>1)){//
add_y();
}
if(evt.keyCode==17){//ctrl
multiple=true;