mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +01:00
fix(dashboard): fix temperature chart for IE
This commit is contained in:
parent
a0fbdf3636
commit
ada2666ea4
4 changed files with 18 additions and 7 deletions
|
|
@ -1,3 +1,5 @@
|
|||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsAQMAAABDsxw2AAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAACJJREFUaN7twTEBAAAAwiD7pzbFPmAAAAAAAAAAAAAAAGQOLbQAAU3zwM4AAAAASUVORK5CYII=">
|
||||
|
||||
<div class="svg-container">
|
||||
<svg #svgRoot xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"
|
||||
[attr.viewBox]="styles.viewBox" preserveAspectRatio="xMinYMin meet" (mousedown)="mouseDown($event)">
|
||||
|
|
|
|||
|
|
@ -2,11 +2,18 @@
|
|||
@import '~@nebular/theme/styles/global/bootstrap/hero-buttons';
|
||||
|
||||
@include nb-install-component() {
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.svg-container {
|
||||
position: relative;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 2;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
.slider-container {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
-ms-flex: 1 1 auto;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue