package
This commit is contained in:
parent
620ed6ea48
commit
b8237e3f4b
6 changed files with 75 additions and 15 deletions
|
|
@ -17683,7 +17683,7 @@ var Text = function(parentEl) {
|
||||||
|
|
||||||
var html = [];
|
var html = [];
|
||||||
var tokens = this.session.getTokens(i, i);
|
var tokens = this.session.getTokens(i, i);
|
||||||
this.$renderLine(html, i, tokens[0].tokens, true);
|
this.$renderLine(html, i, tokens[0].tokens, !this.$useLineGroups());
|
||||||
lineElement = dom.setInnerHtml(lineElement, html.join(""));
|
lineElement = dom.setInnerHtml(lineElement, html.join(""));
|
||||||
|
|
||||||
i = this.session.getRowFoldEnd(i);
|
i = this.session.getRowFoldEnd(i);
|
||||||
|
|
@ -17752,9 +17752,14 @@ var Text = function(parentEl) {
|
||||||
|
|
||||||
// don't use setInnerHtml since we are working with an empty DIV
|
// don't use setInnerHtml since we are working with an empty DIV
|
||||||
container.innerHTML = html.join("");
|
container.innerHTML = html.join("");
|
||||||
var lines = container.childNodes
|
if (this.$useLineGroups()) {
|
||||||
while(lines.length)
|
container.className = 'ace_line_group';
|
||||||
fragment.appendChild(lines[0]);
|
fragment.appendChild(container);
|
||||||
|
} else {
|
||||||
|
var lines = container.childNodes
|
||||||
|
while(lines.length)
|
||||||
|
fragment.appendChild(lines[0]);
|
||||||
|
}
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
|
|
@ -17781,6 +17786,9 @@ var Text = function(parentEl) {
|
||||||
if(row > lastRow)
|
if(row > lastRow)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (this.$useLineGroups())
|
||||||
|
html.push("<div class='ace_line_group'>")
|
||||||
|
|
||||||
// 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
|
||||||
|
|
@ -17789,6 +17797,9 @@ var Text = function(parentEl) {
|
||||||
if (tokens.length == 1)
|
if (tokens.length == 1)
|
||||||
this.$renderLine(html, row, tokens[0].tokens, false);
|
this.$renderLine(html, row, tokens[0].tokens, false);
|
||||||
|
|
||||||
|
if (this.$useLineGroups())
|
||||||
|
html.push("</div>"); // end the line group
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
this.element = dom.setInnerHtml(this.element, html.join(""));
|
this.element = dom.setInnerHtml(this.element, html.join(""));
|
||||||
|
|
@ -17999,6 +18010,15 @@ var Text = function(parentEl) {
|
||||||
this.$renderLineCore(stringBuilder, row, renderTokens, splits, onlyContents);
|
this.$renderLineCore(stringBuilder, row, renderTokens, splits, onlyContents);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.$useLineGroups = function() {
|
||||||
|
// For the updateLines function to work correctly, it's important that the
|
||||||
|
// child nodes of this.element correspond on a 1-to-1 basis to rows in the
|
||||||
|
// document (as distinct from lines on the screen). For sessions that are
|
||||||
|
// wrapped, this means we need to add a layer to the node hierarchy (tagged
|
||||||
|
// with the class name ace_line_group).
|
||||||
|
return this.session.getUseWrapMode();
|
||||||
|
};
|
||||||
|
|
||||||
this.destroy = function() {
|
this.destroy = function() {
|
||||||
clearInterval(this.$pollSizeChangesTimer);
|
clearInterval(this.$pollSizeChangesTimer);
|
||||||
if (this.$measureNode)
|
if (this.$measureNode)
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -14484,7 +14484,7 @@ var Text = function(parentEl) {
|
||||||
|
|
||||||
var html = [];
|
var html = [];
|
||||||
var tokens = this.session.getTokens(i, i);
|
var tokens = this.session.getTokens(i, i);
|
||||||
this.$renderLine(html, i, tokens[0].tokens, true);
|
this.$renderLine(html, i, tokens[0].tokens, !this.$useLineGroups());
|
||||||
lineElement = dom.setInnerHtml(lineElement, html.join(""));
|
lineElement = dom.setInnerHtml(lineElement, html.join(""));
|
||||||
|
|
||||||
i = this.session.getRowFoldEnd(i);
|
i = this.session.getRowFoldEnd(i);
|
||||||
|
|
@ -14553,9 +14553,14 @@ var Text = function(parentEl) {
|
||||||
|
|
||||||
// don't use setInnerHtml since we are working with an empty DIV
|
// don't use setInnerHtml since we are working with an empty DIV
|
||||||
container.innerHTML = html.join("");
|
container.innerHTML = html.join("");
|
||||||
var lines = container.childNodes
|
if (this.$useLineGroups()) {
|
||||||
while(lines.length)
|
container.className = 'ace_line_group';
|
||||||
fragment.appendChild(lines[0]);
|
fragment.appendChild(container);
|
||||||
|
} else {
|
||||||
|
var lines = container.childNodes
|
||||||
|
while(lines.length)
|
||||||
|
fragment.appendChild(lines[0]);
|
||||||
|
}
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
|
|
@ -14582,6 +14587,9 @@ var Text = function(parentEl) {
|
||||||
if(row > lastRow)
|
if(row > lastRow)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (this.$useLineGroups())
|
||||||
|
html.push("<div class='ace_line_group'>")
|
||||||
|
|
||||||
// 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
|
||||||
|
|
@ -14590,6 +14598,9 @@ var Text = function(parentEl) {
|
||||||
if (tokens.length == 1)
|
if (tokens.length == 1)
|
||||||
this.$renderLine(html, row, tokens[0].tokens, false);
|
this.$renderLine(html, row, tokens[0].tokens, false);
|
||||||
|
|
||||||
|
if (this.$useLineGroups())
|
||||||
|
html.push("</div>"); // end the line group
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
this.element = dom.setInnerHtml(this.element, html.join(""));
|
this.element = dom.setInnerHtml(this.element, html.join(""));
|
||||||
|
|
@ -14800,6 +14811,15 @@ var Text = function(parentEl) {
|
||||||
this.$renderLineCore(stringBuilder, row, renderTokens, splits, onlyContents);
|
this.$renderLineCore(stringBuilder, row, renderTokens, splits, onlyContents);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.$useLineGroups = function() {
|
||||||
|
// For the updateLines function to work correctly, it's important that the
|
||||||
|
// child nodes of this.element correspond on a 1-to-1 basis to rows in the
|
||||||
|
// document (as distinct from lines on the screen). For sessions that are
|
||||||
|
// wrapped, this means we need to add a layer to the node hierarchy (tagged
|
||||||
|
// with the class name ace_line_group).
|
||||||
|
return this.session.getUseWrapMode();
|
||||||
|
};
|
||||||
|
|
||||||
this.destroy = function() {
|
this.destroy = function() {
|
||||||
clearInterval(this.$pollSizeChangesTimer);
|
clearInterval(this.$pollSizeChangesTimer);
|
||||||
if (this.$measureNode)
|
if (this.$measureNode)
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -14473,7 +14473,7 @@ var Text = function(parentEl) {
|
||||||
|
|
||||||
var html = [];
|
var html = [];
|
||||||
var tokens = this.session.getTokens(i, i);
|
var tokens = this.session.getTokens(i, i);
|
||||||
this.$renderLine(html, i, tokens[0].tokens, true);
|
this.$renderLine(html, i, tokens[0].tokens, !this.$useLineGroups());
|
||||||
lineElement = dom.setInnerHtml(lineElement, html.join(""));
|
lineElement = dom.setInnerHtml(lineElement, html.join(""));
|
||||||
|
|
||||||
i = this.session.getRowFoldEnd(i);
|
i = this.session.getRowFoldEnd(i);
|
||||||
|
|
@ -14542,9 +14542,14 @@ var Text = function(parentEl) {
|
||||||
|
|
||||||
// don't use setInnerHtml since we are working with an empty DIV
|
// don't use setInnerHtml since we are working with an empty DIV
|
||||||
container.innerHTML = html.join("");
|
container.innerHTML = html.join("");
|
||||||
var lines = container.childNodes
|
if (this.$useLineGroups()) {
|
||||||
while(lines.length)
|
container.className = 'ace_line_group';
|
||||||
fragment.appendChild(lines[0]);
|
fragment.appendChild(container);
|
||||||
|
} else {
|
||||||
|
var lines = container.childNodes
|
||||||
|
while(lines.length)
|
||||||
|
fragment.appendChild(lines[0]);
|
||||||
|
}
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
|
|
@ -14571,6 +14576,9 @@ var Text = function(parentEl) {
|
||||||
if(row > lastRow)
|
if(row > lastRow)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (this.$useLineGroups())
|
||||||
|
html.push("<div class='ace_line_group'>")
|
||||||
|
|
||||||
// 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
|
||||||
|
|
@ -14579,6 +14587,9 @@ var Text = function(parentEl) {
|
||||||
if (tokens.length == 1)
|
if (tokens.length == 1)
|
||||||
this.$renderLine(html, row, tokens[0].tokens, false);
|
this.$renderLine(html, row, tokens[0].tokens, false);
|
||||||
|
|
||||||
|
if (this.$useLineGroups())
|
||||||
|
html.push("</div>"); // end the line group
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
this.element = dom.setInnerHtml(this.element, html.join(""));
|
this.element = dom.setInnerHtml(this.element, html.join(""));
|
||||||
|
|
@ -14789,6 +14800,15 @@ var Text = function(parentEl) {
|
||||||
this.$renderLineCore(stringBuilder, row, renderTokens, splits, onlyContents);
|
this.$renderLineCore(stringBuilder, row, renderTokens, splits, onlyContents);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.$useLineGroups = function() {
|
||||||
|
// For the updateLines function to work correctly, it's important that the
|
||||||
|
// child nodes of this.element correspond on a 1-to-1 basis to rows in the
|
||||||
|
// document (as distinct from lines on the screen). For sessions that are
|
||||||
|
// wrapped, this means we need to add a layer to the node hierarchy (tagged
|
||||||
|
// with the class name ace_line_group).
|
||||||
|
return this.session.getUseWrapMode();
|
||||||
|
};
|
||||||
|
|
||||||
this.destroy = function() {
|
this.destroy = function() {
|
||||||
clearInterval(this.$pollSizeChangesTimer);
|
clearInterval(this.$pollSizeChangesTimer);
|
||||||
if (this.$measureNode)
|
if (this.$measureNode)
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue