diff --git a/images/rectselect.png b/images/rectselect.png new file mode 100644 index 0000000..3ed7407 Binary files /dev/null and b/images/rectselect.png differ diff --git a/js/_hotkeyListener.js b/js/_hotkeyListener.js index 5ef277f..1142508 100644 --- a/js/_hotkeyListener.js +++ b/js/_hotkeyListener.js @@ -25,8 +25,8 @@ function KeyPress(e) { case 51: case 69: changeTool('eyedropper'); break; - //pan - 4, p, m - case 52: case 80: case 77: + //pan - 4, p, + case 52: case 80: changeTool('pan'); break; //zoom - 5 @@ -34,10 +34,14 @@ function KeyPress(e) { changeTool('zoom'); break; // eraser -6, r - case 54: case 82: + case 54: case 82: console.log("Pressed r"); changeTool('eraser'); break; + // Rectangular selection + case 77: case 109: + changeTool('rectselect'); + break; //Z case 90: console.log('PRESSED Z ', keyboardEvent.ctrlKey) diff --git a/js/_toolButtons.js b/js/_toolButtons.js index b96c953..3c48cbb 100644 --- a/js/_toolButtons.js +++ b/js/_toolButtons.js @@ -69,4 +69,9 @@ on('click',"zoom-out-button", function(){ for (let i=1; i + @@ -34,7 +36,9 @@ + +