diff --git a/Nibriboard/ClientFiles/Interface.js b/Nibriboard/ClientFiles/Interface.js index 8e6f845..261c021 100644 --- a/Nibriboard/ClientFiles/Interface.js +++ b/Nibriboard/ClientFiles/Interface.js @@ -36,7 +36,7 @@ class Interface extends EventEmitter toolSelectors[i].addEventListener("touchend", this.handleSelectTool.bind(this)); this.boardWindow.keyboard.on(`keyup-${i + 1}`, (function(toolId, event) { this.handleSelectTool({ - target: this.sidebar.querySelector(`.tools .tool-selector:nth-child(${toolId})`) + currentTarget: this.sidebar.querySelector(`.tools .tool-selector:nth-child(${toolId})`) }); }).bind(this, i + 1)); } @@ -80,7 +80,7 @@ class Interface extends EventEmitter { let oldTool = this.currentToolElement.dataset.toolName; delete this.currentToolElement.dataset.selected; - this.currentToolElement = event.target; + this.currentToolElement = event.currentTarget; this.currentToolElement.dataset.selected = "yes"; this.currentTool = this.currentToolElement.dataset.toolName; console.info("Selected tool", this.currentTool); diff --git a/Nibriboard/ClientFiles/Nibri.css b/Nibriboard/ClientFiles/Nibri.css index dca895e..09176f5 100644 --- a/Nibriboard/ClientFiles/Nibri.css +++ b/Nibriboard/ClientFiles/Nibri.css @@ -106,6 +106,7 @@ hr { border: 0.2em dashed hsl(219, 87%, 54%); } +.tool-selector > img { max-width: 1.25em; } .palette-colour {