kopia lustrzana https://github.com/geodienst/lighthousemap
Looks better when we don't draw the turned of lighthouses at all
rodzic
1686265a99
commit
50c439fedf
14
index.html
14
index.html
|
@ -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;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue