Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open-web
Commits
c5e4101a
Commit
c5e4101a
authored
Nov 24, 2017
by
Andrew Hrdy
Browse files
Merge remote-tracking branch 'origin/master'
parents
5c80c9d4
d603609d
Pipeline
#1781
passed with stage
in 1 minute and 41 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/components/FacilitiesMap.js
View file @
c5e4101a
...
...
@@ -105,10 +105,10 @@ class FacilitiesMap extends React.Component {
let
center
,
zoom
;
try
{
center
=
facility
.
facility_location
.
coordinate_location
.
coordinates
;
zoom
=
17
;
zoom
=
[
17
]
;
}
catch
(
e
){
center
=
[(
maxBounds
[
0
][
0
]
+
maxBounds
[
1
][
0
])
/
2
,(
maxBounds
[
0
][
1
]
+
maxBounds
[
1
][
1
])
/
2
]
zoom
=
13
;
zoom
=
[
13
]
;
}
return
(
<
div
className
=
{
classes
.
mapContainer
}
style
=
{{
'
transform
'
:
isMapOpen
?
'
translateY(0px)
'
:
'
translateY(436px)
'
}}
>
...
...
@@ -139,9 +139,10 @@ class FacilitiesMap extends React.Component {
}}
center
=
{
center
}
zoom
=
{
[
zoom
]
}
zoom
=
{
zoom
}
fitBounds
=
{
fitBounds
}
fitBoundsOptions
=
{
fitBoundsOptions
}
zoom
=
{
zoom
}
maxBounds
=
{
maxBounds
}
>
{(
facilities
.
length
>
0
)
&&
facilities
.
map
((
item
)
=>
{
return
(
...
...
@@ -161,6 +162,8 @@ class FacilitiesMap extends React.Component {
facilities
=
{
facilities
}
facility
=
{
facility
}
maxBounds
=
{
maxBounds
}
zoom
=
{
zoom
}
center
=
{
center
}
onRequestClose
=
{
this
.
handleRequestClose
}
/
>
<
/div
>
...
...
src/components/MapDialog.js
View file @
c5e4101a
...
...
@@ -44,15 +44,7 @@ class MapDialog extends React.Component {
};
render
()
{
const
{
classes
,
selectedValue
,
facility
,
facilities
,
maxBounds
,...
other
}
=
this
.
props
;
let
center
,
zoom
try
{
center
=
facility
.
facility_location
.
coordinate_location
.
coordinates
;
zoom
=
17
;
}
catch
(
e
){
zoom
=
13
;
center
=
[(
maxBounds
[
0
][
0
]
+
maxBounds
[
1
][
0
])
/
2
,(
maxBounds
[
0
][
1
]
+
maxBounds
[
1
][
1
])
/
2
]
}
const
{
classes
,
selectedValue
,
facility
,
facilities
,
zoom
,
center
,
maxBounds
,...
other
}
=
this
.
props
;
return
(
<
Dialog
onRequestClose
=
{
this
.
handleRequestClose
}
{...
other
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment