Commit 32022f84 authored by Ujvari Gergely's avatar Ujvari Gergely

Hovering above an annotation card highlights its quote for search results too.

Not it has the same behaviour as the Viewer in this fascion.
parent 11509e51
......@@ -763,6 +763,8 @@ class Viewer
class Search
this.$inject = ['$filter', '$location', '$routeParams', '$scope', 'annotator']
constructor: ($filter, $location, $routeParams, $scope, annotator) ->
{provider, threading} = annotator
$scope.highlighter = '<span class="search-hl-active">$&</span>'
$scope.filter_orderBy = $filter('orderBy')
$scope.render_order = {}
......@@ -811,6 +813,15 @@ class Search
result = true
result
$scope.focus = (annotation) ->
if angular.isArray annotation
highlights = (a.$$tag for a in annotation when a?)
else if angular.isObject annotation
highlights = [annotation.$$tag]
else
highlights = []
provider.notify method: 'setActiveHighlights', params: highlights
refresh = =>
$scope.search_filter = $routeParams.matched
heatmap = annotator.plugins.Heatmap
......
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