a bad idea caused problems: no more Cell.getColor()
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {FLAT, POINTY} from './consts.js';
|
||||
import {range, toFixed} from './utils.js';
|
||||
import {getColor, range, toFixed} from './utils.js';
|
||||
|
||||
export default class DrawHexagon {
|
||||
constructor(settings) {
|
||||
@@ -46,7 +46,7 @@ export default class DrawHexagon {
|
||||
context.closePath();
|
||||
|
||||
context.lineWidth = cell.width;
|
||||
context.strokeStyle = cell.getColor();
|
||||
context.strokeStyle = getColor(cell.color);
|
||||
context.stroke();
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ export default class DrawHexagon {
|
||||
context.lineTo(x + scale * hexCornerX[4], y + scale * hexCornerY[4]);
|
||||
context.lineTo(x + scale * hexCornerX[5], y + scale * hexCornerY[5]);
|
||||
|
||||
context.fillStyle = cell.getColor();
|
||||
context.fillStyle = getColor(cell.color);
|
||||
context.fill();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user