kopia lustrzana https://github.com/c9/core
wrapped line rendering fixes from ace
rodzic
63b1a96b96
commit
f3dbec7b88
|
@ -195,6 +195,7 @@ var Text = function(parentEl) {
|
|||
lineElementsIdx ++;
|
||||
}
|
||||
|
||||
var heightChanged = false;
|
||||
var row = first;
|
||||
var foldLine = this.session.getNextFoldLine(row);
|
||||
var foldStart = foldLine ? foldLine.start.row : Infinity;
|
||||
|
@ -214,10 +215,20 @@ var Text = function(parentEl) {
|
|||
this.$renderLine(
|
||||
lineElement, row, row == foldStart ? foldLine : false
|
||||
);
|
||||
lineElement.style.height = (config.lineHeight * this.session.getRowLength(row)) + "px";
|
||||
var height = (config.lineHeight * this.session.getRowLength(row)) + "px";
|
||||
if (lineElement.style.height != height) {
|
||||
heightChanged = true;
|
||||
lineElement.style.height = height;
|
||||
}
|
||||
}
|
||||
row++;
|
||||
}
|
||||
if (heightChanged) {
|
||||
while (lineElementsIdx < this.$lines.cells.length) {
|
||||
var cell = this.$lines.cells[lineElementsIdx++];
|
||||
cell.element.style.top = this.$lines.computeLineTop(cell.row, config, this.session) + "px";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.scrollLines = function(config) {
|
||||
|
|
|
@ -885,7 +885,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$textLayer.scrollLines(config);
|
||||
|
||||
if (this.$showGutter) {
|
||||
if (changes & this.CHANGE_GUTTER)
|
||||
if (changes & this.CHANGE_GUTTER || changes & this.CHANGE_LINES)
|
||||
this.$gutterLayer.update(config);
|
||||
else
|
||||
this.$gutterLayer.scrollLines(config);
|
||||
|
|
Ładowanie…
Reference in New Issue