aboutsummaryrefslogtreecommitdiff
path: root/src/App.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-07-08 00:24:47 +1000
committerTerry Truong <terry06890@gmail.com>2022-07-08 00:25:36 +1000
commitef4a9b9223d6019f0b782eb2f944f3cfe2b6ed41 (patch)
treec5838cdf157b403f07b4b90d512fb832a3dbf4d8 /src/App.vue
parent4209790a0c1737bc9cbf7df2bdcedc541b715dad (diff)
Adjust SCollapsible, allowing for v-model and @open
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/App.vue b/src/App.vue
index 1c4b74b..8e3bd11 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -251,38 +251,6 @@ export default defineComponent({
return styles;
},
},
- watch: {
- infoModalNodeName(newVal, oldVal){
- // Possibly trigger tutorial advance
- if (newVal == null){
- this.handleActionForTutorial('tileInfo');
- }
- },
- modeRunning(newVal, oldVal){
- // For sweepToParent setting 'fallback', temporarily change to 'prefer' for efficiency
- if (newVal != null){
- if (this.lytOpts.sweepToParent == 'fallback'){
- this.lytOpts.sweepToParent = 'prefer';
- this.changedSweepToParent = true;
- }
- } else {
- if (this.changedSweepToParent){
- this.lytOpts.sweepToParent = 'fallback';
- this.changedSweepToParent = false;
- }
- }
- // Possibly trigger tutorial advance
- if (newVal == null){
- this.handleActionForTutorial(oldVal);
- }
- },
- settingsOpen(newVal, oldVal){
- // Possibly trigger tutorial advance
- if (newVal == false){
- this.handleActionForTutorial('settings');
- }
- },
- },
methods: {
// For tile expand/collapse events
async onLeafClick(layoutNode: LayoutNode, subAction = false): Promise<boolean> {
@@ -1033,6 +1001,38 @@ export default defineComponent({
return actions.some(a => disabledActions.has(a));
},
},
+ watch: {
+ infoModalNodeName(newVal, oldVal){
+ // Possibly trigger tutorial advance
+ if (newVal == null){
+ this.handleActionForTutorial('tileInfo');
+ }
+ },
+ modeRunning(newVal, oldVal){
+ // For sweepToParent setting 'fallback', temporarily change to 'prefer' for efficiency
+ if (newVal != null){
+ if (this.lytOpts.sweepToParent == 'fallback'){
+ this.lytOpts.sweepToParent = 'prefer';
+ this.changedSweepToParent = true;
+ }
+ } else {
+ if (this.changedSweepToParent){
+ this.lytOpts.sweepToParent = 'fallback';
+ this.changedSweepToParent = false;
+ }
+ }
+ // Possibly trigger tutorial advance
+ if (newVal == null){
+ this.handleActionForTutorial(oldVal);
+ }
+ },
+ settingsOpen(newVal, oldVal){
+ // Possibly trigger tutorial advance
+ if (newVal == false){
+ this.handleActionForTutorial('settings');
+ }
+ },
+ },
created(){
window.addEventListener('resize', this.onResize);
window.addEventListener('keydown', this.onKeyUp);