Skip to content

Commit

Permalink
fix indentation in layer/text.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaisucan authored and fjakobs committed Feb 22, 2011
1 parent 8307e6d commit 9ba2816
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions lib/ace/layer/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 9ba2816

Please sign in to comment.