mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 06:08:11 +00:00
[Fixed Position] Use updated selection mechanism
Use updated, more general approach to handling selections. WTD-929.
This commit is contained in:
@ -1,8 +1,8 @@
|
|||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
['./LayoutDrag', './LayoutSelection', './FixedProxy', './elements/ElementProxies'],
|
['./LayoutDrag', './FixedProxy', './elements/ElementProxies'],
|
||||||
function (LayoutDrag, LayoutSelection, FixedProxy, ElementProxies) {
|
function (LayoutDrag, FixedProxy, ElementProxies) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var DEFAULT_DIMENSIONS = [ 2, 1 ],
|
var DEFAULT_DIMENSIONS = [ 2, 1 ],
|
||||||
@ -208,14 +208,8 @@ define(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Track current selection state
|
// Track current selection state
|
||||||
if (Array.isArray($scope.selection)) {
|
selection = $scope.selection;
|
||||||
selection = new LayoutSelection(
|
|
||||||
$scope.selection,
|
|
||||||
new FixedProxy(addElement, $q, dialogService)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Refresh list of elements whenever model changes
|
// Refresh list of elements whenever model changes
|
||||||
$scope.$watch("model.modified", refreshElements);
|
$scope.$watch("model.modified", refreshElements);
|
||||||
|
Reference in New Issue
Block a user