diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-06-25 12:10:58 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-06-25 12:43:36 +1000 |
| commit | 2a0c04245f8ab5017ca96449cca8aeb36336edf3 (patch) | |
| tree | 9d8fed07810e7b22c2ed29b6db014f69f4023fe5 /src/components/AncestryBar.vue | |
| parent | a1c5e2017ef80d360cc0d08ae73437ce32766c6e (diff) | |
Reduce degrees-of-variance in options set
Also add size prop to IconButton
Diffstat (limited to 'src/components/AncestryBar.vue')
| -rw-r--r-- | src/components/AncestryBar.vue | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/components/AncestryBar.vue b/src/components/AncestryBar.vue index a5bb1c0..0f95d00 100644 --- a/src/components/AncestryBar.vue +++ b/src/components/AncestryBar.vue @@ -15,10 +15,13 @@ export default defineComponent({ uiOpts: {type: Object as PropType<UiOptions>, required: true}, }, computed: { + imgSz(){ + return this.uiOpts.ancestryBarBreadth - this.lytOpts.tileSpacing*2 - this.uiOpts.scrollGap; + }, usedNodes(){ // Childless versions of 'nodes' used to parameterise <tile> return this.nodes.map(n => { let newNode = new LayoutNode(n.name, []); - newNode.dims = [this.uiOpts.ancestryBarImgSz, this.uiOpts.ancestryBarImgSz]; + newNode.dims = [this.imgSz, this.imgSz]; return newNode; }); }, @@ -29,8 +32,8 @@ export default defineComponent({ // For child layout display: 'flex', flexDirection: this.vert ? 'column' : 'row', - gap: this.uiOpts.ancestryTileGap + 'px', - padding: this.uiOpts.ancestryTileGap + 'px', + gap: this.lytOpts.tileSpacing + 'px', + padding: this.lytOpts.tileSpacing + 'px', // Other backgroundColor: this.uiOpts.ancestryBarBgColor, boxShadow: this.uiOpts.shadowNormal, |
