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))
|
||||
return;
|
||||
|
||||
this._signal("beforeRender");
|
||||
// text, scrolling and resize changes can cause the view port size to change
|
||||
if (changes & this.CHANGE_FULL ||
|
||||
changes & this.CHANGE_SIZE ||
|
||||
|
|
@ -666,12 +667,12 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$cursorLayer.update(this.layerConfig);
|
||||
this.$moveTextAreaToCursor();
|
||||
this.$highlightGutterLine && this.$updateGutterLineHighlight();
|
||||
this._signal("afterRender");
|
||||
return;
|
||||
}
|
||||
|
||||
// scrolling
|
||||
if (changes & this.CHANGE_SCROLL) {
|
||||
this.$updateScrollBar();
|
||||
if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
|
||||
this.$textLayer.update(this.layerConfig);
|
||||
else
|
||||
|
|
@ -682,8 +683,10 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$markerBack.update(this.layerConfig);
|
||||
this.$markerFront.update(this.layerConfig);
|
||||
this.$cursorLayer.update(this.layerConfig);
|
||||
this.$moveTextAreaToCursor();
|
||||
this.$highlightGutterLine && this.$updateGutterLineHighlight();
|
||||
this.$moveTextAreaToCursor();
|
||||
this.$updateScrollBar();
|
||||
this._signal("afterRender");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -717,6 +720,8 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
if (changes & this.CHANGE_SIZE)
|
||||
this.$updateScrollBar();
|
||||
|
||||
this._signal("afterRender");
|
||||
};
|
||||
|
||||
this.$computeLayerConfig = function() {
|
||||
|
|
@ -1231,10 +1236,6 @@ var VirtualRenderer = function(container, theme) {
|
|||
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}
|
||||
* @param {String} theme The path to a theme
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue