Skip to content

Commit

Permalink
Merge pull request #160 from pkra/patch-3
Browse files Browse the repository at this point in the history
[content_panel_view] simplify scrolling  to node
  • Loading branch information
Michael Aufreiter committed Apr 20, 2016
2 parents be2e1bc + 1b62ed8 commit ec999c6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions reader/panels/content/content_panel_view.js
Original file line number Diff line number Diff line change
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 ec999c6

Please sign in to comment.