summaryrefslogtreecommitdiff
path: root/js/lex.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-05-05 01:29:02 -0400
committerJules Laplace <jules@okfoc.us>2015-05-05 01:29:02 -0400
commitfbd3a309bac74fa5b7384f536590f1f2a9d69f72 (patch)
tree10a964d3c7e698687b5844cddf3185847c521d78 /js/lex.js
parent41c77a3357596c566d5b89283980e8d06f84c778 (diff)
change erase mode color
Diffstat (limited to 'js/lex.js')
-rw-r--r--js/lex.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/lex.js b/js/lex.js
index fca7777..6a3127a 100644
--- a/js/lex.js
+++ b/js/lex.js
@@ -17,7 +17,7 @@ Lex.prototype.build = function(){
this.span.innerHTML = this.html()
}
Lex.prototype.css = function(){
- if (this.opacity == 0 && ! this.char) return "fabb"
+ if (this.opacity == 0) return "transparent f" + letters[mod(this.fg,16)]
return "f" + letters[mod(this.fg,16)] + "b" + letters[mod(this.bg,16)]
}
Lex.prototype.html = function(){
@@ -72,10 +72,10 @@ Lex.prototype.clone = function () {
return lex
}
Lex.prototype.erase = function (){
- this.fg = colors.white
- this.bg = colors.black
+ this.fg = fillColor
+ this.bg = fillColor
this.char = " "
- this.opacity = 0
+ this.opacity = 1
this.build()
}
Lex.prototype.fill = function(fg, bg){
@@ -94,7 +94,7 @@ Lex.prototype.ne = function(lex){
return ! this.eq(lex)
}
Lex.prototype.clear = function(){
- this.bg = 1
+ this.bg = fillColor
this.fg = 0
this.char = " "
this.opacity = 0