Fix adding new layers not allowing them to be displayed until refresh

This commit is contained in:
thepaperpilot 2022-05-01 15:00:00 -05:00
parent 75fde0f099
commit 22f3415069

View file

@ -17,7 +17,7 @@ import {
} from "util/computed"; } from "util/computed";
import { createLazyProxy } from "util/proxies"; import { createLazyProxy } from "util/proxies";
import { createNanoEvents, Emitter } from "nanoevents"; import { createNanoEvents, Emitter } from "nanoevents";
import { InjectionKey, Ref, ref, unref } from "vue"; import { InjectionKey, Ref, ref, shallowReactive, unref } from "vue";
import { globalBus } from "./events"; import { globalBus } from "./events";
import { Persistent, persistent } from "./persistence"; import { Persistent, persistent } from "./persistence";
import player from "./player"; import player from "./player";
@ -44,7 +44,7 @@ export interface LayerEvents {
postUpdate: (diff: number) => void; postUpdate: (diff: number) => void;
} }
export const layers: Record<string, Readonly<GenericLayer> | undefined> = {}; export const layers: Record<string, Readonly<GenericLayer> | undefined> = shallowReactive({});
window.layers = layers; window.layers = layers;
declare module "@vue/runtime-dom" { declare module "@vue/runtime-dom" {