allow layers to be sized automatically
This commit is contained in:
parent
83f3f81928
commit
21d2d83af1
2 changed files with 3 additions and 9 deletions
|
|
@ -43,6 +43,7 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_text-layer {
|
.ace_text-layer {
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.container.appendChild(this.scroller);
|
this.container.appendChild(this.scroller);
|
||||||
|
|
||||||
this.content = document.createElement("div");
|
this.content = document.createElement("div");
|
||||||
this.content.style.position = "absolute";
|
this.content.style.cssText = "position:absolute;box-sizing:border-box;" +
|
||||||
|
"-moz-box-sizing:border-box;-webkit-box-sizing:border-box";
|
||||||
this.scroller.appendChild(this.content);
|
this.scroller.appendChild(this.content);
|
||||||
|
|
||||||
this.$gutterLayer = new GutterLayer(this.$gutter);
|
this.$gutterLayer = new GutterLayer(this.$gutter);
|
||||||
|
|
@ -409,14 +410,6 @@ var VirtualRenderer = function(container, theme) {
|
||||||
height : this.$size.scrollerHeight
|
height : this.$size.scrollerHeight
|
||||||
};
|
};
|
||||||
|
|
||||||
for ( var i = 0; i < this.layers.length; i++) {
|
|
||||||
var layer = this.layers[i];
|
|
||||||
if (widthChanged) {
|
|
||||||
var style = layer.element.style;
|
|
||||||
style.width = longestLine + "px";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$gutterLayer.element.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 + "px";
|
this.content.style.width = longestLine + "px";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue