From 65f5b130a819467a6bc82460d3b39e7a9df18384 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 21 Dec 2021 21:36:03 +0100 Subject: [PATCH 1/5] Styling tweaks to fix buttons on webkit browsers --- UI/Popup/DeleteWizard.ts | 2 +- UI/Popup/MoveWizard.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/UI/Popup/DeleteWizard.ts b/UI/Popup/DeleteWizard.ts index b0981f78b..5b66956f2 100644 --- a/UI/Popup/DeleteWizard.ts +++ b/UI/Popup/DeleteWizard.ts @@ -93,7 +93,7 @@ export default class DeleteWizard extends Toggle { * The button which is shown first. Opening it will trigger the check for deletions */ const deleteButton = new SubtleButton( - Svg.delete_icon_ui().SetStyle("width: auto; height: 1.5rem;"), t.delete.Clone()).onClick( + Svg.delete_icon_svg().SetStyle("width: 1.5rem; height: 1.5rem;"), t.delete.Clone()).onClick( () => { deleteAbility.CheckDeleteability(true) confirm.setData(true); diff --git a/UI/Popup/MoveWizard.ts b/UI/Popup/MoveWizard.ts index 212494023..8bb889ece 100644 --- a/UI/Popup/MoveWizard.ts +++ b/UI/Popup/MoveWizard.ts @@ -85,14 +85,14 @@ export default class MoveWizard extends Toggle { const reason = reasons[0] moveReason.setData(reason) moveButton = new SubtleButton( - reason.icon.SetStyle("height: 1.5rem; width: auto;"), + reason.icon.SetStyle("height: 1.5rem; width: 1.5rem;"), Translations.WT(reason.invitingText) ).onClick(() => { currentStep.setData("pick_location") }) } else { moveButton = new SubtleButton( - Svg.move_ui().SetStyle("height: 1.5rem; width: auto"), + Svg.move_ui().SetStyle("width: 1.5rem; height: 1.5rem"), t.inviteToMove.generic ).onClick(() => { currentStep.setData("reason") From 741564471cd520164bfd84ddcdabfbdb9815e7f1 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 22 Dec 2021 00:42:34 +0100 Subject: [PATCH 2/5] Add decent intersection detection to GRB theme --- assets/themes/grb_import/grb.json | 19 ++++++++++------- assets/themes/grb_import/license_info.json | 10 +++++++++ assets/themes/grb_import/warning.svg | 24 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 assets/themes/grb_import/warning.svg diff --git a/assets/themes/grb_import/grb.json b/assets/themes/grb_import/grb.json index 2a11d0fc8..8e8a2491d 100644 --- a/assets/themes/grb_import/grb.json +++ b/assets/themes/grb_import/grb.json @@ -38,7 +38,7 @@ "point" ], "icon": { - "render": "./assets/themes/grb_import/robot.svg" + "render": "./assets/svg/robot.svg" }, "iconSize": "15,15,center" } @@ -350,6 +350,7 @@ "all_tags" ] }, + "address", { "builtin": "crab_address", "override": { @@ -464,7 +465,7 @@ "title": "GRB outline", "calculatedTags": [ "_overlaps_with_buildings=feat.overlapWith('OSM-buildings')", - "_overlap_with=feat.get('_overlaps_with_buildings').filter(f => f.overlap > 1 && (feat.get('_surface') < 20 || f.overlap / feat.get('_surface')) > 0.5)[0] ?? ''", + "_overlaps_with=feat.get('_overlaps_with_buildings').filter(f => f.overlap > 1 /* square meter */ )[0] ?? ''", "_overlap_absolute=feat.get('_overlaps_with')?.overlap", "_overlap_percentage=Math.round(100 * feat.get('_overlap_absolute') / feat.get('_surface')) ", "_osm_obj:source:ref=feat.get('_overlaps_with')?.feat?.properties['source:geometry:ref']", @@ -479,18 +480,17 @@ "_imported_osm_still_fresh= feat.properties['_osm_obj:source:date'] == feat.properties._grb_date", "_target_building_type=feat.properties['_osm_obj:building'] === 'yes' ? feat.properties.building : (feat.properties['_osm_obj:building'] ?? feat.properties.building)", "_building:min_level= feat.properties['fixme']?.startsWith('verdieping, correct the building tag, add building:level and building:min_level before upload in JOSM!') ? '1' : ''", - "_overlaps_with_other_features=feat.overlapWith('generic_osm_object').map(f => \"\" + f.feat.properties.id + \"\").join(', ')" + "_intersects_with_other_features=feat.intersectionsWith('generic_osm_object').map(f => \"\" + f.feat.properties.id + \"\").join(', ')" ], "tagRenderings": [ { "id": "Import-button", "render": "{import_way_button(OSM-buildings,building=$building;man_made=$man_made; source:geometry:date=$_grb_date; source:geometry:ref=$_grb_ref; addr:street=$addr:street; addr:housenumber=$addr:housenumber; building:min_level=$_building:min_level, Upload this building to OpenStreetMap,,_is_part_of_building=true,1,_moveable=true)}", "mappings": [ - { - "if": "_overlaps_with_other_features~*", - "then": "This GRB building overlaps with the following features: {_overlaps_with_other_features}.
Fix the overlap and try again" + {"#": "Hide import button if intersection with other objects are detected", + "if": "_intersects_with_other_features~*", + "then": "This GRB building intersects with the following features: {_intersects_with_other_features}.
Fix the overlap and try again" }, - { "if": { "and": [ @@ -534,6 +534,7 @@ "if": "_osm_obj:addr:housenumber~*", "then": "The overlapping building only has a housenumber known: {_osm_obj:addr:housenumber}" }, + { "if": "_osm_obj:id=", "then": "No overlapping OpenStreetMap-building found" @@ -608,6 +609,10 @@ "icon": { "render": "./assets/themes/grb_import/housenumber_blank.svg", "mappings": [ + { + "if": "_intersects_with_other_features~*", + "then": "./assets/themes/grb_import/warning.svg" + }, { "if": "addr:housenumber=", "then": "" diff --git a/assets/themes/grb_import/license_info.json b/assets/themes/grb_import/license_info.json index 8ea1617ec..a6cdd3da5 100644 --- a/assets/themes/grb_import/license_info.json +++ b/assets/themes/grb_import/license_info.json @@ -6,5 +6,15 @@ "Pieter Vander Vennet" ], "sources": [] + }, + { + "path": "warning.svg", + "license": "CC0", + "authors": [ + "penubag" + ], + "sources": [ + "https://commons.wikimedia.org/wiki/File:Ambox_warning_pn.svg" + ] } ] \ No newline at end of file diff --git a/assets/themes/grb_import/warning.svg b/assets/themes/grb_import/warning.svg new file mode 100644 index 000000000..20121c65a --- /dev/null +++ b/assets/themes/grb_import/warning.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + From 7ca76129607b6dc3fcf616ec5b0c26ad2bdfc0db Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 22 Dec 2021 00:43:00 +0100 Subject: [PATCH 3/5] Fix bugs with intersectionWith --- Logic/ExtraFunctions.ts | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Logic/ExtraFunctions.ts b/Logic/ExtraFunctions.ts index 47bfc9a4a..a25a7c75d 100644 --- a/Logic/ExtraFunctions.ts +++ b/Logic/ExtraFunctions.ts @@ -14,7 +14,7 @@ export interface ExtraFuncParams { */ getFeaturesWithin: (layerId: string, bbox: BBox) => any[][], memberships: RelationsTracker - getFeatureById: (id:string) => any + getFeatureById: (id: string) => any } /** @@ -80,11 +80,12 @@ class IntersectionFunc implements ExtraFunction { _f(params: ExtraFuncParams, feat) { return (...layerIds: string[]) => { - const result: { feat: any, intersections: [number,number][] }[] = [] + const result: { feat: any, intersections: [number, number][] }[] = [] const bbox = BBox.get(feat) for (const layerId of layerIds) { + console.log("Calculating the intersection with layer ", layerId) const otherLayers = params.getFeaturesWithin(layerId, bbox) if (otherLayers === undefined) { continue; @@ -94,9 +95,12 @@ class IntersectionFunc implements ExtraFunction { } for (const tile of otherLayers) { for (const otherFeature of tile) { - - const intersections = GeoOperations.LineIntersections(feat, otherFeature) - result.push({feat, intersections}) + + const intersections = GeoOperations.LineIntersections(feat, otherFeature) + if(intersections.length === 0){ + continue + } + result.push({feat: otherFeature, intersections}) } } } @@ -124,7 +128,7 @@ class DistanceToFunc implements ExtraFunction { } if (typeof arg0 === "string") { // This is an identifier - const feature = featuresPerLayer.getFeatureById(arg0) + const feature = featuresPerLayer.getFeatureById(arg0) if (feature === undefined) { return undefined; } @@ -172,9 +176,9 @@ class ClosestNObjectFunc implements ExtraFunction { _doc = "Given either a list of geojson features or a single layer name, gives the n closest objects which are nearest to the feature (excluding the feature itself). In the case of ways/polygons, only the centerpoint is considered. " + "Returns a list of `{feat: geojson, distance:number}` the empty list if nothing is found (or not yet loaded)\n\n" + "If a 'unique tag key' is given, the tag with this key will only appear once (e.g. if 'name' is given, all features will have a different name)" - _args = ["list of features or layer name or '*' to get all features", "amount of features", "unique tag key (optional)", "maxDistanceInMeters (optional)"] + _args = ["list of features or layer name or '*' to get all features", "amount of features", "unique tag key (optional)", "maxDistanceInMeters (optional)"] + - /** * Gets the closes N features, sorted by ascending distance. * @@ -205,11 +209,11 @@ class ClosestNObjectFunc implements ExtraFunction { const selfCenter = GeoOperations.centerpointCoordinates(feature) let closestFeatures: { feat: any, distance: number }[] = []; - + for (const featureList of features) { // Features is provided by 'getFeaturesWithin' which returns a list of lists of features, hence the double loop here for (const otherFeature of featureList) { - + if (otherFeature === feature || otherFeature.properties.id === feature.properties.id) { continue; // We ignore self } @@ -332,6 +336,7 @@ class GetParsed implements ExtraFunction { _name = "get" _doc = "Gets the property of the feature, parses it (as JSON) and returns it. Might return 'undefined' if not defined, null, ..." _args = ["key"] + _f(params, feat) { return key => { const value = feat.properties[key] From 95d624400888766becdf96e38cc1a99a16665d47 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 22 Dec 2021 00:43:15 +0100 Subject: [PATCH 4/5] Remove obsolete console.logs --- Logic/Osm/Actions/ReplaceGeometryAction.ts | 3 +-- UI/BigComponents/LeftControls.ts | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Logic/Osm/Actions/ReplaceGeometryAction.ts b/Logic/Osm/Actions/ReplaceGeometryAction.ts index 7c7202d23..3b4aa31ef 100644 --- a/Logic/Osm/Actions/ReplaceGeometryAction.ts +++ b/Logic/Osm/Actions/ReplaceGeometryAction.ts @@ -64,7 +64,6 @@ export default class ReplaceGeometryAction extends OsmChangeAction { for (let j = i + 1; j < coordinates.length; j++) { const d = GeoOperations.distanceBetween(coordinates[i], coordinates[j]) if (d < 0.1) { - console.log("Identical coordinates detected: ", i, " and ", j, ": ", coordinates[i], coordinates[j], "distance is", d) this.identicalTo[j] = i } } @@ -77,7 +76,7 @@ export default class ReplaceGeometryAction extends OsmChangeAction { public async getPreview(): Promise { const {closestIds, allNodesById} = await this.GetClosestIds(); - console.log("Generating preview, identicals are ",) + console.debug("Generating preview, identicals are ",) const preview = closestIds.map((newId, i) => { if (this.identicalTo[i] !== undefined) { return undefined diff --git a/UI/BigComponents/LeftControls.ts b/UI/BigComponents/LeftControls.ts index 6fe0a317b..a669b856c 100644 --- a/UI/BigComponents/LeftControls.ts +++ b/UI/BigComponents/LeftControls.ts @@ -62,7 +62,6 @@ export default class LeftControls extends Combine { const elem = currentViewFL.layerDef.mapRendering[0]?.GenerateLeafletStyle(new UIEventSource(tags), false, { noSize: true })?.html - console.log("Elem is ", elem, "for", tags) if (elem === undefined) { return defaultIcon } From 9e40e459e5418f66a1fb8a324bc6787991934b22 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 22 Dec 2021 01:08:11 +0100 Subject: [PATCH 5/5] Cleanup of svg files, move matchpoint to explicit layer --- Customizations/AllKnownLayers.ts | 2 +- .../Json/PointRenderingConfigJson.ts | 2 +- Models/ThemeConfig/PointRenderingConfig.ts | 4 +- UI/Input/LocationInput.ts | 14 +- assets/layers/matchpoint/matchpoint.json | 13 + assets/svg/arrow-download.svg | 5 - assets/svg/arrow-left-smooth.svg | 75 ----- assets/svg/arrow-left-thin.svg | 3 - assets/svg/arrow-right-smooth.svg | 75 ----- assets/svg/direction.svg | 30 -- assets/svg/direction_masked.svg | 69 ---- assets/svg/direction_outline.svg | 71 ----- assets/svg/down.svg | 57 ---- assets/svg/home_white_bg.svg | 29 -- assets/svg/layersAdd.svg | 299 ------------------ assets/svg/license_info.json | 164 ---------- assets/svg/or.svg | 53 ---- assets/svg/osm-copyright.svg | 115 ------- scripts/generateIncludedImages.ts | 11 +- 19 files changed, 27 insertions(+), 1064 deletions(-) create mode 100644 assets/layers/matchpoint/matchpoint.json delete mode 100644 assets/svg/arrow-download.svg delete mode 100644 assets/svg/arrow-left-smooth.svg delete mode 100644 assets/svg/arrow-left-thin.svg delete mode 100644 assets/svg/arrow-right-smooth.svg delete mode 100644 assets/svg/direction.svg delete mode 100644 assets/svg/direction_masked.svg delete mode 100644 assets/svg/direction_outline.svg delete mode 100644 assets/svg/down.svg delete mode 100644 assets/svg/home_white_bg.svg delete mode 100644 assets/svg/layersAdd.svg delete mode 100644 assets/svg/or.svg delete mode 100644 assets/svg/osm-copyright.svg diff --git a/Customizations/AllKnownLayers.ts b/Customizations/AllKnownLayers.ts index 4f142cfeb..0f32405e1 100644 --- a/Customizations/AllKnownLayers.ts +++ b/Customizations/AllKnownLayers.ts @@ -21,7 +21,7 @@ export default class AllKnownLayers { public static added_by_default: string[] = ["gps_location", "gps_location_history", "home_location", "gps_track"] - public static no_include: string[] = ["conflation", "left_right_style", "split_point","current_view"] + public static no_include: string[] = ["conflation", "left_right_style", "split_point","current_view","matchpoint"] /** * Layer IDs of layers which have special properties through built-in hooks */ diff --git a/Models/ThemeConfig/Json/PointRenderingConfigJson.ts b/Models/ThemeConfig/Json/PointRenderingConfigJson.ts index 75e663361..f214687ba 100644 --- a/Models/ThemeConfig/Json/PointRenderingConfigJson.ts +++ b/Models/ThemeConfig/Json/PointRenderingConfigJson.ts @@ -15,7 +15,7 @@ export default interface PointRenderingConfigJson { * All the locations that this point should be rendered at. * Using `location: ["point", "centroid"] will always render centerpoint */ - location: ("point" | "centroid" | "start" | "end")[] + location: ("point" | "centroid" | "start" | "end" | string)[] /** * The icon for an element. diff --git a/Models/ThemeConfig/PointRenderingConfig.ts b/Models/ThemeConfig/PointRenderingConfig.ts index 7160a251d..7ecb713e7 100644 --- a/Models/ThemeConfig/PointRenderingConfig.ts +++ b/Models/ThemeConfig/PointRenderingConfig.ts @@ -16,7 +16,7 @@ import {VariableUiElement} from "../../UI/Base/VariableUIElement"; export default class PointRenderingConfig extends WithContextLoader { private static readonly allowed_location_codes = new Set(["point", "centroid", "start", "end"]) - public readonly location: Set<"point" | "centroid" | "start" | "end"> + public readonly location: Set<"point" | "centroid" | "start" | "end" | string> public readonly icon: TagRenderingConfig; public readonly iconBadges: { if: TagsFilter; then: TagRenderingConfig }[]; @@ -69,7 +69,7 @@ export default class PointRenderingConfig extends WithContextLoader { if (iconPath !== undefined && iconPath.startsWith(Utils.assets_path)) { const iconKey = iconPath.substr(Utils.assets_path.length); if (Svg.All[iconKey] === undefined) { - throw "Builtin SVG asset not found: " + iconPath; + throw context+": builtin SVG asset not found: " + iconPath; } } this.iconSize = this.tr("iconSize", "40,40,center"); diff --git a/UI/Input/LocationInput.ts b/UI/Input/LocationInput.ts index fe2f66bfe..107b39639 100644 --- a/UI/Input/LocationInput.ts +++ b/UI/Input/LocationInput.ts @@ -15,20 +15,10 @@ import {FixedUiElement} from "../Base/FixedUiElement"; import ShowDataLayer from "../ShowDataLayer/ShowDataLayer"; import BaseUIElement from "../BaseUIElement"; import Toggle from "./Toggle"; - +import * as matchpoint from "../../assets/layers/matchpoint/matchpoint.json" export default class LocationInput extends InputElement implements MinimapObj { - private static readonly matchLayer = new LayerConfig( - { - id: "matchpoint", source: { - osmTags: {and: []} - }, - mapRendering: [{ - location: ["point","centroid"], - icon: "./assets/svg/crosshair-empty.svg" - }] - }, "matchpoint icon", true - ) + private static readonly matchLayer = new LayerConfig(matchpoint, "LocationInput.matchpoint", true) IsSelected: UIEventSource = new UIEventSource(false); public readonly snappedOnto: UIEventSource = new UIEventSource(undefined) diff --git a/assets/layers/matchpoint/matchpoint.json b/assets/layers/matchpoint/matchpoint.json new file mode 100644 index 000000000..983ba8025 --- /dev/null +++ b/assets/layers/matchpoint/matchpoint.json @@ -0,0 +1,13 @@ +{ + "id": "matchpoint", + "description": "The default rendering for a locationInput which snaps onto another object", + "source": { + "osmTags": { + "and": []} + }, + "mapRendering": [{ + "location": ["point","centroid"], + "icon": "./assets/svg/crosshair-empty.svg" + }] + +} \ No newline at end of file diff --git a/assets/svg/arrow-download.svg b/assets/svg/arrow-download.svg deleted file mode 100644 index b1f2ff8ea..000000000 --- a/assets/svg/arrow-download.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/assets/svg/arrow-left-smooth.svg b/assets/svg/arrow-left-smooth.svg deleted file mode 100644 index d5bb1d8e4..000000000 --- a/assets/svg/arrow-left-smooth.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/assets/svg/arrow-left-thin.svg b/assets/svg/arrow-left-thin.svg deleted file mode 100644 index 5eb76481b..000000000 --- a/assets/svg/arrow-left-thin.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/svg/arrow-right-smooth.svg b/assets/svg/arrow-right-smooth.svg deleted file mode 100644 index 4fec56311..000000000 --- a/assets/svg/arrow-right-smooth.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/assets/svg/direction.svg b/assets/svg/direction.svg deleted file mode 100644 index 9e2f0e911..000000000 --- a/assets/svg/direction.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - diff --git a/assets/svg/direction_masked.svg b/assets/svg/direction_masked.svg deleted file mode 100644 index af763459e..000000000 --- a/assets/svg/direction_masked.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - Created by potrace 1.15, written by Peter Selinger 2001-2017 - - - image/svg+xml - - - - - - diff --git a/assets/svg/direction_outline.svg b/assets/svg/direction_outline.svg deleted file mode 100644 index e90b7da5b..000000000 --- a/assets/svg/direction_outline.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - Created by potrace 1.15, written by Peter Selinger 2001-2017 - - - image/svg+xml - - - - - - - diff --git a/assets/svg/down.svg b/assets/svg/down.svg deleted file mode 100644 index 0f1acab6b..000000000 --- a/assets/svg/down.svg +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - diff --git a/assets/svg/home_white_bg.svg b/assets/svg/home_white_bg.svg deleted file mode 100644 index 96d62bcb4..000000000 --- a/assets/svg/home_white_bg.svg +++ /dev/null @@ -1,29 +0,0 @@ - -image/svg+xml - - - - \ No newline at end of file diff --git a/assets/svg/layersAdd.svg b/assets/svg/layersAdd.svg deleted file mode 100644 index ff0535d1f..000000000 --- a/assets/svg/layersAdd.svg +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/svg/license_info.json b/assets/svg/license_info.json index 0b19904d7..b2e4b5704 100644 --- a/assets/svg/license_info.json +++ b/assets/svg/license_info.json @@ -71,54 +71,6 @@ "authors": [], "sources": [] }, - { - "path": "arrow-download.svg", - "license": "CC0", - "authors": [ - "Hannah Declerck" - ], - "sources": [] - }, - { - "path": "arrow-left-smooth.svg", - "license": "CC0", - "authors": [ - "Pieter Vander Vennet" - ], - "sources": [] - }, - { - "path": "arrow-left-smooth.svg", - "license": "CC0", - "authors": [ - "Pieter Vander Vennet" - ], - "sources": [] - }, - { - "path": "arrow-left-thin.svg", - "license": "CC0", - "authors": [ - "Hannah Declerck" - ], - "sources": [] - }, - { - "path": "arrow-right-smooth.svg", - "license": "CC0", - "authors": [ - "Pieter Vander Vennet" - ], - "sources": [] - }, - { - "path": "arrow-right-smooth.svg", - "license": "CC0", - "authors": [ - "Pieter Vander Vennet" - ], - "sources": [] - }, { "path": "back.svg", "license": "CC0", @@ -373,18 +325,6 @@ ], "sources": [] }, - { - "path": "direction.svg", - "license": "CC0; trivial", - "authors": [], - "sources": [] - }, - { - "path": "direction.svg", - "license": "CC0; trivial", - "authors": [], - "sources": [] - }, { "path": "direction_gradient.svg", "license": "CC0; trivial", @@ -397,38 +337,6 @@ "authors": [], "sources": [] }, - { - "path": "direction_masked.svg", - "license": "CC0", - "authors": [ - "Pieter Vander Vennet" - ], - "sources": [] - }, - { - "path": "direction_masked.svg", - "license": "CC0", - "authors": [ - "Pieter Vander Vennet" - ], - "sources": [] - }, - { - "path": "direction_outline.svg", - "license": "CC0", - "authors": [ - "Pieter Vander Vennet" - ], - "sources": [] - }, - { - "path": "direction_outline.svg", - "license": "CC0", - "authors": [ - "Pieter Vander Vennet" - ], - "sources": [] - }, { "path": "direction_stroke.svg", "license": "CC0", @@ -445,18 +353,6 @@ ], "sources": [] }, - { - "path": "down.svg", - "license": "CC0; trivial", - "authors": [], - "sources": [] - }, - { - "path": "down.svg", - "license": "CC0; trivial", - "authors": [], - "sources": [] - }, { "path": "download.svg", "license": "CC0", @@ -679,26 +575,6 @@ "https://commons.wikimedia.org/wiki/File:Home-icon.svg" ] }, - { - "path": "home_white_bg.svg", - "license": "CC-BY-SA 3.0", - "authors": [ - "Timothy Miller" - ], - "sources": [ - "https://commons.wikimedia.org/wiki/File:Home-icon.svg" - ] - }, - { - "path": "home_white_bg.svg", - "license": "CC-BY-SA 3.0", - "authors": [ - "Timothy Miller" - ], - "sources": [ - "https://commons.wikimedia.org/wiki/File:Home-icon.svg" - ] - }, { "path": "josm_logo.svg", "license": "CC0", @@ -733,18 +609,6 @@ "authors": [], "sources": [] }, - { - "path": "layersAdd.svg", - "license": "CC0; trivial", - "authors": [], - "sources": [] - }, - { - "path": "layersAdd.svg", - "license": "CC0; trivial", - "authors": [], - "sources": [] - }, { "path": "length-crosshair.svg", "license": "CC0", @@ -953,34 +817,6 @@ "authors": [], "sources": [] }, - { - "path": "or.svg", - "license": "CC0; trivial", - "authors": [], - "sources": [] - }, - { - "path": "or.svg", - "license": "CC0; trivial", - "authors": [], - "sources": [] - }, - { - "path": "osm-copyright.svg", - "license": "logo; all rights reserved", - "authors": [], - "sources": [ - "https://www.OpenStreetMap.org" - ] - }, - { - "path": "osm-copyright.svg", - "license": "logo; all rights reserved", - "authors": [], - "sources": [ - "https://www.OpenStreetMap.org" - ] - }, { "path": "osm-logo-us.svg", "license": "Logo", diff --git a/assets/svg/or.svg b/assets/svg/or.svg deleted file mode 100644 index 20841f19b..000000000 --- a/assets/svg/or.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - diff --git a/assets/svg/osm-copyright.svg b/assets/svg/osm-copyright.svg deleted file mode 100644 index 42c1744d2..000000000 --- a/assets/svg/osm-copyright.svg +++ /dev/null @@ -1,115 +0,0 @@ - - diff --git a/scripts/generateIncludedImages.ts b/scripts/generateIncludedImages.ts index ae1569719..a716751de 100644 --- a/scripts/generateIncludedImages.ts +++ b/scripts/generateIncludedImages.ts @@ -31,10 +31,15 @@ function genImages(dryrun = false) { svg = "xxx" } + let rawName = name; + if(dryrun){ + rawName = "add"; + } + module += ` public static ${name} = "${svg}"\n` - module += ` public static ${name}_img = Img.AsImageElement(Svg.${name})\n` - module += ` public static ${name}_svg() { return new Img(Svg.${name}, true);}\n` - module += ` public static ${name}_ui() { return new FixedUiElement(Svg.${name}_img);}\n\n` + module += ` public static ${name}_img = Img.AsImageElement(Svg.${rawName})\n` + module += ` public static ${name}_svg() { return new Img(Svg.${rawName}, true);}\n` + module += ` public static ${name}_ui() { return new FixedUiElement(Svg.${rawName}_img);}\n\n` if (!dryrun) { allNames.push(`"${path}": Svg.${name}`) }