Fixed rectangle tool bug

Switching tool from the rectangle caused the editor to freeze.
This commit is contained in:
unsettledgames
2020-07-21 14:42:25 +02:00
parent d1187b537b
commit 03ba3fe245
5 changed files with 15 additions and 36 deletions

View File

@ -16,6 +16,7 @@ on('click',"pencil-smaller-button", function(){
//eraser
on('click',"eraser-button", function(){
console.log("selecting eraser");
tool.eraser.switchTo();
}, false);
@ -31,7 +32,7 @@ on('click',"eraser-smaller-button", function(e){
}, false);
// rectangle
on('click','rectangle-button', function(){
on('click','rectangle-button', function(e){
// If the user clicks twice on the button, they change the draw mode
if (currentTool.name == 'rectangle') {
if (drawMode == 'empty') {