fix: remove IE checks and conditions
This commit is contained in:
@@ -239,13 +239,7 @@
|
||||
|
||||
<clr-dropdown-menu clrPosition="bottom-left" *clrIfOpen>
|
||||
<div (click)="downloadSVG()" clrDropdownItem>SVG</div>
|
||||
<div
|
||||
*ngIf="!helperService.isMicrosoft"
|
||||
(click)="downloadPNG()"
|
||||
clrDropdownItem
|
||||
>
|
||||
PNG
|
||||
</div>
|
||||
<div (click)="downloadPNG()" clrDropdownItem>PNG</div>
|
||||
<div (click)="downloadDot()" clrDropdownItem>Dot</div>
|
||||
<div *ngIf="flatdata" (click)="downloadCSV()" clrDropdownItem>
|
||||
CSV
|
||||
@@ -366,13 +360,7 @@
|
||||
|
||||
<clr-dropdown-menu clrPosition="bottom-left" *clrIfOpen>
|
||||
<div (click)="renderToDownload('SVG')" clrDropdownItem>SVG</div>
|
||||
<div
|
||||
*ngIf="!helperService.isMicrosoft"
|
||||
(click)="renderToDownload('PNG')"
|
||||
clrDropdownItem
|
||||
>
|
||||
PNG
|
||||
</div>
|
||||
<div (click)="renderToDownload('PNG')" clrDropdownItem>PNG</div>
|
||||
<div (click)="downloadDot(); cancelRenderingGraph()" clrDropdownItem>
|
||||
Dot
|
||||
</div>
|
||||
|
||||
@@ -11,12 +11,8 @@ const librariesToShow = 50
|
||||
export class HelperService {
|
||||
public shownLibraries: number = librariesToShow
|
||||
public loadMoreCount: number = librariesToShow
|
||||
public isMicrosoft: boolean = false
|
||||
|
||||
constructor(private sasService: SasService) {
|
||||
this.isMicrosoft = this.isIEorEDGE()
|
||||
console.log('Is IE or Edge?', this.isMicrosoft)
|
||||
}
|
||||
constructor(private sasService: SasService) {}
|
||||
|
||||
/**
|
||||
* Converts a JavaScript date object to a SAS Date or Datetime, given the logic below:
|
||||
@@ -215,32 +211,6 @@ export class HelperService {
|
||||
})
|
||||
}
|
||||
|
||||
public isIEorEDGE() {
|
||||
var ua = window.navigator.userAgent
|
||||
|
||||
var msie = ua.indexOf('MSIE ')
|
||||
if (msie > 0) {
|
||||
// IE 10 or older => return version number
|
||||
return true
|
||||
}
|
||||
|
||||
var trident = ua.indexOf('Trident/')
|
||||
if (trident > 0) {
|
||||
// IE 11 => return version number
|
||||
var rv = ua.indexOf('rv:')
|
||||
return true
|
||||
}
|
||||
|
||||
var edge = ua.indexOf('Edge/')
|
||||
if (edge > 0) {
|
||||
// Edge (IE 12+) => return version number
|
||||
return true
|
||||
}
|
||||
|
||||
// other browser
|
||||
return false
|
||||
}
|
||||
|
||||
public convertObjectsToArray(
|
||||
objectArray: Array<object>,
|
||||
deepClone: boolean = false
|
||||
|
||||
Reference in New Issue
Block a user