pixel-data-js 0.29.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.prod.cjs
CHANGED
|
@@ -2315,19 +2315,17 @@ function applyPatchTiles(target, tiles, tileSize) {
|
|
|
2315
2315
|
}
|
|
2316
2316
|
|
|
2317
2317
|
// src/History/HistoryAction.ts
|
|
2318
|
-
function makeHistoryAction(config, accumulator, patch,
|
|
2318
|
+
function makeHistoryAction(config, accumulator, patch, afterUndo, afterRedo, applyPatchTilesFn = applyPatchTiles) {
|
|
2319
2319
|
const target = config.target;
|
|
2320
2320
|
const tileSize = config.tileSize;
|
|
2321
2321
|
return {
|
|
2322
2322
|
undo: () => {
|
|
2323
2323
|
applyPatchTilesFn(target, patch.beforeTiles, tileSize);
|
|
2324
|
-
afterUndo?.();
|
|
2325
|
-
after?.();
|
|
2324
|
+
afterUndo?.(patch);
|
|
2326
2325
|
},
|
|
2327
2326
|
redo: () => {
|
|
2328
2327
|
applyPatchTilesFn(target, patch.afterTiles, tileSize);
|
|
2329
|
-
afterRedo?.();
|
|
2330
|
-
after?.();
|
|
2328
|
+
afterRedo?.(patch);
|
|
2331
2329
|
},
|
|
2332
2330
|
dispose: () => accumulator.recyclePatch(patch)
|
|
2333
2331
|
};
|