only do dom operations in the update function

This commit is contained in:
Fabian Jakobs 2011-02-18 15:46:15 +01:00
commit fbff87f0b2
2 changed files with 9 additions and 7 deletions

View file

@ -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