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";
import { createLazyProxy } from "util/proxies";
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 { Persistent, persistent } from "./persistence";
import player from "./player";
@ -44,7 +44,7 @@ export interface LayerEvents {
postUpdate: (diff: number) => void;
}
export const layers: Record<string, Readonly<GenericLayer> | undefined> = {};
export const layers: Record<string, Readonly<GenericLayer> | undefined> = shallowReactive({});
window.layers = layers;
declare module "@vue/runtime-dom" {