mirror of
https://github.com/nasa/openmct.git
synced 2025-01-19 11:17:04 +00:00
remove is editing checks from toolbar providers since is editing is being checked by layout (#2314)
This commit is contained in:
parent
0f2918efaf
commit
350d3c92e7
@ -28,9 +28,9 @@ define([], function () {
|
||||
key: "layout",
|
||||
description: "A toolbar for objects inside a display layout.",
|
||||
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.
|
||||
return (openmct.editor.isEditing() && selection &&
|
||||
return (selection &&
|
||||
((selection[1] && selection[1].context.item && selection[1].context.item.type === 'layout') ||
|
||||
(selection[0].context.item && selection[0].context.item.type === 'layout')));
|
||||
},
|
||||
|
@ -29,7 +29,7 @@ function ToolbarProvider(openmct) {
|
||||
forSelection: function (selection) {
|
||||
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'));
|
||||
},
|
||||
toolbar: function (selection) {
|
||||
|
Loading…
Reference in New Issue
Block a user