Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show marquee for selected item #7180

Merged
merged 23 commits into from
Nov 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/plugins/displayLayout/components/DisplayLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@
};
},
showMarquee() {
let selectionPath = this.selection[0];
let singleSelectedLine =
this.selection.length === 1 &&
selectionPath[0].context.layoutItem &&
selectionPath[0].context.layoutItem.type === 'line-view';
const layoutItem = this.selection[0]?.[0]?.context?.layoutItem;
const isSelectedLayoutItem =
layoutItem &&

Check warning on line 196 in src/plugins/displayLayout/components/DisplayLayout.vue

View check run for this annotation

Codecov / codecov/patch

src/plugins/displayLayout/components/DisplayLayout.vue#L196

Added line #L196 was not covered by tests
this.layoutItems.some((item) => this.openmct.objects.areIdsEqual(item, layoutItem));
const isSingleSelectedLine = this.selection.length === 1 && layoutItem?.type === 'line-view';

return this.isEditing && selectionPath && selectionPath.length > 1 && !singleSelectedLine;
return isSelectedLayoutItem && this.isEditing && !isSingleSelectedLine;

Check warning on line 200 in src/plugins/displayLayout/components/DisplayLayout.vue

View check run for this annotation

Codecov / codecov/patch

src/plugins/displayLayout/components/DisplayLayout.vue#L200

Added line #L200 was not covered by tests
}
},
watch: {
Expand Down