mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 08:20:13 +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">
|
<div class="svg-container">
|
||||||
<svg #svgRoot xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"
|
<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)">
|
[attr.viewBox]="styles.viewBox" preserveAspectRatio="xMinYMin meet" (mousedown)="mouseDown($event)">
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,18 @@
|
||||||
@import '~@nebular/theme/styles/global/bootstrap/hero-buttons';
|
@import '~@nebular/theme/styles/global/bootstrap/hero-buttons';
|
||||||
|
|
||||||
@include nb-install-component() {
|
@include nb-install-component() {
|
||||||
display: flex;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.svg-container {
|
.svg-container {
|
||||||
position: relative;
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
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;
|
||||||
|
|
@ -76,14 +75,16 @@ export class TemperatureDraggerComponent implements AfterViewInit, OnChanges {
|
||||||
private isMouseDown = false;
|
private isMouseDown = false;
|
||||||
private init = false;
|
private init = false;
|
||||||
|
|
||||||
constructor(private changeDetectorRef: ChangeDetectorRef) {
|
constructor() {
|
||||||
this.oldValue = this.value;
|
this.oldValue = this.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit(): void {
|
ngAfterViewInit(): void {
|
||||||
|
// IE fix
|
||||||
|
setTimeout(() => {
|
||||||
this.invalidate();
|
this.invalidate();
|
||||||
this.init = true;
|
this.init = true;
|
||||||
this.changeDetectorRef.detectChanges();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(): void {
|
ngOnChanges(): void {
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
.slider-container {
|
.slider-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
-ms-flex: 1 1 auto;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue