Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSLogic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
VIPSLogic
Commits
45e0dd1e
Commit
45e0dd1e
authored
8 months ago
by
Lene Wasskog
Browse files
Options
Downloads
Patches
Plain Diff
feat: Ensure map modal does not cover the whole screen
parent
afcc93e5
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!191
Add map module and Open-Meteo support
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/webapp/css/mapModal.css
+13
-10
13 additions, 10 deletions
src/main/webapp/css/mapModal.css
src/main/webapp/js/mapModal.js
+5
-3
5 additions, 3 deletions
src/main/webapp/js/mapModal.js
with
18 additions
and
13 deletions
src/main/webapp/css/mapModal.css
+
13
−
10
View file @
45e0dd1e
...
@@ -2,19 +2,22 @@
...
@@ -2,19 +2,22 @@
display
:
none
;
display
:
none
;
position
:
fixed
;
position
:
fixed
;
z-index
:
1000
;
z-index
:
1000
;
left
:
0
;
left
:
50%
;
top
:
0
;
top
:
50%
;
width
:
10
0%
;
width
:
9
0%
;
height
:
10
0%
;
height
:
9
0%
;
overflow
:
hidden
;
overflow
:
hidden
;
background-color
:
rgba
(
0
,
0
,
0
,
0.9
);
background-color
:
rgba
(
0
,
0
,
0
,
0.9
);
transform
:
translate
(
-50%
,
-50%
);
border
:
2px
solid
#fff
;
box-shadow
:
0
0
10px
rgba
(
0
,
0
,
0
,
0.5
);
border-radius
:
15px
;
}
}
.map-modal-content
{
.map-modal.show
{
position
:
relative
;
display
:
flex
;
height
:
100%
;
justify-content
:
center
;
width
:
100%
;
align-items
:
center
;
background-color
:
#fefefe
;
}
}
#selected-point-info-panel
{
#selected-point-info-panel
{
...
@@ -72,4 +75,4 @@
...
@@ -72,4 +75,4 @@
#new-point-form
{
#new-point-form
{
z-index
:
1200
;
z-index
:
1200
;
position
:
absolute
;
position
:
absolute
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/webapp/js/mapModal.js
+
5
−
3
View file @
45e0dd1e
...
@@ -122,7 +122,7 @@ class MapModal {
...
@@ -122,7 +122,7 @@ class MapModal {
addMapContainer
(
parentDiv
,
id
)
{
addMapContainer
(
parentDiv
,
id
)
{
const
mapContainer
=
document
.
createElement
(
'
div
'
);
const
mapContainer
=
document
.
createElement
(
'
div
'
);
mapContainer
.
id
=
id
;
mapContainer
.
id
=
id
;
mapContainer
.
style
.
height
=
'
100
vh
'
;
mapContainer
.
style
.
height
=
'
100
%
'
;
mapContainer
.
style
.
width
=
'
100%
'
;
mapContainer
.
style
.
width
=
'
100%
'
;
mapContainer
.
style
.
position
=
'
relative
'
;
mapContainer
.
style
.
position
=
'
relative
'
;
parentDiv
.
appendChild
(
mapContainer
);
parentDiv
.
appendChild
(
mapContainer
);
...
@@ -438,7 +438,9 @@ class MapModal {
...
@@ -438,7 +438,9 @@ class MapModal {
* @param zoomLevel
* @param zoomLevel
*/
*/
openModal
(
selectedPointOfInterestId
,
latitude
,
longitude
,
zoomLevel
)
{
openModal
(
selectedPointOfInterestId
,
latitude
,
longitude
,
zoomLevel
)
{
this
.
mapModalElement
.
style
.
display
=
'
block
'
;
this
.
mapModalElement
.
style
.
display
=
'
flex
'
;
this
.
mapModalElement
.
style
.
justifyContent
=
'
center
'
;
this
.
mapModalElement
.
style
.
alignItems
=
'
center
'
;
this
.
initMap
(
latitude
,
longitude
,
zoomLevel
);
this
.
initMap
(
latitude
,
longitude
,
zoomLevel
);
if
(
selectedPointOfInterestId
)
{
if
(
selectedPointOfInterestId
)
{
this
.
selectPointById
(
selectedPointOfInterestId
);
this
.
selectPointById
(
selectedPointOfInterestId
);
...
@@ -643,4 +645,4 @@ const LegendControl = Control.extend({
...
@@ -643,4 +645,4 @@ const LegendControl = Control.extend({
});
});
// Export the module
// Export the module
export
default
MapModal
;
export
default
MapModal
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment