a bad idea caused problems: no more Cell.getColor()

This commit is contained in:
Gavin McDonald
2018-09-15 00:03:36 -04:00
parent d5862b2c97
commit 2c671c2f99
4 changed files with 10 additions and 15 deletions

View File

@@ -1,3 +1,4 @@
import {getColor} from './utils.js';
export default class DrawCircle {
constructor(settings) {
@@ -6,7 +7,7 @@ export default class DrawCircle {
fill(context, scale, x, y, cell) {
context.beginPath();
context.arc(x, y, scale * cell.scale, 0, 2*Math.PI, false);
context.fillStyle = cell.getColor();
context.fillStyle = getColor(cell.color);
context.fill();
}
@@ -14,7 +15,7 @@ export default class DrawCircle {
context.beginPath();
context.arc(x, y, scale * cell.scale, 0, 2*Math.PI, false);
context.lineWidth = cell.width;
context.strokeStyle = cell.getColor();
context.strokeStyle = getColor(cell.color);
context.stroke();
}
}