Skip to content

Commit

Permalink
Fix clicking on parts of annotations that are in a different element …
Browse files Browse the repository at this point in the history
…than where the annotation starts.

Fixes #20.
  • Loading branch information
atrigent committed May 6, 2014
1 parent 19fb28a commit 411e5f4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/assets/javascripts/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@ Sidebar.AnnotationListView = Backbone.View.extend({
$("span.annotator-hl").click(function(event) {
$("ul#annotation-list li").removeClass('hover');
$("span.highlightlink").tooltip('hide');
var str = this.id.toString();
var parts = str.match(/(hl)(.+)/).slice(1);
var targetid = "#sb" + parts[1];
var uuid = $(this).data('annotation').uuid;
var targetid = "#sb" + uuid;

// TODO: deal with the events in a more organized way (recompose them in functions)
$('div#annotation-well').animate({scrollTop:$(targetid).offset().top}, 100, function (){
Expand Down

0 comments on commit 411e5f4

Please sign in to comment.