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.updateLines = function(layerConfig, firstRow, lastRow) {
|
||||||
this.$computeTabString();
|
this.$computeTabString();
|
||||||
|
this.config = layerConfig;
|
||||||
|
|
||||||
var first = Math.max(firstRow, layerConfig.firstRow);
|
var first = Math.max(firstRow, layerConfig.firstRow);
|
||||||
var last = Math.min(lastRow, layerConfig.lastRow);
|
var last = Math.min(lastRow, layerConfig.lastRow);
|
||||||
|
|
@ -234,6 +235,7 @@ var Text = function(parentEl) {
|
||||||
|
|
||||||
this.update = function(config) {
|
this.update = function(config) {
|
||||||
this.$computeTabString();
|
this.$computeTabString();
|
||||||
|
this.config = config;
|
||||||
|
|
||||||
var html = [];
|
var html = [];
|
||||||
var _self = this;
|
var _self = this;
|
||||||
|
|
|
||||||
|
|
@ -61,14 +61,14 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.setTheme(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 = document.createElement("div");
|
||||||
this.$gutter.className = "ace_gutter";
|
this.$gutter.className = "ace_gutter";
|
||||||
this.container.appendChild(this.$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 = document.createElement("div");
|
||||||
this.content.style.position = "absolute";
|
this.content.style.position = "absolute";
|
||||||
this.scroller.appendChild(this.content);
|
this.scroller.appendChild(this.content);
|
||||||
|
|
@ -375,10 +375,6 @@ var VirtualRenderer = function(container, theme) {
|
||||||
else if (changes & this.CHANGE_LINES) {
|
else if (changes & this.CHANGE_LINES) {
|
||||||
this.$updateLines();
|
this.$updateLines();
|
||||||
this.$updateScrollBar();
|
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) {
|
} if (changes & this.CHANGE_GUTTER) {
|
||||||
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
this.showGutter && this.$gutterLayer.update(this.layerConfig);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue