[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:
Victor Woeltjen 2015-02-17 10:25:31 -08:00
parent 01d953bf45
commit ef4ed50605

View File

@ -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 {
/**