aboutsummaryrefslogtreecommitdiff
path: root/src/lib.ts
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-07-10 23:41:20 +1000
committerTerry Truong <terry06890@gmail.com>2022-07-10 23:41:20 +1000
commita8f80a02b88055cfcb45664ce3a3d24c2b2da98c (patch)
tree021072aa131b2e141978e0223f6e37dfcb1cf1cd /src/lib.ts
parentf0df00add356c0ee4cc8743a9ceeb276ae207715 (diff)
Update project-level and client-side documentation
Diffstat (limited to 'src/lib.ts')
-rw-r--r--src/lib.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.ts b/src/lib.ts
index 7ff0b73..d2ad959 100644
--- a/src/lib.ts
+++ b/src/lib.ts
@@ -1,5 +1,5 @@
/*
- * Project-wide types/classes
+ * Project-wide globals
*/
import {TolNode} from './tol';
@@ -8,6 +8,7 @@ import {getBreakpoint, Breakpoint, getScrollBarWidth, onTouchDevice} from './uti
// For server requests
const SERVER_URL = (new URL(window.location.href)).origin + '/data'
+const SERVER_IMG_PATH = '/img/'
export async function queryServer(params: URLSearchParams){
// Construct URL
let url = new URL(SERVER_URL);
@@ -23,7 +24,6 @@ export async function queryServer(params: URLSearchParams){
}
return responseObj;
}
-const SERVER_IMG_PATH = '/img/'
export function getImagePath(imgName: string): string {
return SERVER_IMG_PATH + imgName.replaceAll('\'', '\\\'');
}