mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed rectangle tool bug
Switching tool from the rectangle caused the editor to freeze.
This commit is contained in:
@ -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') {
|
||||
|
Reference in New Issue
Block a user