From 64b597f0b615dfcf964450bac4a6506704a2b931 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Wed, 23 Mar 2022 18:34:23 +1100
Subject: Make options propagate from TileTree

---
 src/components/ParentBar.vue | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

(limited to 'src/components/ParentBar.vue')

diff --git a/src/components/ParentBar.vue b/src/components/ParentBar.vue
index 8cd1f3b..fab8f9f 100644
--- a/src/components/ParentBar.vue
+++ b/src/components/ParentBar.vue
@@ -3,26 +3,17 @@ import {defineComponent, PropType} from 'vue';
 import {LayoutNode} from '../lib';
 import TileImg from './TileImg.vue'
 
-const defaultTileImgOptions = {
-	borderRadius: 5,
-	shadowNormal: '0 0 2px black',
-	shadowHighlight: '0 0 1px 2px greenyellow',
-	imgTilePadding: 4,
-	imgTileFontSz: 15,
-	imgTileColor: '#fafaf9',
-	expandableImgTileColor: 'greenyellow',
-}
 export default defineComponent({
 	props: {
 		pos: {type: Array as unknown as PropType<[number,number]>, required: true},
 		dims: {type: Array as unknown as PropType<[number,number]>, required: true},
 		nodes: {type: Array as PropType<LayoutNode[]>, required: true},
+		options: {type: Object, required: true},
 	},
 	data(){
 		return {
 			tileMargin: 5, //px (gap between separated-parent tiles)
 			scrollBarOffset: 10, //px (gap for scrollbar, used to prevent overlap with tiles)
-			tileImgOptions: {...defaultTileImgOptions},
 		};
 	},
 	computed: {
@@ -64,6 +55,6 @@ export default defineComponent({
 <template>
 <div :style="styles">
 	<tile-img v-for="node in nodes" :key="node.tolNode.name"
-		:layoutNode="node" :tileSz="tileSz" :options="tileImgOptions"/>
+		:layoutNode="node" :tileSz="tileSz" :options="options"/>
 </div>
 </template>
-- 
cgit v1.2.3

