aboutsummaryrefslogtreecommitdiff
path: root/src/App.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-07-08 14:19:49 +1000
committerTerry Truong <terry06890@gmail.com>2022-07-08 14:31:46 +1000
commit834dab545931a3f224ef336530a890a7349b100a (patch)
tree1ed5e2a2059bcabd3f8266fd7d52138cc00f026a /src/App.vue
parentd84a2dab11aa23d56c3213008424872e1a011279 (diff)
Add ancestors_* tables, for faster 'toroot' lookupancestors-tables
Speedup seemed minor, and for a non-wide range of situations. It also roughly quadrupled the database size.
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/App.vue b/src/App.vue
index 434eb08..e379a1d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -49,7 +49,8 @@
</div>
<!-- Modals -->
<transition name="fade">
- <search-modal v-if="searchOpen" :tolMap="tolMap" :lytMap="layoutMap" :lytOpts="lytOpts" :uiOpts="uiOpts"
+ <search-modal v-if="searchOpen"
+ :tolMap="tolMap" :lytMap="layoutMap" :activeRoot="activeRoot" :lytOpts="lytOpts" :uiOpts="uiOpts"
@close="onSearchClose" @search="onSearch" @info-click="onInfoClick" @setting-chg="onSettingChg"
@net-wait="primeLoadInd('Loading data')" @net-get="endLoadInd" class="z-10" ref="searchModal"/>
</transition>
@@ -542,7 +543,7 @@ export default defineComponent({
layoutNode.addDescendantChain(nodesToAdd, this.tolMap, this.layoutMap);
// Expand-to-view on target-node's parent
targetNode = this.layoutMap.get(name);
- if (targetNode.parent != this.activeRoot){
+ if (targetNode!.parent != this.activeRoot){
await this.onLeafClickHeld(targetNode!.parent!, true);
} else {
await this.onLeafClick(targetNode!.parent!, true);
@@ -864,7 +865,7 @@ export default defineComponent({
let urlParams = new URLSearchParams({type: 'node', tree: this.uiOpts.tree});
if (nodeName != null){
urlParams.append('name', nodeName);
- urlParams.append('toroot', 'true');
+ urlParams.append('toroot', this.activeRoot.name);
}
let responseObj: {[x: string]: TolNode} = await this.loadFromServer(urlParams);
if (responseObj == null){