mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 13:17:53 +00:00
Avoid using the same separator object when adding separators to toolbar (#2362)
This commit is contained in:
parent
3b0605d17b
commit
b7fa5c7ba8
@ -42,12 +42,7 @@ function ToolbarProvider(openmct) {
|
||||
toggleContainer,
|
||||
deleteContainer,
|
||||
addContainer,
|
||||
toggleFrame,
|
||||
separator;
|
||||
|
||||
separator = {
|
||||
control: "separator"
|
||||
};
|
||||
toggleFrame;
|
||||
|
||||
toggleContainer = {
|
||||
control: 'toggle-button',
|
||||
@ -68,6 +63,12 @@ function ToolbarProvider(openmct) {
|
||||
]
|
||||
};
|
||||
|
||||
function getSeparator() {
|
||||
return {
|
||||
control: "separator"
|
||||
};
|
||||
}
|
||||
|
||||
if (primary.context.type === 'frame') {
|
||||
let frameId = primary.context.frameId;
|
||||
let layoutObject = tertiary.context.item;
|
||||
@ -201,9 +202,9 @@ function ToolbarProvider(openmct) {
|
||||
let toolbar = [
|
||||
toggleContainer,
|
||||
addContainer,
|
||||
toggleFrame ? separator : undefined,
|
||||
toggleFrame ? getSeparator() : undefined,
|
||||
toggleFrame,
|
||||
deleteFrame || deleteContainer ? separator : undefined,
|
||||
deleteFrame || deleteContainer ? getSeparator() : undefined,
|
||||
deleteFrame,
|
||||
deleteContainer
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user