fix #1629 Not able to scroll smoothly with a Mac trackpad, when the pointer is inside the editor.

This commit is contained in:
nightwing 2013-10-06 14:05:35 +04:00
commit eb2cfdfdfd

View file

@ -1335,8 +1335,10 @@ var VirtualRenderer = function(container, theme) {
- this.layerConfig.maxHeight - (this.$size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd
< -1 + this.scrollMargin.bottom)
return true;
// todo: better handle horizontal scrolling
if (deltaX)
if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)
return true;
if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth
- this.layerConfig.width < -1 + this.scrollMargin.right)
return true;
};