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