ehmorris/jQuery.birdseye

Updating the window position during drag doesn't work

Opened this issue · 0 comments

Using jQuery UI's draggable method, doing this function during drag doesn't work:

function() {
  var new_birdseye_top = parseInt($('#birdseye-location').css('top'));
  var new_viewpport_top = (new_birdseye_top + 
                            (birdseye_constants.content_dist_from_top
                            / birdseye_constants.divisor)) 
                          * birdseye_constants.divisor;
  // scroll window to new position
  window.scrollTo(window.scrollX, new_viewpport_top);
}

Since the birdseye div is in the window, even though it's position fixed, updating the window position during drag moves the viewport indicator sporadically.