Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszmigas committed Mar 4, 2024
1 parent 2fe931a commit 00b7dd2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion apps/web/src/components/canvasHost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import { Size } from "@/utils/common";
import { useLayoutEffect, useRef } from "react";

type CanvasHostProps = {
export type CanvasHostProps = {
currentData: ImageUncompressedBuffer; //the whole image
draftDataDiffs: ImageUncompressedBufferRect[]; //image diffs that will override parts of currentData
};
Expand Down
19 changes: 9 additions & 10 deletions apps/web/src/history/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
ImageCompressedBuffer,
ImageUncompressedBuffer,
ImageUncompressedBufferRect,
} from "@/utils/imageData";
Expand All @@ -15,9 +14,9 @@ export type ImageChange =
};

export class ImageHistory {
private checkpoints: Record<number, ImageCompressedBuffer> = {};
// private checkpoints: Record<number, ImageCompressedBuffer> = {};

init(data?: ImageUncompressedBuffer) {}
init(_data?: ImageUncompressedBuffer) {}

push(change: ImageChange) {
//resets stack
Expand All @@ -40,12 +39,12 @@ export class ImageHistory {
//apply to current
}

private compress(data: ImageUncompressedBuffer): ImageCompressedBuffer {
return {
width: data.width,
height: data.height,
data: data.data,
};
}
// private compress(data: ImageUncompressedBuffer): ImageCompressedBuffer {
// return {
// width: data.width,
// height: data.height,
// data: data.data,
// };
// }
}

0 comments on commit 00b7dd2

Please sign in to comment.