From baf69381ea3598a2a3dc11ba0b1f50eb35439c44 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 22 May 2011 13:24:04 +0500 Subject: [PATCH] allow ace_line divs to be sized automatically --- lib/ace/layer/text.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/ace/layer/text.js b/lib/ace/layer/text.js index bd186433..7c3ced45 100644 --- a/lib/ace/layer/text.js +++ b/lib/ace/layer/text.js @@ -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("
" - ) + html.push("
") // 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