From 9e8e30c5c680ca81862e4fba5f7ae9ecea62b8ff Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Mon, 4 Jul 2022 21:19:11 +1000 Subject: Update IconButton to maintain equal width/height --- src/App.vue | 2 +- src/components/HelpModal.vue | 4 ++-- src/components/IconButton.vue | 16 +++++++++++++--- src/components/TileInfoModal.vue | 10 ++++------ src/components/TutorialPane.vue | 3 +-- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/App.vue b/src/App.vue index f98e4e9..5cd5ac8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,7 +3,7 @@ :style="{backgroundColor: uiOpts.bgColor}">
-

Tilo

+

Tilo

diff --git a/src/components/HelpModal.vue b/src/components/HelpModal.vue index 57ae90e..506a1d8 100644 --- a/src/components/HelpModal.vue +++ b/src/components/HelpModal.vue @@ -25,7 +25,7 @@

Each dot is a node, and represents a taxon, which might be a species, genus, or otherwise. The top node is the - root, and those without children are leaves. + root, and those at the bottom are leaves.

@@ -53,7 +53,7 @@

Tilo attempts to display the Tree of Life by representing nodes with tiles, - and placing tiles within other tiles to show tree structure. + and placing tiles within other tiles to show structure.

Tree with Tile layout diff --git a/src/components/IconButton.vue b/src/components/IconButton.vue index 0294c5b..5684fb0 100644 --- a/src/components/IconButton.vue +++ b/src/components/IconButton.vue @@ -1,7 +1,6 @@ @@ -14,5 +13,16 @@ export default defineComponent({ size: {type: Number, default: 36}, disabled: {type: Boolean, default: false}, }, + computed: { + styles(): Record { + return { + minWidth: this.size + 'px', + maxWidth: this.size + 'px', + minHeight: this.size + 'px', + maxHeight: this.size + 'px', + padding: (this.size / 5) + 'px', + }; + }, + }, }); diff --git a/src/components/TileInfoModal.vue b/src/components/TileInfoModal.vue index 29901ee..8c2363b 100644 --- a/src/components/TileInfoModal.vue +++ b/src/components/TileInfoModal.vue @@ -36,10 +36,9 @@