aboutsummaryrefslogtreecommitdiff
path: root/src/components/TimeLine.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2023-01-16 01:24:09 +1100
committerTerry Truong <terry06890@gmail.com>2023-01-16 01:24:09 +1100
commita968f35c4057493300b2eff17c99a76fb780ba0c (patch)
tree7f917fa710894ac89d7e73a15e33cffdb6a87f25 /src/components/TimeLine.vue
parent1b14b45ac494c090037eb4c5f92321d1aebc59da (diff)
Add settings for hiding event lines and baseline
Diffstat (limited to 'src/components/TimeLine.vue')
-rw-r--r--src/components/TimeLine.vue16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue
index 56136fd..073261c 100644
--- a/src/components/TimeLine.vue
+++ b/src/components/TimeLine.vue
@@ -15,13 +15,15 @@
</linearGradient>
</defs>
<!-- Event lines (dashed line indicates imprecise start date) -->
- <line v-for="id in eventLines.keys()" :key="id"
- x1="0" y1="0" :x2="eventLines.get(id)![2]" y2="0.01"
- stroke="url('#eventLineGradient')" stroke-width="1px"
- :stroke-dasharray="getEventPrecision(idToEvent.get(id)!) <= minorScale ? '' : '16,4'"
- :style="eventLineStyles(id)" class="animate-fadein"/>
- <!-- Note: With a fully vertical or horizontal line, nothing gets displayed -->
- <!-- Note: Can't use :x2="1" with scaling in :style="", as it makes dashed-lines non-uniform -->
+ <template v-if="store.showEventLines">
+ <line v-for="id in eventLines.keys()" :key="id"
+ x1="0" y1="0" :x2="eventLines.get(id)![2]" y2="0.01"
+ stroke="url('#eventLineGradient')" stroke-width="1px"
+ :stroke-dasharray="getEventPrecision(idToEvent.get(id)!) <= minorScale ? '' : '16,4'"
+ :style="eventLineStyles(id)" class="animate-fadein"/>
+ <!-- Note: With a fully vertical or horizontal line, nothing gets displayed -->
+ <!-- Note: Can't use :x2="1" with scaling in :style="", as it makes dashed-lines non-uniform -->
+ </template>
<!-- Main line (unit horizontal line that gets transformed, with extra length to avoid gaps when panning) -->
<line :stroke="store.color.alt" stroke-width="2px" x1="-1" y1="0" x2="2" y2="0" :style="mainlineStyles"/>
<!-- Tick markers -->