Browse Source
Merge pull request #12102 from vvlladd28/bug/widget-led-indicator
Fixed duplicate led indicators in GPIO panel widgets
pull/12127/head
Igor Kulikov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
3 deletions
-
ui-ngx/src/app/shared/components/led-light.component.ts
|
|
|
@ -85,11 +85,11 @@ export class LedLightComponent implements OnInit, AfterViewInit, OnChanges { |
|
|
|
this.canvasSize = this.size; |
|
|
|
this.radius = this.canvasSize / 4; |
|
|
|
this.glowSize = this.radius / 5; |
|
|
|
if (this.paper) { |
|
|
|
this.paper.remove(); |
|
|
|
} |
|
|
|
import('raphael').then( |
|
|
|
(raphael) => { |
|
|
|
if (this.paper) { |
|
|
|
this.paper.remove(); |
|
|
|
} |
|
|
|
this.paper = raphael.default($('#canvas_container', this.elementRef.nativeElement)[0], this.canvasSize, this.canvasSize); |
|
|
|
const center = this.canvasSize / 2; |
|
|
|
this.circleElement = this.paper.circle(center, center, this.radius); |
|
|
|
|