Commit d49960bf authored by Ujvari Gergely's avatar Ujvari Gergely

scope.open was not reinitialized for new searches. Using annotation._open instead

parent 2911f354
......@@ -434,7 +434,6 @@ class Search
refresh = =>
$scope.text_regexp = new RegExp($routeParams.in_body_text,"ig")
$scope.search_filter = $routeParams.matched
$scope.thread = null
heatmap = annotator.plugins.Heatmap
threads = []
for bucket in heatmap.buckets
......@@ -447,6 +446,7 @@ class Search
if children?
for child in children
child.highlightText = child.text
child._open = $scope.search_filter.indexOf(child.id)!=-1
if child.id in $scope.search_filter
hit_in_children = true
if $routeParams.in_body_text and
......@@ -457,6 +457,7 @@ class Search
continue
if $routeParams.whole_document or annotation in $scope.annotations
annotation.highlightText = annotation.text
annotation._open = $scope.search_filter.indexOf(annotation.id)!=-1
if $routeParams.in_body_text and
annotation.text.toLowerCase().indexOf($routeParams.in_body_text) > -1
#Add highlight
......
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