From db9321ca32f283f7fd59e2e8b5f8a695c66fce98 Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Wed, 28 Dec 2022 19:46:34 +1100
Subject: Use scale-associated event scores for uniform spread

Add 'dist' and 'scores' db tables
Add 'scale' server query parameter (and remove 'excl')
Disregard event-end when querying database
---
 src/App.vue | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/App.vue')

diff --git a/src/App.vue b/src/App.vue
index eacc73f..feba10e 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -122,7 +122,7 @@ function reduceEvents(){
 	idToEvent = eventsToKeep;
 }
 // For getting events from server
-const EVENT_REQ_LIMIT = 100;
+const EVENT_REQ_LIMIT = 500;
 let queriedRanges: DateRangeTree[] = SCALES.map(() => new DateRangeTree());
 	// For each scale, holds date ranges for which data has already been queried fromm the server
 let pendingReq = false; // Used to serialise event-req handling
@@ -141,6 +141,7 @@ async function onEventDisplay(
 	let urlParams = new URLSearchParams({
 		type: 'events',
 		range: `${firstDate}.${lastDate}`,
+		scale: String(SCALES[scaleIdx]),
 		limit: String(EVENT_REQ_LIMIT),
 	});
 	let responseObj: HistEventJson[] = await queryServer(urlParams);
-- 
cgit v1.2.3

