mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
added loading over + fixed bug with highlighted pixel removal
This commit is contained in:
@ -32,9 +32,11 @@
|
||||
};
|
||||
|
||||
ns.BaseTool.prototype.hideHighlightedPixel = function(overlay) {
|
||||
overlay.setPixel(this.highlightedPixelCol, this.highlightedPixelRow, Constants.TRANSPARENT_COLOR);
|
||||
this.highlightedPixelRow = null;
|
||||
this.highlightedPixelCol = null;
|
||||
if (this.highlightedPixelRow !== null && this.highlightedPixelCol !== null) {
|
||||
overlay.setPixel(this.highlightedPixelCol, this.highlightedPixelRow, Constants.TRANSPARENT_COLOR);
|
||||
this.highlightedPixelRow = null;
|
||||
this.highlightedPixelCol = null;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -70,6 +70,9 @@
|
||||
}
|
||||
};
|
||||
|
||||
ns.BaseSelect.prototype.hideHighlightedPixel = function () {
|
||||
// not implemented for selection tools
|
||||
};
|
||||
|
||||
/**
|
||||
* If we mouseover the selection draw inside the overlay frame, show the 'move' cursor
|
||||
|
@ -6,7 +6,6 @@
|
||||
this.isRunning = false;
|
||||
this.previousTime = 0;
|
||||
this.callbacks = [];
|
||||
this.i = 0;
|
||||
};
|
||||
|
||||
ns.DrawingLoop.prototype.addCallback = function (callback, scope, args) {
|
||||
@ -34,10 +33,7 @@
|
||||
ns.DrawingLoop.prototype.loop_ = function () {
|
||||
var currentTime = Date.now();
|
||||
var delta = currentTime - this.previousTime;
|
||||
this.i++;
|
||||
if(this.i%2 === 0) {
|
||||
this.executeCallbacks_(delta);
|
||||
}
|
||||
this.executeCallbacks_(delta);
|
||||
this.previousTime = currentTime;
|
||||
this.requestAnimationFrame.call(window, this.loop_.bind(this));
|
||||
};
|
||||
|
Reference in New Issue
Block a user