mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
renaming + bug fixing (0 considered as false …)
This commit is contained in:
@@ -14,10 +14,10 @@
|
|||||||
|
|
||||||
ns.BaseTool.prototype.moveUnactiveToolAt = function(col, row, color, frame, overlay) {
|
ns.BaseTool.prototype.moveUnactiveToolAt = function(col, row, color, frame, overlay) {
|
||||||
if (overlay.containsPixel(col, row)) {
|
if (overlay.containsPixel(col, row)) {
|
||||||
if (this.previouslyHighlightedPixelCol &&
|
if (!isNaN(this.highlightedPixelCol) &&
|
||||||
this.previouslyHighlightedPixelRow &&
|
!isNaN(this.highlightedPixelRow) &&
|
||||||
(this.previouslyHighlightedPixelRow != row ||
|
(this.highlightedPixelRow != row ||
|
||||||
this.previouslyHighlightedPixelCol != col)) {
|
this.highlightedPixelCol != col)) {
|
||||||
|
|
||||||
// Clean the previously highlighted pixel:
|
// Clean the previously highlighted pixel:
|
||||||
overlay.clear();
|
overlay.clear();
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
// Show the current pixel targeted by the tool:
|
// Show the current pixel targeted by the tool:
|
||||||
overlay.setPixel(col, row, Constants.TOOL_TARGET_HIGHLIGHT_COLOR);
|
overlay.setPixel(col, row, Constants.TOOL_TARGET_HIGHLIGHT_COLOR);
|
||||||
|
|
||||||
this.previouslyHighlightedPixelCol = col;
|
this.highlightedPixelCol = col;
|
||||||
this.previouslyHighlightedPixelRow = row;
|
this.highlightedPixelRow = row;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user