-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GSLUX-722: Fix embedded mode #125
Conversation
GitHub Pages links: * Luxembourg-geoportail: https://geoportail-luxembourg.github.io/luxembourg-geoportail/GSLUX-722-fix-embedded-mode/ |
747c315
to
9ffa6eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @AlitaBernachot ! Works well in standalone as well as lib.
VITE_DEFAULT_MAX_EXTENT=[2.6, 47.7, 8.6, 51] | ||
|
||
# Mode lib in v3 | ||
VITE_MODE_LIB=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here: https://github.com/Geoportail-Luxembourg/luxembourg-geoportail/pull/125/files#diff-804fa2a6df460069076f9dc89f051d3c991ba8f9f683104808bb166cac7da42aR56
Is that what you were looking for?
// TODO: Add slide effect and do this update after slide animation ends | ||
} | ||
onMounted(() => window.addEventListener('resize', map.resize)) | ||
onUnmounted(() => window.removeEventListener('resize', map.resize)) | ||
</script> | ||
|
||
<template> | ||
<div class="h-screen flex flex-col overflow-hidden"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it make sense to move the v-if="!embedded"
here and add a v-else
for the map-container
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, with template tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, thanks!
src/components/map/map-container.vue
Outdated
<fullscreen-control v-if="!embedded" /> | ||
<attribution-control v-if="!embedded" /> | ||
<map-3d-control v-if="v4_standalone && !embedded" /> | ||
<location-control v-if="!embedded" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, maybe a div around it with the v-if="!embedded"
condition could simplify the template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will try, I hope adding a div won't break all the display.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a <template v-if="!embedded">
tag instead of a <div>
to wrap the controls. This way it won't add a useless node in the DOM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great when configuring the map view via the controls and then passing in embedded mode,
thanks.
36c75b4
to
15d398d
Compare
15d398d
to
7aa7f77
Compare
7aa7f77
to
4d383a6
Compare
JIRA issue
https://jira.camptocamp.com/browse/GSLUX-722
Description
?embedded=true
in url)NB. This PR needs Geoportail-Luxembourg/geoportailv3#3179