fix(dashboard): fix temperature chart for IE

This commit is contained in:
KostyaDanovsky 2017-09-20 13:04:14 +03:00
parent a0fbdf3636
commit ada2666ea4
4 changed files with 18 additions and 7 deletions

View file

@ -1,6 +1,5 @@
import {
Component, HostListener, ViewChild, ElementRef, Input, Output, EventEmitter, AfterViewInit, OnChanges,
ChangeDetectorRef,
} from '@angular/core';
const VIEW_BOX_SIZE = 300;
@ -76,14 +75,16 @@ export class TemperatureDraggerComponent implements AfterViewInit, OnChanges {
private isMouseDown = false;
private init = false;
constructor(private changeDetectorRef: ChangeDetectorRef) {
constructor() {
this.oldValue = this.value;
}
ngAfterViewInit(): void {
this.invalidate();
this.init = true;
this.changeDetectorRef.detectChanges();
// IE fix
setTimeout(() => {
this.invalidate();
this.init = true;
});
}
ngOnChanges(): void {