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",
|
"name": "piskel",
|
||||||
"main": "./dest/index.html",
|
"main": "./dest/index.html",
|
||||||
"description": "Web based 2d animations editor",
|
"description": "Web based 2d animations editor",
|
||||||
"version": "0.5.5-SNAPSHOT",
|
"version": "0.6.0-SNAPSHOT",
|
||||||
"homepage": "http://github.com/juliandescottes/piskel",
|
"homepage": "http://github.com/juliandescottes/piskel",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -56,8 +56,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
ns.ColorSwap.prototype.applyToolOnFrame_ = function (frame, oldColor, newColor) {
|
ns.ColorSwap.prototype.applyToolOnFrame_ = function (frame, oldColor, newColor) {
|
||||||
|
oldColor = oldColor.toUpperCase();
|
||||||
frame.forEachPixel(function (color, col, row) {
|
frame.forEachPixel(function (color, col, row) {
|
||||||
if (color == oldColor) {
|
if (color && color.toUpperCase() == oldColor) {
|
||||||
frame.pixels[col][row] = newColor;
|
frame.pixels[col][row] = newColor;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -25,13 +25,16 @@
|
|||||||
deferred.resolve(fileInputElement.value);
|
deferred.resolve(fileInputElement.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
fileInputElement.click();
|
// fix for issue #322 :
|
||||||
|
window.setTimeout(function () {
|
||||||
fileInputElement.addEventListener('change', changeListener);
|
fileInputElement.click();
|
||||||
// there is no way to detect a cancelled fileInput popup
|
fileInputElement.addEventListener('change', changeListener);
|
||||||
// as a crappy workaround we add a click listener on the document
|
// there is no way to detect a cancelled fileInput popup
|
||||||
// on top the change event listener
|
// as a crappy workaround we add a click listener on the document
|
||||||
document.addEventListener('click', changeListener);
|
// on top the change event listener
|
||||||
|
// todo : listen to dirty check instead
|
||||||
|
document.addEventListener('mousedown', changeListener);
|
||||||
|
}, 50);
|
||||||
|
|
||||||
return deferred.promise;
|
return deferred.promise;
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user