Skip to content

Commit

Permalink
revert: don't grab JSON state with screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
seankmartin committed Sep 26, 2024
1 parent 4230a4c commit 7f0d199
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/util/screenshot_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,22 +371,10 @@ export class ScreenshotManager extends RefCounted {
} catch (error) {
console.error("Failed to save screenshot:", error);
} finally {
this.saveScreenshotLog(actionState);
this.viewer.display.screenshotMode.value = ScreenshotMode.OFF;
}
}

private saveScreenshotLog(actionState: ScreenshotActionState) {
const { viewerState } = actionState;
const stateString = JSON.stringify(viewerState);
this.downloadState(stateString);
}

private downloadState(state: string) {
const blob = new Blob([state], { type: "text/json" });
saveBlobToFile(blob, setExtension(this.filename, "_state.json"));
}

private resetCanvasSize() {
// Reset the canvas size to the original size
// No need to manually pass the correct sizes, the viewer will handle it
Expand Down

0 comments on commit 7f0d199

Please sign in to comment.