Skip to content
This repository has been archived by the owner on Mar 5, 2019. It is now read-only.

Commit

Permalink
[content_panel_view] simplify scrolling to node
Browse files Browse the repository at this point in the history
  • Loading branch information
pkra committed Apr 19, 2016
1 parent 11d0232 commit bbd6b2f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions reader/panels/content/content_panel_view.js
Expand Up @@ -59,8 +59,7 @@ ContentPanelView.Prototype = function() {
this.onTocItemSelected = function(nodeId) {
var n = this.findNodeView(nodeId);
if (n) {
var topOffset = $(n).position().top+CORRECTION;
this.surface.$el.scrollTop(topOffset);
n.scrollIntoView();
}
};

Expand Down Expand Up @@ -136,4 +135,4 @@ ContentPanelView.Prototype.prototype = ContainerPanelView.prototype;
ContentPanelView.prototype = new ContentPanelView.Prototype();
ContentPanelView.prototype.constructor = ContentPanelView;

module.exports = ContentPanelView;
module.exports = ContentPanelView;

0 comments on commit bbd6b2f

Please sign in to comment.