mirror of
https://github.com/nasa/openmct.git
synced 2024-12-21 14:07:50 +00:00
fixes #2130
fix lingering event listener that was caused by function (setSelection) being stored in two different locations, causing pointer mis match
This commit is contained in:
parent
0fa4486dcf
commit
00ecd27bb3
@ -87,7 +87,8 @@ define(
|
||||
'setDisplayedValue',
|
||||
'subscribeToObject',
|
||||
'unsubscribe',
|
||||
'updateView'
|
||||
'updateView',
|
||||
'setSelection'
|
||||
].forEach(function (name) {
|
||||
self[name] = self[name].bind(self);
|
||||
});
|
||||
@ -170,7 +171,7 @@ define(
|
||||
|
||||
if (self.selectedElementProxy) {
|
||||
// Update the selected element with the new
|
||||
// value since newDomainOject is mutated.
|
||||
// value since newDomainOject is mutated.fde
|
||||
self.selectedElementProxy.element = elements[index];
|
||||
}
|
||||
refreshElements();
|
||||
@ -224,7 +225,7 @@ define(
|
||||
// Respond to external bounds changes
|
||||
this.openmct.time.on("bounds", updateDisplayBounds);
|
||||
|
||||
this.openmct.selection.on('change', this.setSelection.bind(this));
|
||||
this.openmct.selection.on('change', this.setSelection);
|
||||
this.$element.on('click', this.bypassSelection.bind(this));
|
||||
this.unlisten = this.openmct.objects.observe(this.newDomainObject, '*', function (obj) {
|
||||
this.newDomainObject = JSON.parse(JSON.stringify(obj));
|
||||
|
Loading…
Reference in New Issue
Block a user