mirror of
https://github.com/nasa/openmct.git
synced 2025-02-01 00:45:41 +00:00
Selection changes include new selection
This commit is contained in:
parent
8c439d8109
commit
d341a8be97
@ -8,7 +8,7 @@ define(['EventEmitter'], function (EventEmitter) {
|
||||
|
||||
Selection.prototype.select = function (value) {
|
||||
this.selectedValues.push(value);
|
||||
this.emit('change');
|
||||
this.emit('change', this.selectedValues);
|
||||
return this.deselect.bind(this, value);
|
||||
};
|
||||
|
||||
@ -16,7 +16,7 @@ define(['EventEmitter'], function (EventEmitter) {
|
||||
this.selectedValues = this.selectedValues.filter(function (v) {
|
||||
return v !== value;
|
||||
});
|
||||
this.emit('change');
|
||||
this.emit('change', this.selectedValues);
|
||||
};
|
||||
|
||||
Selection.prototype.selected = function () {
|
||||
@ -25,7 +25,7 @@ define(['EventEmitter'], function (EventEmitter) {
|
||||
|
||||
Selection.prototype.clear = function () {
|
||||
this.selectedValues = [];
|
||||
this.emit('change');
|
||||
this.emit('change', this.selectedValues);
|
||||
};
|
||||
|
||||
return Selection;
|
||||
|
Loading…
x
Reference in New Issue
Block a user