Permalink
Browse files

Retarget css-class changing from each cursor to whole cursor layer

  • Loading branch information...
danyaPostfactum authored and nightwing committed Oct 1, 2012
1 parent 1557004 commit 73f68abfc124531bda1806b3eb1cda57e66de4f1
View
@@ -148,7 +148,7 @@
box-sizing: border-box;
}
-.ace_cursor.ace_hidden {
+.ace_hidden-cursors .ace_cursor {
opacity: 0.2;
}
@@ -66,7 +66,7 @@ exports.handler.attach = function(editor) {
opacity: 1;\
background-color: transparent;\
}\
- .emacs-mode .ace_cursor.ace_overwrite {\
+ .emacs-mode .ace_overwrite-cursors .ace_cursor {\
opacity: 1;\
background-color: transparent;\
border-width: 0 0 2px 2px !important;\
View
@@ -85,13 +85,7 @@ var Cursor = function(parentEl) {
this.addCursor = function() {
var el = dom.createElement("div");
- var className = "ace_cursor";
- if (!this.isVisible)
- className += " ace_hidden";
- if (this.overwrite)
- className += " ace_overwrite";
-
- el.className = className;
+ el.className = "ace_cursor";
this.element.appendChild(el);
this.cursors.push(el);
return el;
@@ -107,15 +101,13 @@ var Cursor = function(parentEl) {
this.hideCursor = function() {
this.isVisible = false;
- for (var i = this.cursors.length; i--; )
- dom.addCssClass(this.cursors[i], "ace_hidden");
+ dom.addCssClass(this.element, "ace_hidden-cursors");
this.resetTimer();
};
this.showCursor = function() {
this.isVisible = true;
- for (var i = this.cursors.length; i--; )
- dom.removeCssClass(this.cursors[i], "ace_hidden");
+ dom.removeCssClass(this.element, "ace_hidden-cursors");
this.resetTimer();
};
@@ -213,12 +205,10 @@ var Cursor = function(parentEl) {
this.$setOverwrite = function(overwrite) {
if (overwrite != this.overwrite) {
this.overwrite = overwrite;
- for (var i = this.cursors.length; i--; ) {
- if (overwrite)
- dom.addCssClass(this.cursors[i], "ace_overwrite");
- else
- dom.removeCssClass(this.cursors[i], "ace_overwrite");
- }
+ if (overwrite)
+ dom.addCssClass(this.element, "ace_overwrite-cursors");
+ else
+ dom.removeCssClass(this.element, "ace_overwrite-cursors");
}
};

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -17,7 +17,7 @@
border-left: 2px solid black;
}
-.ace-chrome .ace_cursor.ace_overwrite {
+.ace-chrome .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid black;
}
View
@@ -20,7 +20,7 @@
border-left: 2px solid #000000
}
-.ace-clouds .ace_cursor.ace_overwrite {
+.ace-clouds .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #000000
}
@@ -20,7 +20,7 @@
border-left: 2px solid #7DA5DC
}
-.ace-clouds-midnight .ace_cursor.ace_overwrite {
+.ace-clouds-midnight .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #7DA5DC
}
View
@@ -20,7 +20,7 @@
border-left: 2px solid #FFFFFF
}
-.ace-cobalt .ace_cursor.ace_overwrite {
+.ace-cobalt .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #FFFFFF
}
@@ -26,7 +26,7 @@
border-left: 2px solid black;
}
-.ace-crimson-editor .ace_cursor.ace_overwrite {
+.ace-crimson-editor .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid black;
}
View
@@ -20,7 +20,7 @@
border-left: 2px solid #000000
}
-.ace-dawn .ace_cursor.ace_overwrite {
+.ace-dawn .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #000000
}
@@ -23,7 +23,7 @@
border-left: 2px solid black;
}
-.ace-dreamweaver .ace_cursor.ace_overwrite {
+.ace-dreamweaver .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid black;
}
View
@@ -70,7 +70,7 @@
border-left: 2px solid black;
}
-.ace-github .ace_cursor.ace_overwrite {
+.ace-github .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid black;
}
@@ -20,7 +20,7 @@
border-left: 2px solid #91FF00
}
-.ace-idle-fingers .ace_cursor.ace_overwrite {
+.ace-idle-fingers .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #91FF00
}
@@ -20,7 +20,7 @@
border-left: 2px solid #FF9900
}
-.ace-kr-theme .ace_cursor.ace_overwrite {
+.ace-kr-theme .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #FF9900
}
@@ -20,7 +20,7 @@
border-left: 2px solid #FFFFFF
}
-.ace-merbivore .ace_cursor.ace_overwrite {
+.ace-merbivore .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #FFFFFF
}
@@ -20,7 +20,7 @@
border-left: 2px solid #FFFFFF
}
-.ace-merbivore-soft .ace_cursor.ace_overwrite {
+.ace-merbivore-soft .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #FFFFFF
}
@@ -20,7 +20,7 @@
border-left: 2px solid #FFFFFF
}
-.ace-mono-industrial .ace_cursor.ace_overwrite {
+.ace-mono-industrial .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #FFFFFF
}
@@ -135,4 +135,4 @@
.ace-mono-industrial .ace_indent-guide {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ0tH4zzBz5sz/ABAOBECKH+evAAAAAElFTkSuQmCC) right repeat-y
-}
+}
@@ -20,7 +20,7 @@
border-left: 2px solid #F8F8F0
}
-.ace-monokai .ace_cursor.ace_overwrite {
+.ace-monokai .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #F8F8F0
}
@@ -20,7 +20,7 @@
border-left: 2px solid #A7A7A7
}
-.ace-pastel-on-dark .ace_cursor.ace_overwrite {
+.ace-pastel-on-dark .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #A7A7A7
}
@@ -22,7 +22,7 @@
border-left: 2px solid #D30102
}
-.ace-solarized-dark .ace_cursor.ace_overwrite {
+.ace-solarized-dark .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #D30102
}
@@ -20,7 +20,7 @@
border-left: 2px solid #000000
}
-.ace-solarized-light .ace_cursor.ace_overwrite {
+.ace-solarized-light .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #000000
}
@@ -20,7 +20,7 @@
border-left: 2px solid black;
}
-.ace-tm .ace_cursor.ace_overwrite {
+.ace-tm .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid black;
}
@@ -20,7 +20,7 @@
border-left: 2px solid #AEAFAD
}
-.ace-tomorrow .ace_cursor.ace_overwrite {
+.ace-tomorrow .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #AEAFAD
}
@@ -20,7 +20,7 @@
border-left: 2px solid #AEAFAD
}
-.ace-tomorrow-night .ace_cursor.ace_overwrite {
+.ace-tomorrow-night .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #AEAFAD
}
@@ -21,7 +21,7 @@
border-left: 2px solid #FFFFFF
}
-.ace-tomorrow-night-blue .ace_cursor.ace_overwrite {
+.ace-tomorrow-night-blue .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #FFFFFF
}
@@ -20,7 +20,7 @@
border-left: 2px solid #9F9F9F
}
-.ace-tomorrow-night-bright .ace_cursor.ace_overwrite {
+.ace-tomorrow-night-bright .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #9F9F9F
}
@@ -21,7 +21,7 @@
border-left: 2px solid #CCCCCC
}
-.ace-tomorrow-night-eighties .ace_cursor.ace_overwrite {
+.ace-tomorrow-night-eighties .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #CCCCCC
}
@@ -20,7 +20,7 @@
border-left: 2px solid #A7A7A7
}
-.ace-twilight .ace_cursor.ace_overwrite {
+.ace-twilight .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #A7A7A7
}
@@ -20,7 +20,7 @@
border-left: 2px solid #FFFFFF
}
-.ace-vibrant-ink .ace_cursor.ace_overwrite {
+.ace-vibrant-ink .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #FFFFFF
}
View
@@ -22,7 +22,7 @@
border-left: 2px solid #000000
}
-.ace-xcode .ace_cursor.ace_overwrite {
+.ace-xcode .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid #000000
}
View
@@ -22,7 +22,7 @@
border-left: 2px solid %cursor%;
}
-.%cssClass% .ace_cursor.ace_overwrite {
+.%cssClass% .ace_overwrite-cursors .ace_cursor {
border-left: 0px;
border-bottom: 1px solid %overwrite%;
}

0 comments on commit 73f68ab

Please sign in to comment.