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
6e765585
Commit
6e765585
authored
Nov 24, 2017
by
Andrew Hrdy
Browse files
Fix inverted matrix error.
parent
c5e4101a
Pipeline
#1782
passed with stage
in 1 minute and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/containers/FacilityCard.js
View file @
6e765585
...
...
@@ -142,9 +142,19 @@ class FacilityCard extends React.Component {
render
()
{
const
{
facility
,
facilities
,
favorites
,
selectedFacility
,
addFavoriteFacility
,
removeFavoriteFacility
}
=
this
.
props
;
const
{
isMapOpen
,
maxBounds
}
=
this
.
state
;
const
isSelected
=
selectedFacility
.
slug
===
facility
.
slug
;
let
mapCenter
,
mapZoom
;
try
{
mapCenter
=
facility
.
facility_location
.
coordinate_location
.
coordinates
;
mapZoom
=
[
17
];
}
catch
(
e
)
{
mapCenter
=
[(
maxBounds
[
0
][
0
]
+
maxBounds
[
1
][
0
])
/
2
,(
maxBounds
[
0
][
1
]
+
maxBounds
[
1
][
1
])
/
2
];
mapZoom
=
[
13
];
}
return
(
<
Card
onClick
=
{
this
.
handleCardClick
}
className
=
{
classnames
(
'
fc-root
'
,
isSelected
&&
'
fc-selected
'
)}
onMouseEnter
=
{
this
.
handleMouseEnter
}
onMouseLeave
=
{
this
.
handleMouseLeave
}
raised
>
...
...
@@ -193,10 +203,12 @@ class FacilityCard extends React.Component {
<
/CardContent
>
<
MapDialog
open
=
{
this
.
state
.
isMapOpen
}
open
=
{
isMapOpen
}
facilities
=
{
facilities
}
facility
=
{
facility
}
maxBounds
=
{
this
.
state
.
maxBounds
}
maxBounds
=
{
maxBounds
}
zoom
=
{
mapZoom
}
center
=
{
mapCenter
}
onRequestClose
=
{
this
.
toggleMap
}
/
>
<
/Card
>
...
...
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