Commit 26de2224 authored by csillag's avatar csillag

Consistent names for focusing on annotations

parent c94a438f
...@@ -305,7 +305,7 @@ class AnnotationViewerController ...@@ -305,7 +305,7 @@ class AnnotationViewerController
# Provide no-ops until these methods are moved elsewere. They only apply # Provide no-ops until these methods are moved elsewere. They only apply
# to annotations loaded into the stream. # to annotations loaded into the stream.
$scope.activate = angular.noop $scope.focus = angular.noop
$scope.shouldShowThread = -> true $scope.shouldShowThread = -> true
...@@ -335,14 +335,14 @@ class ViewerController ...@@ -335,14 +335,14 @@ class ViewerController
$scope.isEmbedded = true $scope.isEmbedded = true
$scope.isStream = true $scope.isStream = true
$scope.activate = (annotation) -> $scope.focus = (annotation) ->
if angular.isObject annotation if angular.isObject annotation
highlights = [annotation.$$tag] highlights = [annotation.$$tag]
else else
highlights = [] highlights = []
for p in annotator.providers for p in annotator.providers
p.channel.notify p.channel.notify
method: 'setActiveHighlights' method: 'setFocusedHighlights'
params: highlights params: highlights
$scope.scrollTo = (annotation) -> $scope.scrollTo = (annotation) ->
......
...@@ -143,7 +143,7 @@ class Annotator.Guest extends Annotator ...@@ -143,7 +143,7 @@ class Annotator.Guest extends Annotator
if value then @plugins.Heatmap._update() if value then @plugins.Heatmap._update()
) )
.bind('setActiveHighlights', (ctx, tags=[]) => .bind('setFocusedHighlights', (ctx, tags=[]) =>
for hl in @getHighlights() for hl in @getHighlights()
if hl.annotation.$$tag in tags if hl.annotation.$$tag in tags
hl.setActive true, true hl.setActive true, true
......
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
thread="child" thread-filter thread="child" thread-filter
thread-collapsed="!search.query" thread-collapsed="!search.query"
ng-include="'thread.html'" ng-include="'thread.html'"
ng-mouseenter="activate(child.message)" ng-mouseenter="focus(child.message)"
ng-click="scrollTo(child.message)"" ng-click="scrollTo(child.message)""
ng-mouseleave="activate()" ng-mouseleave="focus()"
ng-repeat="child in vm.container.children | orderBy : sort.predicate" ng-repeat="child in vm.container.children | orderBy : sort.predicate"
ng-show="vm.container && shouldShowThread(child) && ng-show="vm.container && shouldShowThread(child) &&
(count('edit') || count('match') || !threadFilter.active())"> (count('edit') || count('match') || !threadFilter.active())">
......
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