Commit 5cafdeaa authored by Aron Carroll's avatar Aron Carroll

Always modify the annotatorUI state

This fixes some issues where the AppController was still manipulating
the local scope and causing the UI to become out of sync.
parent 1cb6e98d
...@@ -127,8 +127,7 @@ class AppController ...@@ -127,8 +127,7 @@ class AppController
$scope.clearSelection = -> $scope.clearSelection = ->
$scope.search.query = '' $scope.search.query = ''
$scope.selectedAnnotations = null annotationUI.clearSelectedAnnotations()
$scope.selectedAnnotationsCount = 0
$scope.dialog = visible: false $scope.dialog = visible: false
...@@ -141,8 +140,7 @@ class AppController ...@@ -141,8 +140,7 @@ class AppController
update: (query) -> update: (query) ->
unless angular.equals $location.search()['q'], query unless angular.equals $location.search()['q'], query
$location.search('q', query or null) $location.search('q', query or null)
delete $scope.selectedAnnotations annotationUI.clearSelectedAnnotations()
delete $scope.selectedAnnotationsCount
$scope.sort = name: 'Location' $scope.sort = name: 'Location'
$scope.threading = threading $scope.threading = threading
...@@ -241,8 +239,8 @@ class ViewerController ...@@ -241,8 +239,8 @@ class ViewerController
params: annotation.$$tag params: annotation.$$tag
$scope.shouldShowThread = (container) -> $scope.shouldShowThread = (container) ->
if $scope.selectedAnnotations? and not container.parent.parent if annotationUI.hasSelectedAnnotations() and not container.parent.parent
$scope.selectedAnnotations[container.message?.id] annotationUI.isAnnotationSelected(container.message?.id)
else else
true true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment