From 39792d870ed213b45b43d2cc38cf78f6ae94b137 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Thu, 24 Mar 2022 16:39:33 +1100 Subject: Propagate options to TileInfoModal --- src/components/TileInfoModal.vue | 11 ++++++----- src/components/TileTree.vue | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/TileInfoModal.vue b/src/components/TileInfoModal.vue index c7e0d64..8b96ebb 100644 --- a/src/components/TileInfoModal.vue +++ b/src/components/TileInfoModal.vue @@ -5,6 +5,7 @@ import {TolNode} from '../lib'; export default defineComponent({ props: { tolNode: {type: Object as PropType}, // The node to display, or null to hide + options: {type: Object, required: true}, }, data(){ return { @@ -24,17 +25,17 @@ export default defineComponent({ visibility: this.tolNode != null ? 'visible' : 'hidden', opacity: this.tolNode != null ? '1' : '0', transition: 'visibility, opacity', - transitionDuration: '300ms', + transitionDuration: this.options.transitionDuration + 'ms', }; }, imgStyles(): Record { return { backgroundImage: this.lastNode == null ? 'none' : 'url(\'/img/' + this.lastNode.name.replaceAll('\'', '\\\'') + '.png\')', - width: '200px', - height: '200px', + width: this.options.infoModalImgSz + 'px', + height: this.options.infoModalImgSz + 'px', backgroundSize: 'cover', - borderRadius: '5px', + borderRadius: this.options.borderRadius + 'px', } }, }, @@ -51,7 +52,7 @@ export default defineComponent({ -- cgit v1.2.3