allow ace_line divs to be sized automatically

This commit is contained in:
nightwing 2011-05-22 13:24:04 +05:00 committed by Fabian Jakobs
commit baf69381ea

View file

@ -211,8 +211,6 @@ var Text = function(parentEl) {
var tokens = this.session.getTokens(i, i);
this.$renderLine(html, i, tokens[0].tokens);
lineElement = dom.setInnerHtml(lineElement, html.join(""));
lineElement.style.height =
this.session.getRowHeight(config, i) + "px";
i = this.session.getRowFoldEnd(i);
}
@ -270,9 +268,6 @@ var Text = function(parentEl) {
var lineEl = dom.createElement("div");
lineEl.className = "ace_line";
var style = lineEl.style;
style.height = this.session.getRowHeight(config, row) + "px";
style.width = config.width + "px";
var html = [];
// Get the tokens per line as there might be some lines in between
@ -312,9 +307,7 @@ var Text = function(parentEl) {
if(row > lastRow)
break;
html.push("<div class='ace_line' style='height:",
this.session.getRowHeight(config, row) + "px;", "width", config.width + "px'>"
)
html.push("<div class='ace_line'>")
// Get the tokens per line as there might be some lines in between
// beeing folded.
// OPTIMIZE: If there is a long block of unfolded lines, just make