Close the panel with pressing Escape key
This commit is contained in:
parent
f8f2cd3e53
commit
cb3435a71b
|
@ -125,6 +125,11 @@ function hidePanel(e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Esc押下でパネルを閉じる
|
||||||
|
document.addEventListener('keydown', (e) => {
|
||||||
|
if (e.key == 'Escape') hidePanel(e);
|
||||||
|
})
|
||||||
|
|
||||||
//パネルがウィンドウ外にはみ出る時に位置を調整
|
//パネルがウィンドウ外にはみ出る時に位置を調整
|
||||||
function panelPosition(e) {
|
function panelPosition(e) {
|
||||||
var p = new Object();
|
var p = new Object();
|
||||||
|
|
Loading…
Reference in a new issue