diff --git a/InitUiElements.ts b/InitUiElements.ts
index 8310b0c..faa8dbb 100644
--- a/InitUiElements.ts
+++ b/InitUiElements.ts
@@ -110,6 +110,16 @@ export class InitUiElements {
InitUiElements.setupAllLayerElements();
+ if (layoutToUse.customCss !== undefined) {
+ var head = document.getElementsByTagName('head')[0];
+ var link = document.createElement('link');
+ link.id = "customCss";
+ link.rel = 'stylesheet';
+ link.type = 'text/css';
+ link.href = layoutToUse.customCss;
+ link.media = 'all';
+ head.appendChild(link);
+ }
function updateFavs() {
const favs = State.state.favouriteLayers.data ?? [];
@@ -269,7 +279,7 @@ export class InitUiElements {
]
if (State.state.featureSwitchShareScreen.data) {
- tabs.push({header: Svg.share_img, content: new ShareScreen()});
+ tabs.push({header: Svg.share, content: new ShareScreen()});
}
if (State.state.featureSwitchMoreQuests.data) {
@@ -282,7 +292,7 @@ export class InitUiElements {
tabs.push({
- header: Svg.help_img,
+ header: Svg.help ,
content: new VariableUiElement(State.state.osmConnection.userDetails.map(userdetails => {
if (userdetails.csCount < State.userJourney.mapCompleteHelpUnlock) {
return ""
@@ -303,8 +313,8 @@ export class InitUiElements {
const fullOptions = this.CreateWelcomePane();
- const help = Svg.help_ui().SetClass("open-welcome-button");
- const close = Svg.close_ui().SetClass("close-welcome-button");
+ const help = Svg.help_svg().SetClass("open-welcome-button");
+ const close = Svg.close_svg().SetClass("close-welcome-button");
const checkbox = new CheckBox(
new Combine([
close,
@@ -328,7 +338,7 @@ export class InitUiElements {
const fullOptions2 = this.CreateWelcomePane();
State.state.fullScreenMessage.setData(fullOptions2)
- Svg.help_ui()
+ Svg.help_svg()
.SetClass("open-welcome-button")
.SetClass("shadow")
.onClick(() => {
@@ -366,14 +376,14 @@ export class InitUiElements {
}
layerControlPanel.SetStyle("display:block;padding:1em;border-radius:1em;");
- const closeButton = Svg.close_ui().SetClass("layer-selection-toggle").SetStyle(" background: #e5f5ff;")
+ const closeButton = Svg.close_svg().SetClass("layer-selection-toggle").SetStyle(" background: var(--subtle-detail-color);")
const checkbox = new CheckBox(
new Combine([
closeButton,
layerControlPanel]).SetStyle("display:flex;flex-direction:row;")
.SetClass("hidden-on-mobile")
,
- Svg.layers_ui().SetClass("layer-selection-toggle"),
+ Svg.layers_svg().SetClass("layer-selection-toggle"),
State.state.layerControlIsOpened
);
diff --git a/Svg.ts b/Svg.ts
index 7a11237..a3a3de1 100644
--- a/Svg.ts
+++ b/Svg.ts
@@ -4,160 +4,199 @@ import {FixedUiElement} from "./UI/Base/FixedUiElement";
export default class Svg {
- public static add = " "
+ public static add = " "
public static add_img = Img.AsImageElement(Svg.add)
+ public static add_svg() { return new FixedUiElement(Svg.add);}
public static add_ui() { return new FixedUiElement(Svg.add_img);}
- public static addSmall = " "
+ public static addSmall = " "
public static addSmall_img = Img.AsImageElement(Svg.addSmall)
+ public static addSmall_svg() { return new FixedUiElement(Svg.addSmall);}
public static addSmall_ui() { return new FixedUiElement(Svg.addSmall_img);}
- public static ampersand = " "
+ public static ampersand = "e "
public static ampersand_img = Img.AsImageElement(Svg.ampersand)
+ public static ampersand_svg() { return new FixedUiElement(Svg.ampersand);}
public static ampersand_ui() { return new FixedUiElement(Svg.ampersand_img);}
- public static arrow_left_smooth = " "
+ public static arrow_left_smooth = " "
public static arrow_left_smooth_img = Img.AsImageElement(Svg.arrow_left_smooth)
+ public static arrow_left_smooth_svg() { return new FixedUiElement(Svg.arrow_left_smooth);}
public static arrow_left_smooth_ui() { return new FixedUiElement(Svg.arrow_left_smooth_img);}
- public static arrow_right_smooth = " "
+ public static arrow_right_smooth = " "
public static arrow_right_smooth_img = Img.AsImageElement(Svg.arrow_right_smooth)
+ public static arrow_right_smooth_svg() { return new FixedUiElement(Svg.arrow_right_smooth);}
public static arrow_right_smooth_ui() { return new FixedUiElement(Svg.arrow_right_smooth_img);}
public static bug = ""
public static bug_img = Img.AsImageElement(Svg.bug)
+ public static bug_svg() { return new FixedUiElement(Svg.bug);}
public static bug_ui() { return new FixedUiElement(Svg.bug_img);}
- public static camera_plus = " "
+ public static camera_plus = " "
public static camera_plus_img = Img.AsImageElement(Svg.camera_plus)
+ public static camera_plus_svg() { return new FixedUiElement(Svg.camera_plus);}
public static camera_plus_ui() { return new FixedUiElement(Svg.camera_plus_img);}
- public static checkmark = ""
+ public static checkmark = ""
public static checkmark_img = Img.AsImageElement(Svg.checkmark)
+ public static checkmark_svg() { return new FixedUiElement(Svg.checkmark);}
public static checkmark_ui() { return new FixedUiElement(Svg.checkmark_img);}
- public static close = " "
+ public static close = " "
public static close_img = Img.AsImageElement(Svg.close)
+ public static close_svg() { return new FixedUiElement(Svg.close);}
public static close_ui() { return new FixedUiElement(Svg.close_img);}
- public static crosshair_blue_center = " "
+ public static crosshair_blue_center = " "
public static crosshair_blue_center_img = Img.AsImageElement(Svg.crosshair_blue_center)
+ public static crosshair_blue_center_svg() { return new FixedUiElement(Svg.crosshair_blue_center);}
public static crosshair_blue_center_ui() { return new FixedUiElement(Svg.crosshair_blue_center_img);}
- public static crosshair_blue = " "
+ public static crosshair_blue = " "
public static crosshair_blue_img = Img.AsImageElement(Svg.crosshair_blue)
+ public static crosshair_blue_svg() { return new FixedUiElement(Svg.crosshair_blue);}
public static crosshair_blue_ui() { return new FixedUiElement(Svg.crosshair_blue_img);}
- public static crosshair = " "
+ public static crosshair = " "
public static crosshair_img = Img.AsImageElement(Svg.crosshair)
+ public static crosshair_svg() { return new FixedUiElement(Svg.crosshair);}
public static crosshair_ui() { return new FixedUiElement(Svg.crosshair_img);}
- public static delete_icon = " "
+ public static delete_icon = " "
public static delete_icon_img = Img.AsImageElement(Svg.delete_icon)
+ public static delete_icon_svg() { return new FixedUiElement(Svg.delete_icon);}
public static delete_icon_ui() { return new FixedUiElement(Svg.delete_icon_img);}
- public static down = " "
+ public static down = " "
public static down_img = Img.AsImageElement(Svg.down)
+ public static down_svg() { return new FixedUiElement(Svg.down);}
public static down_ui() { return new FixedUiElement(Svg.down_img);}
- public static envelope = " "
+ public static envelope = " "
public static envelope_img = Img.AsImageElement(Svg.envelope)
+ public static envelope_svg() { return new FixedUiElement(Svg.envelope);}
public static envelope_ui() { return new FixedUiElement(Svg.envelope_img);}
- public static floppy = " "
+ public static floppy = " "
public static floppy_img = Img.AsImageElement(Svg.floppy)
+ public static floppy_svg() { return new FixedUiElement(Svg.floppy);}
public static floppy_ui() { return new FixedUiElement(Svg.floppy_img);}
- public static gear = ""
+ public static gear = ""
public static gear_img = Img.AsImageElement(Svg.gear)
+ public static gear_svg() { return new FixedUiElement(Svg.gear);}
public static gear_ui() { return new FixedUiElement(Svg.gear_img);}
- public static help = " "
+ public static help = " "
public static help_img = Img.AsImageElement(Svg.help)
+ public static help_svg() { return new FixedUiElement(Svg.help);}
public static help_ui() { return new FixedUiElement(Svg.help_img);}
- public static home = " "
+ public static home = " "
public static home_img = Img.AsImageElement(Svg.home)
+ public static home_svg() { return new FixedUiElement(Svg.home);}
public static home_ui() { return new FixedUiElement(Svg.home_img);}
- public static josm_logo = " "
+ public static josm_logo = " "
public static josm_logo_img = Img.AsImageElement(Svg.josm_logo)
+ public static josm_logo_svg() { return new FixedUiElement(Svg.josm_logo);}
public static josm_logo_ui() { return new FixedUiElement(Svg.josm_logo_img);}
- public static layers = " "
+ public static layers = " "
public static layers_img = Img.AsImageElement(Svg.layers)
+ public static layers_svg() { return new FixedUiElement(Svg.layers);}
public static layers_ui() { return new FixedUiElement(Svg.layers_img);}
- public static layersAdd = " "
+ public static layersAdd = " "
public static layersAdd_img = Img.AsImageElement(Svg.layersAdd)
+ public static layersAdd_svg() { return new FixedUiElement(Svg.layersAdd);}
public static layersAdd_ui() { return new FixedUiElement(Svg.layersAdd_img);}
- public static logo = " "
+ public static logo = " "
public static logo_img = Img.AsImageElement(Svg.logo)
+ public static logo_svg() { return new FixedUiElement(Svg.logo);}
public static logo_ui() { return new FixedUiElement(Svg.logo_img);}
- public static logout = " "
+ public static logout = " "
public static logout_img = Img.AsImageElement(Svg.logout)
+ public static logout_svg() { return new FixedUiElement(Svg.logout);}
public static logout_ui() { return new FixedUiElement(Svg.logout_img);}
public static mapillary = ""
public static mapillary_img = Img.AsImageElement(Svg.mapillary)
+ public static mapillary_svg() { return new FixedUiElement(Svg.mapillary);}
public static mapillary_ui() { return new FixedUiElement(Svg.mapillary_img);}
public static no_checkmark = ""
public static no_checkmark_img = Img.AsImageElement(Svg.no_checkmark)
+ public static no_checkmark_svg() { return new FixedUiElement(Svg.no_checkmark);}
public static no_checkmark_ui() { return new FixedUiElement(Svg.no_checkmark_img);}
- public static or = " "
+ public static or = " "
public static or_img = Img.AsImageElement(Svg.or)
+ public static or_svg() { return new FixedUiElement(Svg.or);}
public static or_ui() { return new FixedUiElement(Svg.or_img);}
public static osm_logo_us = ""
public static osm_logo_us_img = Img.AsImageElement(Svg.osm_logo_us)
+ public static osm_logo_us_svg() { return new FixedUiElement(Svg.osm_logo_us);}
public static osm_logo_us_ui() { return new FixedUiElement(Svg.osm_logo_us_img);}
- public static osm_logo = " "
+ public static osm_logo = " "
public static osm_logo_img = Img.AsImageElement(Svg.osm_logo)
+ public static osm_logo_svg() { return new FixedUiElement(Svg.osm_logo);}
public static osm_logo_ui() { return new FixedUiElement(Svg.osm_logo_img);}
- public static pencil = ""
+ public static pencil = ""
public static pencil_img = Img.AsImageElement(Svg.pencil)
+ public static pencil_svg() { return new FixedUiElement(Svg.pencil);}
public static pencil_ui() { return new FixedUiElement(Svg.pencil_img);}
- public static pop_out = " "
+ public static pop_out = " "
public static pop_out_img = Img.AsImageElement(Svg.pop_out)
+ public static pop_out_svg() { return new FixedUiElement(Svg.pop_out);}
public static pop_out_ui() { return new FixedUiElement(Svg.pop_out_img);}
- public static reload = " "
+ public static reload = " "
public static reload_img = Img.AsImageElement(Svg.reload)
+ public static reload_svg() { return new FixedUiElement(Svg.reload);}
public static reload_ui() { return new FixedUiElement(Svg.reload_img);}
- public static search = " "
+ public static search = " "
public static search_img = Img.AsImageElement(Svg.search)
+ public static search_svg() { return new FixedUiElement(Svg.search);}
public static search_ui() { return new FixedUiElement(Svg.search_img);}
- public static share = " "
+ public static share = " "
public static share_img = Img.AsImageElement(Svg.share)
+ public static share_svg() { return new FixedUiElement(Svg.share);}
public static share_ui() { return new FixedUiElement(Svg.share_img);}
- public static star = " "
+ public static star = " "
public static star_img = Img.AsImageElement(Svg.star)
+ public static star_svg() { return new FixedUiElement(Svg.star);}
public static star_ui() { return new FixedUiElement(Svg.star_img);}
- public static statistics = " "
+ public static statistics = " "
public static statistics_img = Img.AsImageElement(Svg.statistics)
+ public static statistics_svg() { return new FixedUiElement(Svg.statistics);}
public static statistics_ui() { return new FixedUiElement(Svg.statistics_img);}
- public static up = " "
+ public static up = " "
public static up_img = Img.AsImageElement(Svg.up)
+ public static up_svg() { return new FixedUiElement(Svg.up);}
public static up_ui() { return new FixedUiElement(Svg.up_img);}
- public static wikimedia_commons_white = " "
+ public static wikimedia_commons_white = " "
public static wikimedia_commons_white_img = Img.AsImageElement(Svg.wikimedia_commons_white)
+ public static wikimedia_commons_white_svg() { return new FixedUiElement(Svg.wikimedia_commons_white);}
public static wikimedia_commons_white_ui() { return new FixedUiElement(Svg.wikimedia_commons_white_img);}
- public static wikipedia = "