mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +00:00
[Edit Mode Prototype] #278 Added visual indication of edit
This commit is contained in:
parent
10a44c026c
commit
a864c172d5
@ -79,7 +79,8 @@ define(
|
||||
// are not shown in different sections of the same Edit
|
||||
// UI, which might thereby fall out of sync.
|
||||
var cache,
|
||||
originalObject = domainObject;
|
||||
originalObject = domainObject,
|
||||
cachedObject;
|
||||
|
||||
// Constructor for EditableDomainObject, which adheres
|
||||
// to the same shared cache.
|
||||
@ -116,7 +117,10 @@ define(
|
||||
}
|
||||
|
||||
cache = new EditableDomainObjectCache(EditableDomainObjectImpl, $q);
|
||||
return cache.getEditableObject(domainObject);
|
||||
cachedObject = cache.getEditableObject(domainObject);
|
||||
cachedObject.getCapability('status').set('editing', true);
|
||||
|
||||
return cachedObject;
|
||||
}
|
||||
|
||||
return EditableDomainObject;
|
||||
|
@ -92,15 +92,6 @@ define(
|
||||
domainObject,
|
||||
this.cache.getCachedModel(domainObject)
|
||||
);
|
||||
editableObject.getCapability("status").set('editing', true);
|
||||
if (!this.isRoot(domainObject)){
|
||||
statusListener = this.root.getCapability("status").listen(function(statuses){
|
||||
if (statuses.indexOf("editing") < 0 ){
|
||||
editableObject.getCapability("status").set("editing", false);
|
||||
statusListener();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return editableObject;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user