mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 23:40: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
|
|
@ -14,12 +14,12 @@
|
||||||
|
|
||||||
.temperature-bg {
|
.temperature-bg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 94%;
|
width: 84%;
|
||||||
height: 94%;
|
height: 84%;
|
||||||
|
top: 14%;
|
||||||
|
left: 8%;
|
||||||
background-color: lighten(nga-theme(layout-bg), 2%);
|
background-color: lighten(nga-theme(layout-bg), 2%);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
top: 9%;
|
|
||||||
left: 3%;
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
height: 5.25rem;
|
height: 5.25rem;
|
||||||
background-color: nga-theme(card-bg);
|
background-color: nga-theme(card-bg);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
bottom: 0;
|
bottom: 5%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, 50%);
|
transform: translate(-50%, 50%);
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import {
|
import {
|
||||||
Component, HostListener, ViewChild, ElementRef, Input, Output, EventEmitter, AfterViewInit, OnChanges,
|
Component, HostListener, ViewChild, ElementRef, Input, Output, EventEmitter, AfterViewInit, OnChanges,
|
||||||
|
ChangeDetectorRef,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
const VIEW_BOX_SIZE = 300;
|
const VIEW_BOX_SIZE = 300;
|
||||||
|
|
@ -74,13 +75,14 @@ export class TemperatureDraggerComponent implements AfterViewInit, OnChanges {
|
||||||
private isMouseDown = false;
|
private isMouseDown = false;
|
||||||
private init = false;
|
private init = false;
|
||||||
|
|
||||||
constructor() {
|
constructor(private changeDetectorRef: ChangeDetectorRef) {
|
||||||
this.oldValue = this.value;
|
this.oldValue = this.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit(): void {
|
ngAfterViewInit(): void {
|
||||||
this.invalidate();
|
this.invalidate();
|
||||||
this.init = true;
|
this.init = true;
|
||||||
|
this.changeDetectorRef.detectChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(): void {
|
ngOnChanges(): void {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue