From a968f35c4057493300b2eff17c99a76fb780ba0c Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Mon, 16 Jan 2023 01:24:09 +1100 Subject: Add settings for hiding event lines and baseline --- src/App.vue | 2 +- src/components/SettingsModal.vue | 32 +++++++++++++++++++++----------- src/components/TimeLine.vue | 16 +++++++++------- src/store.ts | 4 ++++ 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/src/App.vue b/src/App.vue index fb9b0e9..b789d91 100644 --- a/src/App.vue +++ b/src/App.vue @@ -30,7 +30,7 @@ class="grow basis-full min-h-0 outline outline-1" @close="onTimelineClose(idx)" @state-chg="onTimelineChg($event, idx)" @event-display="onEventDisplay" @info-click="onInfoClick" @pointerenter="currentTimelineIdx = idx"/> - + diff --git a/src/components/SettingsModal.vue b/src/components/SettingsModal.vue index bb82016..3e56373 100644 --- a/src/components/SettingsModal.vue +++ b/src/components/SettingsModal.vue @@ -26,17 +26,27 @@

Display

-
- -
-
- -
-
- +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
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 @@ - - - + diff --git a/src/store.ts b/src/store.ts index d65dbcf..5da6241 100644 --- a/src/store.ts +++ b/src/store.ts @@ -24,6 +24,7 @@ export type StoreState = { eventImgSz: number, // Width/height of event images eventLabelHeight: number, spacing: number, // Spacing between display edge, events, and mainline area + showEventLines: boolean, // User input scrollRatio: number, // Fraction of timeline length to move by upon scroll zoomRatio: number, // Ratio of timeline expansion upon zooming out (eg: 1.5) @@ -32,6 +33,7 @@ export type StoreState = { // Other feature-specific reqImgs: boolean, // Only show events with images showEventCounts: boolean, + showBaseLine: boolean, searchSuggLimit: number, ctgs: { // Specifies event categories, and which ones should be visible event: boolean, @@ -101,6 +103,7 @@ function getDefaultState(): StoreState { eventImgSz: 100, eventLabelHeight: 20, spacing: 10, + showEventLines: true, // User input scrollRatio: 0.2, zoomRatio: 1.5, @@ -109,6 +112,7 @@ function getDefaultState(): StoreState { // Other feature-specific reqImgs: true, showEventCounts: true, + showBaseLine: true, searchSuggLimit: 10, ctgs: { event: true, -- cgit v1.2.3