Removed all Layer-related global variables

This commit is contained in:
unsettledgames
2021-07-23 16:25:15 +02:00
parent 7084988de4
commit e4415a5358
3 changed files with 39 additions and 31 deletions

View File

@ -47,11 +47,13 @@ const Input = (() => {
*/
function KeyPress(e) {
var keyboardEvent = window.event? event : e;
console.log("pressed key");
//if the user is typing in an input field or renaming a layer, ignore these hotkeys, unless it's an enter key
if (document.activeElement.tagName == 'INPUT' || isRenamingLayer) {
if (document.activeElement.tagName == 'INPUT' || LayerList.isRenamingLayer) {
if (e.keyCode == 13) {
currentLayer.closeOptionsMenu();
console.log("here");
LayerList.closeOptionsMenu();
}
return;
}