aboutsummaryrefslogtreecommitdiff
path: root/src/components/TimeLine.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2023-01-03 21:31:02 +1100
committerTerry Truong <terry06890@gmail.com>2023-01-03 21:31:02 +1100
commit6438f8e880df5b04ff974179897ae507bb30285c (patch)
tree626382eebe5f04d5005415fe4fc4a1be4e4aca73 /src/components/TimeLine.vue
parentc42b35d10cda3e4c3127f3a6cb4312d7b6cfe3f6 (diff)
Query server when zoomed in enough even if within an already queried range
For server query parameter range=date1.date2, exclude date2 Fix unnecessary calendar-to-year date conversion when building sql query For frontend DateRangeTree class, rename has() to contains()
Diffstat (limited to 'src/components/TimeLine.vue')
-rw-r--r--src/components/TimeLine.vue4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/TimeLine.vue b/src/components/TimeLine.vue
index 6595bed..76d78d0 100644
--- a/src/components/TimeLine.vue
+++ b/src/components/TimeLine.vue
@@ -407,7 +407,7 @@ const endIsLastVisible = computed(() => {
function dateToOffset(date: HistDate){ // Assumes 'date' is >=firstDate and <=lastDate
// Find containing major tick
let tickIdx = firstIdx.value;
- for (let i = tickIdx + 1; i <= lastIdx.value; i++){
+ for (let i = tickIdx + 1; i < lastIdx.value; i++){
if (ticks.value[i].major){
if (!date.isEarlier(ticks.value[i].date)){
tickIdx = i;
@@ -436,7 +436,7 @@ const idToEvent = computed(() => { // Maps visible event IDs to HistEvents
while (itr.data() != null){
let event = itr.data()!;
itr.next();
- if (lastDate.value.isEarlier(event.start)){
+ if (!event.start.isEarlier(lastDate.value)){
break;
}
map.set(event.id, event);