diff --git a/client/demo.js b/client/demo.js index 44c2c08d..ed79895f 100644 --- a/client/demo.js +++ b/client/demo.js @@ -34,7 +34,7 @@ const DEMO_UNIT_DATA = { ammo: [{ quantity: 2, name: "A cool missile", guidance: 0, category: 0, missileCategory: 0 } ], contacts: [{ID: 4, detectionMethod: 1}], activePath: [ ] - }, ["3"]:{ category: "Helicopter", alive: true, human: false, controlled: false, coalition: 1, country: 0, name: "AH-64D_BLK_II", unitName: "Cool guy 1-4", groupName: "Cool group 3", state: 1, task: "Being cool", + }, ["3"]:{ category: "Helicopter", alive: true, human: true, controlled: false, coalition: 1, country: 0, name: "AH-64D_BLK_II", unitName: "Cool guy 1-4", groupName: "Cool group 3", state: 1, task: "Being cool", hasTask: false, position: { lat: 37.1, lng: -116.1, alt: 1000 }, speed: 200, heading: 315 * Math.PI / 180, isActiveTanker: false, isActiveAWACS: false, onOff: true, followRoads: false, fuel: 50, desiredSpeed: 300, desiredSpeedType: 1, desiredAltitude: 1000, desiredAltitudeType: 1, leaderID: 0, formationOffset: { x: 0, y: 0, z: 0 }, diff --git a/client/public/stylesheets/style/style.css b/client/public/stylesheets/style/style.css index 37609fbd..58ee2aa5 100644 --- a/client/public/stylesheets/style/style.css +++ b/client/public/stylesheets/style/style.css @@ -704,7 +704,6 @@ nav.ol-panel> :last-child { @media (min-width: 1700px) { #splash-screen { - background-image: url("/resources/theme/images/splash/1.png"); background-position: 100% 50%; background-size: contain; } @@ -736,7 +735,7 @@ nav.ol-panel> :last-child { top: 0; transform: rotate(-23deg); transform-origin: top right; - width: 200px; + width: 300px; z-index: -1; } diff --git a/client/public/themes/olympus/images/splash/1.jpg b/client/public/themes/olympus/images/splash/1.jpg new file mode 100644 index 00000000..93121bcb Binary files /dev/null and b/client/public/themes/olympus/images/splash/1.jpg differ diff --git a/client/public/themes/olympus/images/splash/2.jpg b/client/public/themes/olympus/images/splash/2.jpg new file mode 100644 index 00000000..e211ee22 Binary files /dev/null and b/client/public/themes/olympus/images/splash/2.jpg differ diff --git a/client/public/themes/olympus/images/splash/3.jpg b/client/public/themes/olympus/images/splash/3.jpg new file mode 100644 index 00000000..890f186b Binary files /dev/null and b/client/public/themes/olympus/images/splash/3.jpg differ diff --git a/client/public/themes/olympus/images/splash/4.jpg b/client/public/themes/olympus/images/splash/4.jpg new file mode 100644 index 00000000..d8775404 Binary files /dev/null and b/client/public/themes/olympus/images/splash/4.jpg differ diff --git a/client/public/themes/olympus/images/splash/5.jpg b/client/public/themes/olympus/images/splash/5.jpg new file mode 100644 index 00000000..a4e0c084 Binary files /dev/null and b/client/public/themes/olympus/images/splash/5.jpg differ diff --git a/client/public/themes/olympus/images/splash/6.jpg b/client/public/themes/olympus/images/splash/6.jpg new file mode 100644 index 00000000..5b5e3498 Binary files /dev/null and b/client/public/themes/olympus/images/splash/6.jpg differ diff --git a/client/public/themes/olympus/images/splash/7.jpg b/client/public/themes/olympus/images/splash/7.jpg new file mode 100644 index 00000000..bee73fda Binary files /dev/null and b/client/public/themes/olympus/images/splash/7.jpg differ diff --git a/client/public/themes/olympus/images/splash/8.jpg b/client/public/themes/olympus/images/splash/8.jpg new file mode 100644 index 00000000..eafdf2a1 Binary files /dev/null and b/client/public/themes/olympus/images/splash/8.jpg differ diff --git a/client/src/constants/constants.ts b/client/src/constants/constants.ts index e0547d43..36cd6367 100644 --- a/client/src/constants/constants.ts +++ b/client/src/constants/constants.ts @@ -105,25 +105,25 @@ export const mapLayers = { "ArcGIS Satellite": { urlTemplate: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", minZoom: 1, - maxZoom: 16, + maxZoom: 18, attribution: "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, GetApp().getMap()ping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community" }, "USGS Topo": { urlTemplate: 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x}', minZoom: 1, - maxZoom: 16, + maxZoom: 18, attribution: 'Tiles courtesy of the U.S. Geological Survey' }, "OpenStreetMap Mapnik": { urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', minZoom: 1, - maxZoom: 16, + maxZoom: 18, attribution: '© OpenStreetMap contributors' }, "OPENVKarte": { urlTemplate: 'https://tileserver.memomaps.de/tilegen/{z}/{x}/{y}.png', minZoom: 1, - maxZoom: 16, + maxZoom: 18, attribution: 'Map memomaps.de CC-BY-SA, map data © OpenStreetMap contributors' }, "Esri.DeLorme": { @@ -135,7 +135,7 @@ export const mapLayers = { "CyclOSM": { urlTemplate: 'https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png', minZoom: 1, - maxZoom: 16, + maxZoom: 18, attribution: 'CyclOSM | Map data: © OpenStreetMap contributors' } } diff --git a/client/src/map/map.ts b/client/src/map/map.ts index 51dff111..374cfab3 100644 --- a/client/src/map/map.ts +++ b/client/src/map/map.ts @@ -753,37 +753,35 @@ export class Map extends L.Map { #showDestinationCursors() { const singleCursor = !this.#shiftKey; const selectedUnitsCount = getApp().getUnitsManager().getSelectedUnits({ excludeHumans: true, onlyOnePerGroup: true }).length; - if (selectedUnitsCount > 0) { - if (singleCursor) { - if ( this.#destinationPreviewCursors.length != 1) { - this.#hideDestinationCursors(); - var marker = new DestinationPreviewMarker(this.getMouseCoordinates(), { interactive: false }); - marker.addTo(this); - this.#destinationPreviewCursors = [marker]; - } - - this.#destinationPreviewHandleLine.removeFrom(this); - this.#destinationPreviewHandle.removeFrom(this); + if (singleCursor) { + if ( this.#destinationPreviewCursors.length != 1) { + this.#hideDestinationCursors(); + var marker = new DestinationPreviewMarker(this.getMouseCoordinates(), { interactive: false }); + marker.addTo(this); + this.#destinationPreviewCursors = [marker]; } - else if (!singleCursor) { - while (this.#destinationPreviewCursors.length > selectedUnitsCount) { - this.removeLayer(this.#destinationPreviewCursors[0]); - this.#destinationPreviewCursors.splice(0, 1); - } - this.#destinationPreviewHandleLine.addTo(this); - this.#destinationPreviewHandle.addTo(this); - - while (this.#destinationPreviewCursors.length < selectedUnitsCount) { - var cursor = new DestinationPreviewMarker(this.getMouseCoordinates(), { interactive: false }); - cursor.addTo(this); - this.#destinationPreviewCursors.push(cursor); - } - - this.#updateDestinationCursors(); - } + this.#destinationPreviewHandleLine.removeFrom(this); + this.#destinationPreviewHandle.removeFrom(this); } - } + else if (!singleCursor) { + while (this.#destinationPreviewCursors.length > selectedUnitsCount) { + this.removeLayer(this.#destinationPreviewCursors[0]); + this.#destinationPreviewCursors.splice(0, 1); + } + + this.#destinationPreviewHandleLine.addTo(this); + this.#destinationPreviewHandle.addTo(this); + + while (this.#destinationPreviewCursors.length < selectedUnitsCount) { + var cursor = new DestinationPreviewMarker(this.getMouseCoordinates(), { interactive: false }); + cursor.addTo(this); + this.#destinationPreviewCursors.push(cursor); + } + + this.#updateDestinationCursors(); + } +} #updateDestinationCursors() { const groupLatLng = this.#computeDestinationRotation && this.#destinationRotationCenter != null ? this.#destinationRotationCenter : this.getMouseCoordinates(); diff --git a/client/src/olympusapp.ts b/client/src/olympusapp.ts index 2d9b7be7..f56ef00c 100644 --- a/client/src/olympusapp.ts +++ b/client/src/olympusapp.ts @@ -214,6 +214,13 @@ export class OlympusApp { /* Setup all global events */ this.#setupEvents(); + + /* Set the splash background image to a random image */ + var splashScreen = document.getElementById("splash-screen"); + if (splashScreen) { + let i = Math.round(Math.random() * 7 + 1); + splashScreen.style.backgroundImage = `url('/resources/theme/images/splash/${i}.jpg')`; + } } #setupEvents() {