fix gutter rendering when scrolling

This commit is contained in:
nightwing 2012-05-04 13:04:11 +04:00
commit f0accfee83
2 changed files with 5 additions and 5 deletions

View file

@ -472,7 +472,7 @@ var VirtualRenderer = function(container, theme) {
};
this.$updateGutterLineHighlight = function() {
this.$gutterLineHighlight.style.top = this.$cursorLayer.$pixelPos.top + "px";
this.$gutterLineHighlight.style.top = this.$cursorLayer.$pixelPos.top - this.layerConfig.offset + "px";
this.$gutterLineHighlight.style.height = this.layerConfig.lineHeight + "px";
};
@ -782,7 +782,7 @@ var VirtualRenderer = function(container, theme) {
// For debugging.
// console.log(JSON.stringify(this.layerConfig));
this.$gutter.style.marginTop = (-offset) + "px";
this.$gutterLayer.element.style.marginTop = (-offset) + "px";
this.content.style.marginTop = (-offset) + "px";
this.content.style.width = longestLine + 2 * this.$padding + "px";
this.content.style.height = minHeight + "px";
@ -1107,7 +1107,7 @@ var VirtualRenderer = function(container, theme) {
*
**/
this.scrollToX = function(scrollLeft) {
if (scrollLeft <= this.$padding)
if (scrollLeft < 0)
scrollLeft = 0;
if (this.scrollLeft !== scrollLeft)