From b55c277f18a56cb6c6f85df968111f230e828b07 Mon Sep 17 00:00:00 2001 From: timb Date: Sun, 13 Mar 2016 17:46:43 -0700 Subject: rm lex.fill since it is exactly the same fn as lex.assign --- js/lex.js | 7 ------- js/matrix.js | 2 +- js/ui/brush.js | 4 ++-- 3 files changed, 3 insertions(+), 10 deletions(-) (limited to 'js') diff --git a/js/lex.js b/js/lex.js index 70dd2bf..b0d6007 100644 --- a/js/lex.js +++ b/js/lex.js @@ -84,13 +84,6 @@ Lex.prototype.erase = function (){ this.opacity = 1 this.build() } -Lex.prototype.fill = function(lex){ - this.fg = lex.fg - this.bg = lex.bg - this.char = lex.char - this.opacity = lex.opacity - this.build() -} Lex.prototype.eq = function(lex){ return lex && this.fg == lex.fg && this.bg == lex.bg && this.char == lex.char } diff --git a/js/matrix.js b/js/matrix.js index 4c8976c..275e6b6 100644 --- a/js/matrix.js +++ b/js/matrix.js @@ -112,7 +112,7 @@ Matrix.prototype.fill = function(lex){ this.char = lex.char this.opacity = lex.opacity this.forEach(function(el,x,y){ - el.fill(lex) + el.assign(lex) el.build() }) } diff --git a/js/ui/brush.js b/js/ui/brush.js index 8cc858f..668538f 100644 --- a/js/ui/brush.js +++ b/js/ui/brush.js @@ -41,7 +41,7 @@ var brush = (function(){ } else { fillColor = brush.bg - lex.fill(brush) + lex.assign(brush) } brush.focus(x, y) }) @@ -55,7 +55,7 @@ var brush = (function(){ lex.clear() } else { - lex.fill(brush) + lex.assign(brush) } brush.focus(x, y) }) -- cgit v1.2.3-70-g09d2