Commit 02ca6c59 authored by Randall Leeds's avatar Randall Leeds

Merge pull request #1720 from hypothesis/1634-finding-annotations

[WIP] Restore feature to scroll for annotations
parents aa60b14c fc144ee0
......@@ -345,6 +345,13 @@ class ViewerController
method: 'setActiveHighlights'
params: highlights
$scope.scrollTo = (annotation) ->
if angular.isObject annotation
for p in annotator.providers
p.channel.notify
method: 'scrollTo'
params: annotation.$$tag
$scope.shouldShowThread = (container) ->
if $scope.selectedAnnotations? and not container.parent.parent
$scope.selectedAnnotations[container.message?.id]
......
......@@ -39,6 +39,7 @@
thread-collapsed="!search.query"
ng-include="'thread.html'"
ng-mouseenter="activate(child.message)"
ng-click="scrollTo(child.message)""
ng-mouseleave="activate()"
ng-repeat="child in vm.container.children | orderBy : sort.predicate"
ng-show="vm.container && shouldShowThread(child) &&
......
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