From 9ba281636903bbcfd997857dd155184d18a3f8f1 Mon Sep 17 00:00:00 2001 From: Mihai Sucan Date: Wed, 23 Feb 2011 00:36:32 +0800 Subject: [PATCH] fix indentation in layer/text.js --- lib/ace/layer/text.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/ace/layer/text.js b/lib/ace/layer/text.js index 7f71fc8d..953d4411 100644 --- a/lib/ace/layer/text.js +++ b/lib/ace/layer/text.js @@ -97,27 +97,27 @@ var Text = function(parentEl) { this.$measureSizes = function() { var n = 1000; if (!this.$measureNode) { - var measureNode = this.$measureNode = dom.createElement("div"); - var style = measureNode.style; + var measureNode = this.$measureNode = dom.createElement("div"); + var style = measureNode.style; - style.width = style.height = "auto"; - style.left = style.top = (-n * 40) + "px"; + style.width = style.height = "auto"; + style.left = style.top = (-n * 40) + "px"; - style.visibility = "hidden"; - style.position = "absolute"; - style.overflow = "visible"; - style.whiteSpace = "nowrap"; + style.visibility = "hidden"; + style.position = "absolute"; + style.overflow = "visible"; + style.whiteSpace = "nowrap"; - // in FF 3.6 monospace fonts can have a fixed sub pixel width. - // that's why we have to measure many characters - // Note: characterWidth can be a float! - measureNode.innerHTML = lang.stringRepeat("Xy", n); + // in FF 3.6 monospace fonts can have a fixed sub pixel width. + // that's why we have to measure many characters + // Note: characterWidth can be a float! + measureNode.innerHTML = lang.stringRepeat("Xy", n); var container = this.element.parentNode; while (!dom.hasCssClass(container, "ace_editor")) container = container.parentNode; - container.appendChild(measureNode); + container.appendChild(measureNode); } var style = this.$measureNode.style; @@ -235,7 +235,7 @@ var Text = function(parentEl) { var html = []; if (tokens.length > row-firstRow) - this.$renderLine(html, row, tokens[row-firstRow].tokens); + this.$renderLine(html, row, tokens[row-firstRow].tokens); // don't use setInnerHtml since we are working with an empty DIV lineEl.innerHTML = html.join(""); fragment.appendChild(lineEl);