fix some editor rendering issues

This commit is contained in:
Fabian Jakobs 2010-05-11 10:21:24 +02:00
commit ba21db0feb
3 changed files with 7 additions and 3 deletions

View file

@ -6,8 +6,7 @@
.scroller {
position: absolute;
overflow-x: scroll;
overflow-y: hidden;
cursor: text;
overflow-y: hidden;
}
.gutter {
@ -49,6 +48,7 @@
}
.cursor-layer {
cursor: text;
}
.cursor {

View file

@ -13,6 +13,7 @@ ace.VirtualRenderer = function(container) {
this.container.appendChild(this.$gutter);
this.content = document.createElement("div");
this.content.style.position = "absolute";
this.scroller.appendChild(this.content);
this.$gutterLayer = new ace.layer.Gutter(this.$gutter);
@ -198,10 +199,12 @@ ace.VirtualRenderer = function(container) {
firstRow : firstRow,
lastRow : lastRow,
lineHeight : this.lineHeight,
characterWidth : this.characterWidth
characterWidth : this.characterWidth,
minHeight : minHeight
};
this.content.style.marginTop = (-offset) + "px";
this.content.style.height = minHeight + "px";
for ( var i = 0; i < this.layers.length; i++) {
var layer = this.layers[i];

View file

@ -17,6 +17,7 @@ ace.layer.Gutter = function(parentEl) {
}
this.element.innerHTML = html.join("");
this.element.style.height = config.minHeight + "px";
};
}).call(ace.layer.Gutter.prototype);