diff --git a/src/css/tools.css b/src/css/tools.css index 3b0dbcf2..6f38e313 100644 --- a/src/css/tools.css +++ b/src/css/tools.css @@ -130,7 +130,7 @@ } .tool-rectangle-select .drawing-canvas-container:hover { - cursor: url(../img/icons/select.png) 15 15, pointer; + cursor: crosshair; } .tool-shape-select .drawing-canvas-container:hover { diff --git a/src/js/drawingtools/Eraser.js b/src/js/drawingtools/Eraser.js index 57570fe9..27e169c7 100644 --- a/src/js/drawingtools/Eraser.js +++ b/src/js/drawingtools/Eraser.js @@ -8,6 +8,7 @@ var ns = $.namespace("pskl.drawingtools"); ns.Eraser = function() { + this.superclass.constructor.call(this); this.toolId = "tool-eraser"; this.helpText = "Eraser tool"; }; diff --git a/src/js/drawingtools/selectiontools/BaseSelect.js b/src/js/drawingtools/selectiontools/BaseSelect.js index 78cae0a3..896fac11 100644 --- a/src/js/drawingtools/selectiontools/BaseSelect.js +++ b/src/js/drawingtools/selectiontools/BaseSelect.js @@ -13,6 +13,8 @@ // Select's first point coordinates (set in applyToolAt) this.startCol = null; this.startRow = null; + + this.selection = null; }; pskl.utils.inherit(ns.BaseSelect, ns.BaseTool); @@ -50,8 +52,7 @@ ns.BaseSelect.prototype.moveToolAt = function(col, row, color, frame, overlay, event) { if(this.mode == "select") { this.onSelect_(col, row, color, frame, overlay); - } - else if(this.mode == "moveSelection") { + } else if(this.mode == "moveSelection") { this.onSelectionDrag_(col, row, color, frame, overlay); } }; @@ -95,31 +96,13 @@ * For each pixel in the selection draw it in white transparent on the tool overlay * @protected */ - ns.BaseSelect.prototype.drawSelectionOnOverlay_ = function (selection, overlay) { - var pixels = selection.pixels; + ns.BaseSelect.prototype.drawSelectionOnOverlay_ = function (overlay) { + var pixels = this.selection.pixels; for(var i=0, l=pixels.length; i