Finished refactoring, moved sprite scaling functions in File

This commit is contained in:
unsettledgames
2021-12-06 20:12:57 +01:00
parent b2f5521750
commit 21dd47c2b0
14 changed files with 405 additions and 427 deletions

View File

@@ -104,8 +104,8 @@ class HistoryState {
this.undo = function() {
let layerIndex = 0;
currentAlgo = algo;
resizeSprite(null, [1 / this.xRatio, 1 / this.yRatio]);
currFile.currentAlgo = algo;
currFile.resizeSprite(null, [1 / this.xRatio, 1 / this.yRatio]);
// Also putting the old data
for (let i=0; i<currFile.layers.length; i++) {
@@ -118,8 +118,8 @@ class HistoryState {
};
this.redo = function() {
currentAlgo = algo;
resizeSprite(null, [this.xRatio, this.yRatio]);
currFile.currentAlgo = algo;
currFile.resizeSprite(null, [this.xRatio, this.yRatio]);
};
}