a bad idea caused problems: no more Cell.getColor()
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {sqrt2} from './utils.js';
|
||||
import {getColor, sqrt2} from './utils.js';
|
||||
import {FLAT, POINTY} from './consts.js';
|
||||
|
||||
export default class DrawSquare {
|
||||
@@ -22,7 +22,7 @@ export default class DrawSquare {
|
||||
context.lineTo(x + scale * squareCornerX[2], y + scale * squareCornerY[2]);
|
||||
context.lineTo(x + scale * squareCornerX[3], y + scale * squareCornerY[3]);
|
||||
|
||||
context.fillStyle = cell.getColor();
|
||||
context.fillStyle = getColor(cell.color);
|
||||
context.fill();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export default class DrawSquare {
|
||||
context.closePath();
|
||||
|
||||
context.lineWidth = cell.width;
|
||||
context.strokeStyle = cell.getColor();
|
||||
context.strokeStyle = getColor(cell.color);
|
||||
context.stroke();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user