a bad idea caused problems: no more Cell.getColor()
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user