mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
c32b327f23 | |||
573d7ca051 | |||
23b82b4cf0 |
@ -3,7 +3,7 @@
|
||||
"name": "piskel",
|
||||
"main": "./dest/index.html",
|
||||
"description": "Web based 2d animations editor",
|
||||
"version": "0.5.5-SNAPSHOT",
|
||||
"version": "0.6.0-SNAPSHOT",
|
||||
"homepage": "http://github.com/juliandescottes/piskel",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -56,8 +56,9 @@
|
||||
};
|
||||
|
||||
ns.ColorSwap.prototype.applyToolOnFrame_ = function (frame, oldColor, newColor) {
|
||||
oldColor = oldColor.toUpperCase();
|
||||
frame.forEachPixel(function (color, col, row) {
|
||||
if (color == oldColor) {
|
||||
if (color && color.toUpperCase() == oldColor) {
|
||||
frame.pixels[col][row] = newColor;
|
||||
}
|
||||
});
|
||||
|
@ -25,13 +25,16 @@
|
||||
deferred.resolve(fileInputElement.value);
|
||||
};
|
||||
|
||||
// fix for issue #322 :
|
||||
window.setTimeout(function () {
|
||||
fileInputElement.click();
|
||||
|
||||
fileInputElement.addEventListener('change', changeListener);
|
||||
// there is no way to detect a cancelled fileInput popup
|
||||
// as a crappy workaround we add a click listener on the document
|
||||
// on top the change event listener
|
||||
document.addEventListener('click', changeListener);
|
||||
// todo : listen to dirty check instead
|
||||
document.addEventListener('mousedown', changeListener);
|
||||
}, 50);
|
||||
|
||||
return deferred.promise;
|
||||
},
|
||||
|
Reference in New Issue
Block a user