From ffb196a3fcf234fca08087b4b3b2e763588486ae Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 21 Nov 2021 02:58:32 +0100 Subject: [PATCH] Removal of obsolete code --- UI/BaseUIElement.ts | 14 -------------- scripts/generateLayouts.ts | 1 - 2 files changed, 15 deletions(-) diff --git a/UI/BaseUIElement.ts b/UI/BaseUIElement.ts index b9c085fa5..eaac95b4b 100644 --- a/UI/BaseUIElement.ts +++ b/UI/BaseUIElement.ts @@ -1,5 +1,4 @@ import {Utils} from "../Utils"; -import {UIEventSource} from "../Logic/UIEventSource"; /** * A thin wrapper around a html element, which allows to generate a HTML-element. @@ -12,7 +11,6 @@ export default abstract class BaseUIElement { private clss: Set = new Set(); private style: string; private _onClick: () => void; - private _onHover: UIEventSource; public onClick(f: (() => void)) { this._onClick = f; @@ -138,18 +136,6 @@ export default abstract class BaseUIElement { el.classList.add("pointer-events-none", "cursor-pointer"); } - if (this._onHover !== undefined) { - const self = this; - el.addEventListener('mouseover', () => self._onHover.setData(true)); - el.addEventListener('mouseout', () => self._onHover.setData(false)); - } - - if (this._onHover !== undefined) { - const self = this; - el.addEventListener('mouseover', () => self._onHover.setData(true)); - el.addEventListener('mouseout', () => self._onHover.setData(false)); - } - return el } catch (e) { const domExc = e as DOMException; diff --git a/scripts/generateLayouts.ts b/scripts/generateLayouts.ts index 685afe438..50c631d2b 100644 --- a/scripts/generateLayouts.ts +++ b/scripts/generateLayouts.ts @@ -7,7 +7,6 @@ import Constants from "../Models/Constants"; import * as all_known_layouts from "../assets/generated/known_layers_and_themes.json" import {LayoutConfigJson} from "../Models/ThemeConfig/Json/LayoutConfigJson"; import LayoutConfig from "../Models/ThemeConfig/LayoutConfig"; -import PrivacyPolicy from "../UI/BigComponents/PrivacyPolicy"; // We HAVE to mark this while importing Utils.runningFromConsole = true;