|
|
@ -335,39 +335,48 @@ document.onkeydown = function (e) {
|
|
|
|
if (!select_svg.id) {
|
|
|
|
if (!select_svg.id) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
if (!e.ctrlKey && e.key == 'ArrowUp') {
|
|
|
|
if (!e.ctrlKey && e.key == 'ArrowUp') {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
moveUp(svgLists, select_svg);
|
|
|
|
moveUp(svgLists, select_svg);
|
|
|
|
} else if (!e.ctrlKey && e.key == 'ArrowDown') {
|
|
|
|
} else if (!e.ctrlKey && e.key == 'ArrowDown') {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
moveDown(svgLists, select_svg);
|
|
|
|
moveDown(svgLists, select_svg);
|
|
|
|
} else if (!e.ctrlKey && e.key == 'ArrowLeft') {
|
|
|
|
} else if (!e.ctrlKey && e.key == 'ArrowLeft') {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
moveLeft(svgLists, select_svg);
|
|
|
|
moveLeft(svgLists, select_svg);
|
|
|
|
} else if (!e.ctrlKey && e.key == 'ArrowRight') {
|
|
|
|
} else if (!e.ctrlKey && e.key == 'ArrowRight') {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
moveRight(svgLists, select_svg);
|
|
|
|
moveRight(svgLists, select_svg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//ctrl c
|
|
|
|
//ctrl c
|
|
|
|
else if (e.ctrlKey && e.key.toLowerCase() == 'c') {
|
|
|
|
else if (e.ctrlKey && e.key.toLowerCase() == 'c') {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
hotkeyCopy(svgLists, select_svg);
|
|
|
|
hotkeyCopy(svgLists, select_svg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//deleted
|
|
|
|
//deleted
|
|
|
|
else if (e.key == 'Delete') {
|
|
|
|
else if (e.key == 'Delete') {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
hotkeyDel(svgLists, select_svg);
|
|
|
|
hotkeyDel(svgLists, select_svg);
|
|
|
|
rightnav_open.value = false;
|
|
|
|
rightnav_open.value = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//上移一层
|
|
|
|
//上移一层
|
|
|
|
else if (e.ctrlKey && e.key == 'ArrowUp') {
|
|
|
|
else if (e.ctrlKey && e.key == 'ArrowUp') {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
hotkeyPutOnUp(svgLists, select_svg);
|
|
|
|
hotkeyPutOnUp(svgLists, select_svg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//下移一层
|
|
|
|
//下移一层
|
|
|
|
else if (e.ctrlKey && e.key == 'ArrowDown') {
|
|
|
|
else if (e.ctrlKey && e.key == 'ArrowDown') {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
hotkeyPutOnDown(svgLists, select_svg);
|
|
|
|
hotkeyPutOnDown(svgLists, select_svg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//置于底层
|
|
|
|
//置于底层
|
|
|
|
else if (e.ctrlKey && e.key == 'ArrowLeft') {
|
|
|
|
else if (e.ctrlKey && e.key == 'ArrowLeft') {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
hotkeyPutOnButtom(svgLists, select_svg);
|
|
|
|
hotkeyPutOnButtom(svgLists, select_svg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//置于顶层
|
|
|
|
//置于顶层
|
|
|
|
else if (e.ctrlKey && e.key == 'ArrowRight') {
|
|
|
|
else if (e.ctrlKey && e.key == 'ArrowRight') {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
hotkeyPutOnTop(svgLists, select_svg);
|
|
|
|
hotkeyPutOnTop(svgLists, select_svg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|