fix gutter rendering when scrolling
This commit is contained in:
parent
b73c259b01
commit
f0accfee83
2 changed files with 5 additions and 5 deletions
|
|
@ -42,8 +42,8 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_gutter.horscroll {
|
.ace_scroller.horscroll {
|
||||||
box-shadow: 0px 0px 20px rgba(0,0,0,0.4);
|
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_gutter-cell {
|
.ace_gutter-cell {
|
||||||
|
|
|
||||||
|
|
@ -472,7 +472,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$updateGutterLineHighlight = function() {
|
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";
|
this.$gutterLineHighlight.style.height = this.layerConfig.lineHeight + "px";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -782,7 +782,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
// For debugging.
|
// For debugging.
|
||||||
// console.log(JSON.stringify(this.layerConfig));
|
// 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.marginTop = (-offset) + "px";
|
||||||
this.content.style.width = longestLine + 2 * this.$padding + "px";
|
this.content.style.width = longestLine + 2 * this.$padding + "px";
|
||||||
this.content.style.height = minHeight + "px";
|
this.content.style.height = minHeight + "px";
|
||||||
|
|
@ -1107,7 +1107,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
this.scrollToX = function(scrollLeft) {
|
this.scrollToX = function(scrollLeft) {
|
||||||
if (scrollLeft <= this.$padding)
|
if (scrollLeft < 0)
|
||||||
scrollLeft = 0;
|
scrollLeft = 0;
|
||||||
|
|
||||||
if (this.scrollLeft !== scrollLeft)
|
if (this.scrollLeft !== scrollLeft)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue