add beforeRender and after render events
This commit is contained in:
parent
72eccd5283
commit
29d9737b4c
1 changed files with 7 additions and 6 deletions
|
|
@ -632,6 +632,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
if (!force && (!changes || !this.session || !this.container.offsetWidth))
|
if (!force && (!changes || !this.session || !this.container.offsetWidth))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
this._signal("beforeRender");
|
||||||
// text, scrolling and resize changes can cause the view port size to change
|
// text, scrolling and resize changes can cause the view port size to change
|
||||||
if (changes & this.CHANGE_FULL ||
|
if (changes & this.CHANGE_FULL ||
|
||||||
changes & this.CHANGE_SIZE ||
|
changes & this.CHANGE_SIZE ||
|
||||||
|
|
@ -666,12 +667,12 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$cursorLayer.update(this.layerConfig);
|
this.$cursorLayer.update(this.layerConfig);
|
||||||
this.$moveTextAreaToCursor();
|
this.$moveTextAreaToCursor();
|
||||||
this.$highlightGutterLine && this.$updateGutterLineHighlight();
|
this.$highlightGutterLine && this.$updateGutterLineHighlight();
|
||||||
|
this._signal("afterRender");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// scrolling
|
// scrolling
|
||||||
if (changes & this.CHANGE_SCROLL) {
|
if (changes & this.CHANGE_SCROLL) {
|
||||||
this.$updateScrollBar();
|
|
||||||
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
|
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
|
||||||
this.$textLayer.update(this.layerConfig);
|
this.$textLayer.update(this.layerConfig);
|
||||||
else
|
else
|
||||||
|
|
@ -682,8 +683,10 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$markerBack.update(this.layerConfig);
|
this.$markerBack.update(this.layerConfig);
|
||||||
this.$markerFront.update(this.layerConfig);
|
this.$markerFront.update(this.layerConfig);
|
||||||
this.$cursorLayer.update(this.layerConfig);
|
this.$cursorLayer.update(this.layerConfig);
|
||||||
this.$moveTextAreaToCursor();
|
|
||||||
this.$highlightGutterLine && this.$updateGutterLineHighlight();
|
this.$highlightGutterLine && this.$updateGutterLineHighlight();
|
||||||
|
this.$moveTextAreaToCursor();
|
||||||
|
this.$updateScrollBar();
|
||||||
|
this._signal("afterRender");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -717,6 +720,8 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
if (changes & this.CHANGE_SIZE)
|
if (changes & this.CHANGE_SIZE)
|
||||||
this.$updateScrollBar();
|
this.$updateScrollBar();
|
||||||
|
|
||||||
|
this._signal("afterRender");
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$computeLayerConfig = function() {
|
this.$computeLayerConfig = function() {
|
||||||
|
|
@ -1231,10 +1236,6 @@ var VirtualRenderer = function(container, theme) {
|
||||||
this.$composition = null;
|
this.$composition = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
this._loadTheme = function(name, callback) {
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [Sets a new theme for the editor. `theme` should exist, and be a directory path, like `ace/theme/textmate`.]{: #VirtualRenderer.setTheme}
|
* [Sets a new theme for the editor. `theme` should exist, and be a directory path, like `ace/theme/textmate`.]{: #VirtualRenderer.setTheme}
|
||||||
* @param {String} theme The path to a theme
|
* @param {String} theme The path to a theme
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue