Issue#145 : Hide highlighted pixel

+ BaseTool : added new method hideHighlightedPixel
+ DrawingController : mousemove event plugged on mousenter
  and unplugged on mouseleave
+ DrawingController : tool.hideHighlightPixel called on mouseleave and
  when switching the current tool to active (i.e. when user starts
  clicking)
This commit is contained in:
jdescottes
2013-12-18 23:37:17 +01:00
parent e4cf2ac40b
commit 4056142b97
2 changed files with 28 additions and 4 deletions

View File

@@ -31,6 +31,13 @@
}
};
ns.BaseTool.prototype.hideHighlightedPixel = function(overlay) {
overlay.setPixel(this.highlightedPixelCol, this.highlightedPixelRow, Constants.TRANSPARENT_COLOR);
this.highlightedPixelRow = null;
this.highlightedPixelCol = null;
};
ns.BaseTool.prototype.releaseToolAt = function(col, row, color, frame, overlay, event) {};
/**