mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Removing states in class members and using a SimplePen#draw method instead.
This commit is contained in:
@@ -22,11 +22,15 @@
|
||||
* @override
|
||||
*/
|
||||
ns.SimplePen.prototype.applyToolAt = function(col, row, frame, overlay, event) {
|
||||
var color = this.getToolColor();
|
||||
this.draw(color, col, row, frame, overlay);
|
||||
};
|
||||
|
||||
ns.SimplePen.prototype.draw = function(color, col, row, frame, overlay) {
|
||||
this.previousCol = col;
|
||||
this.previousRow = row;
|
||||
var color = this.getToolColor();
|
||||
overlay.setPixel(col, row, color);
|
||||
|
||||
overlay.setPixel(col, row, color);
|
||||
if (color === Constants.TRANSPARENT_COLOR) {
|
||||
frame.setPixel(col, row, color);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user