aboutsummaryrefslogtreecommitdiff
path: root/src/components/AncestryBar.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/AncestryBar.vue')
-rw-r--r--src/components/AncestryBar.vue9
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,