mirror of
https://github.com/nasa/openmct.git
synced 2025-06-21 00:23:01 +00:00
Merge branch 'open-master' into open1035
Merge in latest changes into topic branch for WTD-1035, dialog warning before navigating out of Edit mode.
This commit is contained in:
@ -23,13 +23,32 @@ define(
|
||||
) {
|
||||
// This is a "lookup" style capability (it looks up other
|
||||
// domain objects), and it should be idempotent
|
||||
return new EditableLookupCapability(
|
||||
contextCapability,
|
||||
editableObject,
|
||||
domainObject,
|
||||
cache,
|
||||
true // Idempotent
|
||||
);
|
||||
var capability = new EditableLookupCapability(
|
||||
contextCapability,
|
||||
editableObject,
|
||||
domainObject,
|
||||
cache,
|
||||
true // Idempotent
|
||||
),
|
||||
// Track the real root object for the Elements pane
|
||||
trueRoot = capability.getRoot();
|
||||
|
||||
// Provide access to the real root, for the Elements pane.
|
||||
capability.getTrueRoot = function () {
|
||||
return trueRoot;
|
||||
};
|
||||
|
||||
// Hide ancestry after the root of this subgraph
|
||||
if (cache.isRoot(domainObject)) {
|
||||
capability.getRoot = function () {
|
||||
return editableObject;
|
||||
};
|
||||
capability.getPath = function () {
|
||||
return [editableObject];
|
||||
};
|
||||
}
|
||||
|
||||
return capability;
|
||||
};
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user