diff --git a/src/components/Game.vue b/src/components/Game.vue
index 4f26260..fd20d25 100644
--- a/src/components/Game.vue
+++ b/src/components/Game.vue
@@ -13,6 +13,7 @@
v-if="layerKeys.includes(tab)"
v-bind="gatherLayerProps(layers[tab]!)"
:index="index"
+ @set-minimized="value => (layers[tab]!.minimized.value = value)"
/>
diff --git a/src/components/Layer.vue b/src/components/Layer.vue
index f599543..c687b56 100644
--- a/src/components/Layer.vue
+++ b/src/components/Layer.vue
@@ -2,7 +2,11 @@
-
- ▼
+
+ ▼
+
@@ -40,7 +46,7 @@ export default defineComponent({
},
minimizedDisplay: processedPropType(Object, String, Function),
minimized: {
- type: Object as PropType>,
+ type: Object as PropType[>,
required: true
},
name: {
@@ -54,6 +60,7 @@ export default defineComponent({
required: true
}
},
+ emits: ["setMinimized"],
setup(props) {
const { display, index, minimized, minimizedDisplay } = toRefs(props);
@@ -67,10 +74,6 @@ export default defineComponent({
player.tabs.splice(unref(props.index), 1);
}
- function setMinimized(min: boolean) {
- minimized.value = min;
- }
-
function updateNodes(nodes: Record) {
props.nodes.value = nodes;
}
@@ -81,8 +84,7 @@ export default defineComponent({
showGoBack,
updateNodes,
unref,
- goBack,
- setMinimized
+ goBack
};
}
});
]