only do dom operations in the update function
This commit is contained in:
parent
e2ee67f5fc
commit
fbff87f0b2
2 changed files with 9 additions and 7 deletions
|
|
@ -59,12 +59,7 @@ var Cursor = function(parentEl) {
|
|||
|
||||
this.setCursor = function(position, overwrite) {
|
||||
this.position = position;
|
||||
|
||||
if (overwrite) {
|
||||
dom.addCssClass(this.cursor, "ace_overwrite");
|
||||
} else {
|
||||
dom.removeCssClass(this.cursor, "ace_overwrite");
|
||||
}
|
||||
this.overwrite = overwrite;
|
||||
};
|
||||
|
||||
this.hideCursor = function() {
|
||||
|
|
@ -134,6 +129,13 @@ var Cursor = function(parentEl) {
|
|||
if (this.isVisible) {
|
||||
this.element.appendChild(this.cursor);
|
||||
}
|
||||
|
||||
if (overwrite) {
|
||||
dom.addCssClass(this.cursor, "ace_overwrite");
|
||||
} else {
|
||||
dom.removeCssClass(this.cursor, "ace_overwrite");
|
||||
}
|
||||
|
||||
this.restartTimer();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 6e1fbe1dfdff64020f15cd9e23ea72b7803cf406
|
||||
Subproject commit cbfac498d30d43fdb7687d198c5b752736222c2f
|
||||
Loading…
Add table
Add a link
Reference in a new issue