diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-07-01 19:28:12 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-07-01 19:28:12 +1000 |
| commit | 551fbe163b90cc1f318612c167fbdfe738dd7132 (patch) | |
| tree | 00286538d754fdf686751a3d4c1689d799ecd65e /src/App.vue | |
| parent | c2b9a8b7a706cdca58dab7f4a980401e1c20a602 (diff) | |
Generate 3 reduced trees, keeping the original, and serve only those
Generate a 'trimmed' reduced tree instead of changing the original.
Generate an 'images-only' reduced tree, and use it as the default.
Combine 'picked' reduced tree code with that of other reduced trees.
Adapt server API to allow selecting between more than 2 trees.
Add client setting for selecting between 3 trees.
Diffstat (limited to 'src/App.vue')
| -rw-r--r-- | src/App.vue | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/App.vue b/src/App.vue index f54cb31..13da971 100644 --- a/src/App.vue +++ b/src/App.vue @@ -326,7 +326,7 @@ export default defineComponent({ let tolNode = this.tolMap.get(layoutNode.name)!; if (!this.tolMap.has(tolNode.children[0])){ let urlParams = 'type=node&name=' + encodeURIComponent(layoutNode.name); - urlParams += this.uiOpts.useReducedTree ? '&rtree=true' : ''; + urlParams += '&tree=' + this.uiOpts.tree; let responseObj: {[x: string]: TolNode} = await getServerResponse(urlParams); if (responseObj == null){ return false; @@ -421,7 +421,7 @@ export default defineComponent({ let tolNode = this.tolMap.get(layoutNode.name)!; if (!this.tolMap.has(tolNode.children[0])){ let urlParams = 'type=node&name=' + encodeURIComponent(layoutNode.name); - urlParams += this.uiOpts.useReducedTree ? '&rtree=true' : ''; + urlParams += '&tree=' + this.uiOpts.tree; let responseObj: {[x: string]: TolNode} = await getServerResponse(urlParams); if (responseObj == null){ return false; @@ -490,7 +490,7 @@ export default defineComponent({ } // Query server for tol-node info let urlParams = 'type=info&name=' + encodeURIComponent(nodeName); - urlParams += this.uiOpts.useReducedTree ? '&rtree=true' : ''; + urlParams += '&tree=' + this.uiOpts.tree; let responseObj: InfoResponse = await getServerResponse(urlParams); if (responseObj == null){ return; @@ -819,7 +819,7 @@ export default defineComponent({ //Note: Using JSON.stringify here to roughly deep-compare values if (item == null && JSON.stringify(this.uiOpts[prop]) != JSON.stringify(uiOpts[prop])){ this.uiOpts[prop] = uiOpts[prop]; - if (prop == 'useReducedTree'){ + if (prop == 'tree'){ changedTree = true; } } @@ -875,7 +875,7 @@ export default defineComponent({ async initTreeFromServer(){ // Query server let urlParams = 'type=node'; - urlParams += this.uiOpts.useReducedTree ? '&rtree=true' : ''; + urlParams += '&tree=' + this.uiOpts.tree; let responseObj: {[x: string]: TolNode} = await getServerResponse(urlParams); if (responseObj == null){ return; |
