Review of many feature switches and iframe context; fix OH-vis when ranges are not given

This commit is contained in:
Pieter Vander Vennet 2024-06-23 02:54:53 +02:00
parent ecfa7d3d1d
commit afea9adacb
21 changed files with 157 additions and 88 deletions

View file

@ -1,4 +1,3 @@
import colors from "./assets/colors.json"
import DOMPurify from "dompurify"
export class Utils {
@ -8,7 +7,6 @@ export class Utils {
* This is a workaround and yet another hack
*/
public static runningFromConsole = typeof window === "undefined"
public static readonly assets_path = "./assets/svg/"
public static externalDownloadFunction: (
url: string,
headers?: any
@ -146,6 +144,9 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
}
>()
public static readonly isIframe = !Utils.runningFromConsole && window !== window.top
public static initDomPurify() {
if (Utils.runningFromConsole) {
return