Skip to content

Commit

Permalink
Merge pull request #408 from spenceralger/bug/vis_editor_agg_pos
Browse files Browse the repository at this point in the history
[vis/editor] keep position buttons in sync
  • Loading branch information
rashidkpc committed Sep 26, 2014
2 parents ab7e7fa + 993e90d commit 580b17e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/kibana/apps/visualize/editor/agg.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ define(function (require) {
$scope.aggTypeOptions = aggTypes.byType[$scope.groupName];
$scope.editorOpen = $scope.agg.brandNew;

$scope.$watch('$index', function (i) {
$scope.$watchMulti([
'$index',
'group.length'
], function () {
var i = $scope.$index;
$scope.$first = i === 0;
$scope.$last = i === $scope.group.length - 1;
});
Expand Down

0 comments on commit 580b17e

Please sign in to comment.