Fix app storage

This commit is contained in:
space-nuko
2023-04-28 16:57:42 -07:00
parent 234c280959
commit 079f411a04
5 changed files with 10 additions and 24 deletions

View File

@@ -4,11 +4,15 @@
import ComfyApp, { type SerializedAppState } from "$lib/components/ComfyApp";
import ComfyGraphCanvas from "$lib/ComfyGraphCanvas";
import { onMount } from 'svelte';
import uiState from "$lib/stores/uiState"
const app: ComfyApp = ComfyApp.instance;
let app: ComfyApp | null = null;
let lCanvas: LGraphCanvas | null = null;
let canvasEl: HTMLCanvasElement | null = null;
$: if (!app)
app = $uiState.app
function resizeCanvas() {
canvasEl.width = canvasEl.parentElement.offsetWidth;
canvasEl.height = canvasEl.parentElement.offsetHeight;