Drawing after changing mode

This commit is contained in:
Nathan Kunicki 2017-11-26 17:59:43 +00:00
parent eb6f502d96
commit 0c6352e276

View File

@ -143,17 +143,20 @@ class BittMappEditor {
public pencilMode () { public pencilMode () {
this._selection = new Uint8Array((this._width / 8) * this._height); this._selection = new Uint8Array((this._width / 8) * this._height);
this._editorMode = Mode.PENCIL; this._editorMode = Mode.PENCIL;
this._redraw();
} }
public eraserMode () { public eraserMode () {
this._selection = new Uint8Array((this._width / 8) * this._height); this._selection = new Uint8Array((this._width / 8) * this._height);
this._editorMode = Mode.ERASER; this._editorMode = Mode.ERASER;
this._redraw();
} }
public selectionMode () { public selectionMode () {
this._editorMode = Mode.SELECTION; this._editorMode = Mode.SELECTION;
this._redraw();
} }