Skip to content

Commit

Permalink
fix(#1067): fix rule definition link when no labels are defined (#1069)
Browse files Browse the repository at this point in the history
This PR fixes link to annotation mode when there is not query and labels

Closes #1067

(cherry picked from commit cc985db)
  • Loading branch information
leiyre authored and frascuchon committed Feb 2, 2022
1 parent 09b88cc commit eb958bf
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -49,6 +49,7 @@
</div>
</template>
<script>
import { mapActions } from "vuex";
import { DatasetViewSettings } from "@/models/DatasetViewSettings";
export default {
Expand Down Expand Up @@ -96,12 +97,21 @@ export default {
},
},
methods: {
...mapActions({
changeViewMode: "entities/datasets/changeViewMode",
}),
expandLabels() {
this.shownLabels = this.filteredLabels.length;
},
collapseLabels() {
this.shownLabels = this.maxVisibleLabels;
},
async changeToAnnotationViewMode() {
await this.changeViewMode({
dataset: this.dataset,
value: "annotate",
});
},
},
};
</script>
Expand Down

0 comments on commit eb958bf

Please sign in to comment.