fix editor rendering bugs
This commit is contained in:
parent
5b465da4e3
commit
7c42e9517a
2 changed files with 6 additions and 8 deletions
|
|
@ -145,6 +145,7 @@ var Text = function(parentEl) {
|
|||
|
||||
this.updateLines = function(layerConfig, firstRow, lastRow) {
|
||||
this.$computeTabString();
|
||||
this.config = layerConfig;
|
||||
|
||||
var first = Math.max(firstRow, layerConfig.firstRow);
|
||||
var last = Math.min(lastRow, layerConfig.lastRow);
|
||||
|
|
@ -234,6 +235,7 @@ var Text = function(parentEl) {
|
|||
|
||||
this.update = function(config) {
|
||||
this.$computeTabString();
|
||||
this.config = config;
|
||||
|
||||
var html = [];
|
||||
var _self = this;
|
||||
|
|
|
|||
|
|
@ -61,14 +61,14 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
this.setTheme(theme);
|
||||
|
||||
this.scroller = document.createElement("div");
|
||||
this.scroller.className = "ace_scroller";
|
||||
this.container.appendChild(this.scroller);
|
||||
|
||||
this.$gutter = document.createElement("div");
|
||||
this.$gutter.className = "ace_gutter";
|
||||
this.container.appendChild(this.$gutter);
|
||||
|
||||
this.scroller = document.createElement("div");
|
||||
this.scroller.className = "ace_scroller";
|
||||
this.container.appendChild(this.scroller);
|
||||
|
||||
this.content = document.createElement("div");
|
||||
this.content.style.position = "absolute";
|
||||
this.scroller.appendChild(this.content);
|
||||
|
|
@ -375,10 +375,6 @@ var VirtualRenderer = function(container, theme) {
|
|||
else if (changes & this.CHANGE_LINES) {
|
||||
this.$updateLines();
|
||||
this.$updateScrollBar();
|
||||
}
|
||||
else if (changes & this.CHANGE_SCROLL) {
|
||||
this.$textLayer.scrollLines(this.layerConfig);
|
||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
||||
} if (changes & this.CHANGE_GUTTER) {
|
||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue