Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"exponential-backoff": "^3.1.1",
"file-saver": "^2.0.5",
"html-loader": "4.2.0",
"html2canvas": "^1.4.1",
"inquirer": "^8.2.0",
"jszip": "^3.7.1",
"jszip-utils": "^0.1.0",
Expand Down
3 changes: 2 additions & 1 deletion public/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,6 @@
"whatIsYourEmail": "What is your email?",
"whoAreYou": "Who are you?",
"wmsLayer": "WMS layer",
"wmsUrl": "WMS url"
"wmsUrl": "WMS url",
"screenshot": "Take a snapshot of the current view and save it to png"
}
3 changes: 2 additions & 1 deletion public/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,6 @@
"whatIsYourEmail": "Wat is uw e-mailadres?",
"whoAreYou": "Wie bent u?",
"wmsLayer": "WMS laag",
"wmsUrl": "WMS url"
"wmsUrl": "WMS url",
"screenshot": "Maak een snapshot van het huidige weergave en sla deze op naar png"
}
14 changes: 14 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:items="localeItems"
@input="switchLocaleAndAddViewerData($event.title)"
/>
<screenshot-button :map="mapInstance" />
<burger-menu
:loadingburger="localeIsLoading"
@open-contact-form="onOpenContactForm"
Expand Down Expand Up @@ -59,13 +60,15 @@
/>

<v-mapbox
ref="mapbox"
slot="map"
:access-token="accessToken"
map-style="mapbox://styles/siggyf/ckww2c33f0xlf15nujlx41fe2"
:center="mapCenter"
:zoom="mapZoom"
class="mapbox-map"
:style="`--sidebar-width: ${appNavigationWidth}px`"
:map-options="{ preserveDrawingBuffer: true }"
@mb-load="setMapLoaded"
>
<time-slider
Expand Down Expand Up @@ -141,6 +144,7 @@
import FeedbackDialog from './components/FeedbackDialog/FeedbackDialog.vue'
import AcknowledgmentsDialog from '~/components/AcknowledgmentsDialog/AcknowledgmentsDialog.vue'
import { getCookie, setCookie } from './lib/cookies'
import ScreenshotButton from '~/components/ScreenshotButton/ScreenshotButton'

const removeRegion = locale => locale.replace(/-.+/, '')
const localeIsAvailable = locale => availableLocales.includes(locale)
Expand All @@ -166,6 +170,7 @@
UserAgreementDialog,
FeedbackDialog,
AcknowledgmentsDialog,
ScreenshotButton
},

data: () => ({
Expand All @@ -188,6 +193,7 @@
feedbackDialogOpen: false,
clickedUserAgreementOpen: false,
acknowledgmentsDialogOpen: false,
mapInstance: null
}),

computed: {
Expand Down Expand Up @@ -220,6 +226,14 @@
},

mounted() {
this.$nextTick(() => {
if (this.$refs.mapbox && this.$refs.mapbox.map) {
this.mapInstance = this.$refs.mapbox.map;
} else {
console.error("Mapbox instance is not available");

Check warning on line 233 in src/App.vue

View workflow job for this annotation

GitHub Actions / deploy-application (openearth-rws-viewer, 119b8ff3-5b22-4995-b43b-b31f21ba77c3)

Unexpected console statement

Check warning on line 233 in src/App.vue

View workflow job for this annotation

GitHub Actions / deploy-application (nl2120, 1f6372f6-c532-4e0e-bba7-dee08678d518)

Unexpected console statement

Check warning on line 233 in src/App.vue

View workflow job for this annotation

GitHub Actions / deploy-application (openearth-data-viewer, 1785f3f6-b4cf-42de-bea6-b57d48a5c664)

Unexpected console statement
}
});

this.$router.onReady(async (route) => {
const savedLocale = window.localStorage.getItem('locale')
let browserLocales = []
Expand Down Expand Up @@ -322,7 +336,7 @@
this.layersDialogOpen = true
}
} catch (e) {
console.log(e)

Check warning on line 339 in src/App.vue

View workflow job for this annotation

GitHub Actions / deploy-application (openearth-rws-viewer, 119b8ff3-5b22-4995-b43b-b31f21ba77c3)

Unexpected console statement

Check warning on line 339 in src/App.vue

View workflow job for this annotation

GitHub Actions / deploy-application (nl2120, 1f6372f6-c532-4e0e-bba7-dee08678d518)

Unexpected console statement

Check warning on line 339 in src/App.vue

View workflow job for this annotation

GitHub Actions / deploy-application (openearth-data-viewer, 1785f3f6-b4cf-42de-bea6-b57d48a5c664)

Unexpected console statement
} finally {
this.searchIsLoading = false
}
Expand Down
Loading
Loading