mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 00:10:14 +01:00
fix(dashboard): fix unhandled exception for temperature dragger
This commit is contained in:
parent
7616cb8a4a
commit
009f5c99c9
2 changed files with 8 additions and 6 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import {
|
||||
Component, HostListener, ViewChild, ElementRef, Input, Output, EventEmitter, AfterViewInit, OnChanges,
|
||||
ChangeDetectorRef,
|
||||
} from '@angular/core';
|
||||
|
||||
const VIEW_BOX_SIZE = 300;
|
||||
|
|
@ -74,13 +75,14 @@ export class TemperatureDraggerComponent implements AfterViewInit, OnChanges {
|
|||
private isMouseDown = false;
|
||||
private init = false;
|
||||
|
||||
constructor() {
|
||||
constructor(private changeDetectorRef: ChangeDetectorRef) {
|
||||
this.oldValue = this.value;
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
this.invalidate();
|
||||
this.init = true;
|
||||
this.changeDetectorRef.detectChanges();
|
||||
}
|
||||
|
||||
ngOnChanges(): void {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue