always add height to line wrapper nodes
(needed for line widgets)
This commit is contained in:
parent
2476f43aa8
commit
a56c3b44b5
1 changed files with 8 additions and 2 deletions
|
|
@ -294,6 +294,7 @@ var Text = function(parentEl) {
|
||||||
this.$renderLine(
|
this.$renderLine(
|
||||||
html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false
|
html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false
|
||||||
);
|
);
|
||||||
|
lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + "px";
|
||||||
dom.setInnerHtml(lineElement, html.join(""));
|
dom.setInnerHtml(lineElement, html.join(""));
|
||||||
}
|
}
|
||||||
row++;
|
row++;
|
||||||
|
|
@ -360,6 +361,8 @@ var Text = function(parentEl) {
|
||||||
if (this.$useLineGroups()) {
|
if (this.$useLineGroups()) {
|
||||||
container.className = 'ace_line_group';
|
container.className = 'ace_line_group';
|
||||||
fragment.appendChild(container);
|
fragment.appendChild(container);
|
||||||
|
container.style.height = config.lineHeight * this.session.getRowLength(row) + "px";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
var lines = container.childNodes
|
var lines = container.childNodes
|
||||||
while(lines.length)
|
while(lines.length)
|
||||||
|
|
@ -391,7 +394,7 @@ var Text = function(parentEl) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (this.$useLineGroups())
|
if (this.$useLineGroups())
|
||||||
html.push("<div class='ace_line_group'>")
|
html.push("<div class='ace_line_group' style='height:", config.lineHeight*this.session.getRowLength(row), "px'>")
|
||||||
|
|
||||||
this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
|
this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
|
||||||
|
|
||||||
|
|
@ -551,7 +554,10 @@ var Text = function(parentEl) {
|
||||||
|
|
||||||
if (!onlyContents) {
|
if (!onlyContents) {
|
||||||
stringBuilder.push(
|
stringBuilder.push(
|
||||||
"<div class='ace_line' style='height:", this.config.lineHeight, "px'>"
|
"<div class='ace_line' style='height:",
|
||||||
|
this.config.lineHeight * (
|
||||||
|
this.$useLineGroups() ? 1 :this.session.getRowLength(row)
|
||||||
|
), "px'>"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue