mirror of
https://github.com/nasa/openmct.git
synced 2025-06-21 08:39:59 +00:00
[API] Mark Selection as private
This commit is contained in:
@ -21,6 +21,11 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
define(['EventEmitter'], function (EventEmitter) {
|
define(['EventEmitter'], function (EventEmitter) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manages selection state for Open MCT
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
function Selection() {
|
function Selection() {
|
||||||
EventEmitter.call(this);
|
EventEmitter.call(this);
|
||||||
this.selected = [];
|
this.selected = [];
|
||||||
@ -28,9 +33,9 @@ define(['EventEmitter'], function (EventEmitter) {
|
|||||||
|
|
||||||
Selection.prototype = Object.create(EventEmitter.prototype);
|
Selection.prototype = Object.create(EventEmitter.prototype);
|
||||||
|
|
||||||
Selection.prototype.add = function (path) {
|
Selection.prototype.add = function (context) {
|
||||||
this.clear(); // Only allow single select as initial simplification
|
this.clear(); // Only allow single select as initial simplification
|
||||||
this.selected.push(path);
|
this.selected.push(context);
|
||||||
this.emit('change');
|
this.emit('change');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user