()
| 389 | } |
| 390 | |
| 391 | _getDefaultStyle() { |
| 392 | const target = {}; |
| 393 | if (this.color) { |
| 394 | target.fill = new FillStyle({ |
| 395 | color: this.toRGBA(this.color) |
| 396 | }); |
| 397 | } |
| 398 | if (this.radius) { |
| 399 | target.radius = this.radius; |
| 400 | } |
| 401 | if (this.outline) { |
| 402 | target.stroke = new FillStyle({ |
| 403 | color: this.toRGBA(this.color), |
| 404 | width: this.strokeWidth |
| 405 | }); |
| 406 | } |
| 407 | return new CircleStyle(target); |
| 408 | } |
| 409 | |
| 410 | toRGBA(colorArray) { |
| 411 | return `rgba(${colorArray[0]},${colorArray[1]},${colorArray[2]},${(colorArray[3] || 255) / 255})`; |
no test coverage detected