fix: remove IE checks and conditions

This commit is contained in:
s
2026-01-13 17:00:56 +01:00
parent 8dc18b155a
commit ece6bd1d78
2 changed files with 3 additions and 45 deletions

View File

@@ -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>

View File

@@ -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