use scroller instead of content
because other widgets inheriting from ace do not have renderer.content
This commit is contained in:
parent
ad2d31eef4
commit
07e4eb0a3a
2 changed files with 5 additions and 4 deletions
|
|
@ -118,8 +118,8 @@ function DefaultHandlers(mouseHandler) {
|
|||
editor.selection.clearSelection();
|
||||
}
|
||||
}.bind(this), 0);
|
||||
if (editor.renderer.content.setCapture) {
|
||||
editor.renderer.content.setCapture();
|
||||
if (editor.renderer.scroller.setCapture) {
|
||||
editor.renderer.scroller.setCapture();
|
||||
}
|
||||
editor.setStyle("ace_selecting");
|
||||
this.setState("select");
|
||||
|
|
@ -185,8 +185,8 @@ function DefaultHandlers(mouseHandler) {
|
|||
this.selectByWordsEnd =
|
||||
this.selectByLinesEnd = function() {
|
||||
this.editor.unsetStyle("ace_selecting");
|
||||
if (this.editor.renderer.content.releaseCapture) {
|
||||
this.editor.renderer.content.releaseCapture();
|
||||
if (this.editor.renderer.scroller.releaseCapture) {
|
||||
this.editor.renderer.scroller.releaseCapture();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ define(function(require, exports, module) {
|
|||
|
||||
var MockRenderer = exports.MockRenderer = function(visibleRowCount) {
|
||||
this.container = document.createElement("div");
|
||||
this.scroller = document.createElement("div");
|
||||
this.visibleRowCount = visibleRowCount || 20;
|
||||
|
||||
this.layerConfig = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue