mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed data handling bug
When updating a percentage, it based it off the previous edited value (eg if I scale 2x, old value will be equal to 2x, so if you wanted to scale it 0.5x, it actually made it 4x times smaller)
This commit is contained in:
@@ -3,6 +3,22 @@ var redoStates = [];
|
||||
|
||||
const undoLogStyle = 'background: #87ff1c; color: black; padding: 5px;';
|
||||
|
||||
function HistoryStateResizeSprite(newPercs, oldPercs, algo) {
|
||||
this.newPercs = newPercs;
|
||||
this.oldPercs = oldPercs;
|
||||
this.algo = algo;
|
||||
|
||||
this.undo = function() {
|
||||
|
||||
};
|
||||
|
||||
this.redo = function() {
|
||||
|
||||
};
|
||||
|
||||
saveHistoryState(this);
|
||||
}
|
||||
|
||||
function HistoryStateResizeCanvas(newSize, oldSize, imageDatas) {
|
||||
this.oldSize = oldSize;
|
||||
this.newSize = newSize;
|
||||
|
Reference in New Issue
Block a user