Scrolling fixes
This commit is contained in:
@@ -188,6 +188,7 @@
|
||||
this.handleArrows = this.container.find('.scrollbar-handle-up, .scrollbar-handle-down');
|
||||
this.handleArrowUp = this.container.find('.scrollbar-handle-up');
|
||||
this.handleArrowDown = this.container.find('.scrollbar-handle-down');
|
||||
this.pane_last_top = 0;
|
||||
|
||||
// set some default CSS attributes (may be overwritten by CSS definitions in an external CSS file)
|
||||
this.pane.defaultCss({
|
||||
@@ -388,7 +389,11 @@
|
||||
// derive position of content from position of handle
|
||||
this.pane.top = -1 * this.props.handleContentRatio * this.handle.top;
|
||||
|
||||
// var distance = Math.round(Math.abs(this.pane_last_top - this.pane.top));
|
||||
// $(this.pane[0]).stop().animate({top: this.pane.top}, 10 * distance / Math.sqrt(distance));
|
||||
|
||||
this.pane[0].style.top = this.pane.top + 'px';
|
||||
this.pane_last_top = this.pane.top;
|
||||
},
|
||||
|
||||
|
||||
@@ -398,7 +403,7 @@
|
||||
onMouseWheel: function(ev, delta){
|
||||
|
||||
// calculate new handle position
|
||||
this.handle.top -= delta*5; // awfull fix
|
||||
this.handle.top -= delta*15; // awfull fix
|
||||
|
||||
this.setHandlePosition();
|
||||
this.setContentPosition();
|
||||
|
||||
Reference in New Issue
Block a user