diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-07-06 20:04:03 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-07-06 20:04:03 +1000 |
| commit | 214bf396b7a946dcfc69dcfd768d3a5b21e0f4da (patch) | |
| tree | b236324c065c394a9cc5384329a63acb1b3e7bd2 /src/components/TutorialPane.vue | |
| parent | 521c17523070d83e4b5878f56ad61bf37828a27e (diff) | |
During tutorial, avoid disabling actions the user has already used
For auto-mode and search, enable prerequisite actions when used
Diffstat (limited to 'src/components/TutorialPane.vue')
| -rw-r--r-- | src/components/TutorialPane.vue | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/TutorialPane.vue b/src/components/TutorialPane.vue index 7667f60..3593a79 100644 --- a/src/components/TutorialPane.vue +++ b/src/components/TutorialPane.vue @@ -38,7 +38,7 @@ </span> </div> <div v-else-if="stage == 7" :style="contentStyles"> - {{touchDevice ? 'Tap' : 'Click'}} the play icon to start Auto Mode + {{touchDevice ? 'Tap' : 'Click'}} the play icon to traverse the tree automatically </div> <div v-else-if="stage == 8" :style="contentStyles"> {{touchDevice ? 'Tap' : 'Click'}} the settings icon @@ -75,9 +75,10 @@ import {Action, UiOptions} from '../lib'; export default defineComponent({ props: { - skipWelcome: {type: Boolean, default: false}, + actionsDone: {type: Object as PropType<Set<Action>>, required: true}, // Used to avoid disabling actions already seen triggerFlag: {type: Boolean, required: true}, // Used to indicate that a tutorial-requested 'trigger' action has been done + skipWelcome: {type: Boolean, default: false}, uiOpts: {type: Object as PropType<UiOptions>, required: true}, }, data(){ @@ -122,7 +123,7 @@ export default defineComponent({ // If starting tutorial, disable 'all' actions if (newVal == 1 && !this.disabledOnce){ for (let action of this.stageActions){ - if (action != null){ + if (action != null && !this.actionsDone.has(action)){ this.uiOpts.disabledActions.add(action); } } |
