mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fix wrong colors being in current colors
This commit is contained in:
parent
fa716d7a6c
commit
91f0d98d63
@ -111,7 +111,7 @@
|
|||||||
|
|
||||||
if (lastColors) {
|
if (lastColors) {
|
||||||
Object.keys(lastColors).forEach(function(color) {
|
Object.keys(lastColors).forEach(function(color) {
|
||||||
if (!colors[color]) {
|
if (!frameCache[hash][color]) {
|
||||||
delete colors[color];
|
delete colors[color];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -122,8 +122,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var batchAllThen = function (results) {
|
var batchAllThen = function (colors, results) {
|
||||||
var colors = {};
|
|
||||||
results.forEach(function (result) {
|
results.forEach(function (result) {
|
||||||
Object.keys(result).forEach(function (color) {
|
Object.keys(result).forEach(function (color) {
|
||||||
colors[color] = true;
|
colors[color] = true;
|
||||||
@ -139,7 +138,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setCurrentColors(hexColors);
|
this.setCurrentColors(hexColors);
|
||||||
}.bind(this)
|
}.bind(this, colors);
|
||||||
|
|
||||||
if (framesToBatch.length == 0) {
|
if (framesToBatch.length == 0) {
|
||||||
batchAllThen([colors]);
|
batchAllThen([colors]);
|
||||||
|
Loading…
Reference in New Issue
Block a user