do not call dom functions if possible
This commit is contained in:
parent
baf69381ea
commit
6464a3852b
1 changed files with 7 additions and 8 deletions
|
|
@ -120,14 +120,13 @@ var Cursor = function(parentEl) {
|
|||
this.cursor.style.width = config.characterWidth + "px";
|
||||
this.cursor.style.height = config.lineHeight + "px";
|
||||
|
||||
if (this.isVisible) {
|
||||
this.element.appendChild(this.cursor);
|
||||
}
|
||||
|
||||
if (this.session.getOverwrite()) {
|
||||
dom.addCssClass(this.cursor, "ace_overwrite");
|
||||
} else {
|
||||
dom.removeCssClass(this.cursor, "ace_overwrite");
|
||||
var overwrite = this.session.getOverwrite()
|
||||
if (overwrite != this.overwrite) {
|
||||
this.overwrite = overwrite;
|
||||
if (overwrite)
|
||||
dom.addCssClass(this.cursor, "ace_overwrite");
|
||||
else
|
||||
dom.removeCssClass(this.cursor, "ace_overwrite");
|
||||
}
|
||||
|
||||
this.restartTimer();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue