Close the panel with pressing Escape key

This commit is contained in:
sienori 2018-06-03 13:47:53 +09:00
parent f8f2cd3e53
commit cb3435a71b

View file

@ -125,6 +125,11 @@ function hidePanel(e) {
}
}
//Esc押下でパネルを閉じる
document.addEventListener('keydown', (e) => {
if (e.key == 'Escape') hidePanel(e);
})
//パネルがウィンドウ外にはみ出る時に位置を調整
function panelPosition(e) {
var p = new Object();