Reflow review panel layout when adding a comment

This commit is contained in:
James Allen 2016-11-16 16:03:06 +00:00
parent 5d414e9a1b
commit beab95a871

View file

@ -45,23 +45,26 @@ define [
$scope.startNewComment = () ->
$scope.commentState.adding = true
$scope.$broadcast "comment:select_line"
$scope.$broadcast "review-panel:layout"
$timeout () ->
$scope.$broadcast "review-panel:layout"
$scope.submitNewComment = () ->
$scope.commentState.adding = false
$scope.$broadcast "comment:add", $scope.commentState.content
$scope.commentState.content = ""
$scope.$broadcast "review-panel:layout"
$timeout () ->
$scope.$broadcast "review-panel:layout"
$scope.cancelNewComment = (entry) ->
$scope.commentState.adding = false
$scope.commentState.content = ""
$scope.$broadcast "review-panel:layout"
$timeout () ->
$scope.$broadcast "review-panel:layout"
$scope.startReply = (entry) ->
entry.replying = true
$scope.$broadcast "review-panel:layout"
$timeout () ->
$scope.$broadcast "review-panel:layout"
# $scope.handleCommentReplyKeyPress = (ev, entry) ->
# if ev.keyCode == 13 and !ev.shiftKey and !ev.ctrlKey and !ev.metaKey