mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 06:38:17 +00:00
remove is editing checks from toolbar providers since is editing is being checked by layout (#2314)
This commit is contained in:
committed by
Pegah Sarram
parent
0f2918efaf
commit
350d3c92e7
@ -28,9 +28,9 @@ define([], function () {
|
|||||||
key: "layout",
|
key: "layout",
|
||||||
description: "A toolbar for objects inside a display layout.",
|
description: "A toolbar for objects inside a display layout.",
|
||||||
forSelection: function (selection) {
|
forSelection: function (selection) {
|
||||||
// Apply the layout toolbar if the edit mode is on, and the selected object
|
// Apply the layout toolbar if the selected object
|
||||||
// is inside a layout, or the main layout is selected.
|
// is inside a layout, or the main layout is selected.
|
||||||
return (openmct.editor.isEditing() && selection &&
|
return (selection &&
|
||||||
((selection[1] && selection[1].context.item && selection[1].context.item.type === 'layout') ||
|
((selection[1] && selection[1].context.item && selection[1].context.item.type === 'layout') ||
|
||||||
(selection[0].context.item && selection[0].context.item.type === 'layout')));
|
(selection[0].context.item && selection[0].context.item.type === 'layout')));
|
||||||
},
|
},
|
||||||
|
@ -29,7 +29,7 @@ function ToolbarProvider(openmct) {
|
|||||||
forSelection: function (selection) {
|
forSelection: function (selection) {
|
||||||
let context = selection[0].context;
|
let context = selection[0].context;
|
||||||
|
|
||||||
return (openmct.editor.isEditing() && context && context.type &&
|
return (context && context.type &&
|
||||||
(context.type === 'flexible-layout' || context.type === 'container' || context.type === 'frame'));
|
(context.type === 'flexible-layout' || context.type === 'container' || context.type === 'frame'));
|
||||||
},
|
},
|
||||||
toolbar: function (selection) {
|
toolbar: function (selection) {
|
||||||
|
Reference in New Issue
Block a user