mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 15:43:48 +00:00
Merge branch 'master' into persist-on-mutation-825
Conflicts: platform/core/src/capabilities/PersistenceCapability.js platform/features/timeline/src/controllers/swimlane/TimelineSwimlaneDropHandler.js
This commit is contained in:
@ -19,12 +19,10 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* The EditRepresenter is responsible for implementing
|
||||
@ -107,8 +105,8 @@ define(
|
||||
|
||||
// Handle a specific representation of a specific domain object
|
||||
EditRepresenter.prototype.represent = function represent(representation, representedObject) {
|
||||
var scope = this.scope,
|
||||
self = this;
|
||||
var scope = this.scope;
|
||||
|
||||
// Track the key, to know which view configuration to save to.
|
||||
this.key = (representation || {}).key;
|
||||
// Track the represented object
|
||||
@ -127,14 +125,14 @@ define(
|
||||
* object representation accordingly
|
||||
*/
|
||||
this.listenHandle = this.domainObject.getCapability('status').listen(function(statuses){
|
||||
if (statuses.indexOf('editing')!=-1){
|
||||
if (statuses.indexOf('editing') !== -1){
|
||||
setEditing();
|
||||
} else {
|
||||
delete scope.viewObjectTemplate;
|
||||
}
|
||||
});
|
||||
|
||||
if (representedObject.getCapability('status').get('editing')){
|
||||
if (representedObject.hasCapability('editor') && representedObject.getCapability('editor').isEditContextRoot()){
|
||||
setEditing();
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user