Skip to content

Commit

Permalink
only show marquee for selected item
Browse files Browse the repository at this point in the history
  • Loading branch information
davetsay committed Oct 26, 2023
1 parent 1419392 commit d17af21
Showing 1 changed file with 6 additions and 6 deletions.
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 @@ export default {
};
},
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

0 comments on commit d17af21

Please sign in to comment.