Skip to content
Browse files

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

  • Loading branch information...
1 parent 1557004 commit 73f68abfc124531bda1806b3eb1cda57e66de4f1 @danyaPostfactum danyaPostfactum committed with nightwing
View
2 lib/ace/css/editor.css
@@ -148,7 +148,7 @@
box-sizing: border-box;
}
-.ace_cursor.ace_hidden {
+.ace_hidden-cursors .ace_cursor {
opacity: 0.2;
}
View
2 lib/ace/keyboard/emacs.js
@@ -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
24 lib/ace/layer/cursor.js
@@ -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");
}
};
View
2 lib/ace/theme/ambiance.css
@@ -66,7 +66,7 @@
border-left: 1px solid #7991E8;
}
-.ace-ambiance .ace_cursor.ace_overwrite {
+.ace-ambiance .ace_overwrite-cursors .ace_cursor {
border: 1px solid #FFE300;
background: #766B13;
}
View
2 lib/ace/theme/chrome.css
@@ -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
2 lib/ace/theme/clouds.css
@@ -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
}
View
2 lib/ace/theme/clouds_midnight.css
@@ -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
2 lib/ace/theme/cobalt.css
@@ -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
}
View
2 lib/ace/theme/crimson_editor.css
@@ -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
2 lib/ace/theme/dawn.css
@@ -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
}
View
2 lib/ace/theme/dreamweaver.css
@@ -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
2 lib/ace/theme/github.css
@@ -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;
}
View
2 lib/ace/theme/idle_fingers.css
@@ -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
}
View
2 lib/ace/theme/kr_theme.css
@@ -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
}
View
2 lib/ace/theme/merbivore.css
@@ -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
}
View
2 lib/ace/theme/merbivore_soft.css
@@ -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
}
View
4 lib/ace/theme/mono_industrial.css
@@ -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
-}
+}
View
2 lib/ace/theme/monokai.css
@@ -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
}
View
2 lib/ace/theme/pastel_on_dark.css
@@ -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
}
View
2 lib/ace/theme/solarized_dark.css
@@ -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
}
View
2 lib/ace/theme/solarized_light.css
@@ -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
}
View
2 lib/ace/theme/textmate.css
@@ -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;
}
View
2 lib/ace/theme/tomorrow.css
@@ -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
}
View
2 lib/ace/theme/tomorrow_night.css
@@ -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
}
View
2 lib/ace/theme/tomorrow_night_blue.css
@@ -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
}
View
2 lib/ace/theme/tomorrow_night_bright.css
@@ -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
}
View
2 lib/ace/theme/tomorrow_night_eighties.css
@@ -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
}
View
2 lib/ace/theme/twilight.css
@@ -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
}
View
2 lib/ace/theme/vibrant_ink.css
@@ -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
2 lib/ace/theme/xcode.css
@@ -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
2 tool/Theme.tmpl.css
@@ -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.
Something went wrong with that request. Please try again.