Skip to content

Commit

Permalink
Do not set selectedSuperpixel until list is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
Brianna Major committed Jan 29, 2025
1 parent 570dbf8 commit 028d720
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ export default Vue.extend({
menuObserver.observe(element);
});
this.selectedSuperpixel = this.filteredSortedGroupedSuperpixels.data[0];
this.$nextTick(() => {
const resizeHandle = document.querySelector('.resize-handle');
resizeHandle.removeEventListener('mousedown', () => { this.isResizing = true; });
Expand Down Expand Up @@ -633,6 +632,9 @@ export default Vue.extend({
data = this.groupSuperpixels(data);
this.filteredSortedGroupedSuperpixels = _.mapObject(
data, (value) => this.sortSuperpixels(value));
if (!this.selectedSuperpixel) {
this.selectedSuperpixel = this.filteredSortedGroupedSuperpixels.data[0];
}
this.$nextTick(() => this.hideProgressBar());
}, 0);
},
Expand Down

0 comments on commit 028d720

Please sign in to comment.