mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 16:36:13 +00:00
[Layout] Separate out handleDrop
Separate drop-handling into a non-anonymous function in LayoutController to satisfy code style guidelines; WTD-877.
This commit is contained in:
parent
01d953bf45
commit
ef4ed50605
@ -82,11 +82,8 @@ define(
|
||||
ids.forEach(populatePosition);
|
||||
}
|
||||
|
||||
// Position panes when the model field changes
|
||||
$scope.$watch("model.composition", lookupPanels);
|
||||
|
||||
// Position panes where they are dropped
|
||||
$scope.$on("mctDrop", function (e, id, position) {
|
||||
// Position a panel after a drop event
|
||||
function handleDrop(e, id, position) {
|
||||
// Make sure there is a "panels" field in the
|
||||
// view configuration.
|
||||
$scope.configuration.panels =
|
||||
@ -103,7 +100,13 @@ define(
|
||||
if ($scope.commit) {
|
||||
$scope.commit("Dropped a frame.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Position panes when the model field changes
|
||||
$scope.$watch("model.composition", lookupPanels);
|
||||
|
||||
// Position panes where they are dropped
|
||||
$scope.$on("mctDrop", handleDrop);
|
||||
|
||||
return {
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user