Looks better when we don't draw the turned of lighthouses at all

pull/3/head
Jelmer van der Linde 2017-08-31 18:16:02 +02:00
rodzic 1686265a99
commit 50c439fedf
1 zmienionych plików z 9 dodań i 5 usunięć

Wyświetl plik

@ -109,12 +109,16 @@
if (!this._canvas)
return;
let radius = Math.min(this.options.iconSize[0], this.options.iconSize[1]);
let ctx = this._canvas.getContext('2d');
ctx.beginPath();
ctx.arc(this.options.iconSize[0], this.options.iconSize[1], radius, 0, 2 * Math.PI);
ctx.fillStyle = state ? '#ff0' : '#000';
ctx.fill();
ctx.clearRect(0, 0, this.options.iconSize[0] * 2, this.options.iconSize[1] * 2);
if (state) {
let radius = Math.min(this.options.iconSize[0], this.options.iconSize[1]);
ctx.beginPath();
ctx.arc(this.options.iconSize[0], this.options.iconSize[1], radius, 0, 2 * Math.PI);
ctx.fillStyle = '#ff0';
ctx.fill();
}
this._state = state;
}