summaryrefslogtreecommitdiff
path: root/js/lex.js
diff options
context:
space:
mode:
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