Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Website
Commits
2442f962
Commit
2442f962
authored
Apr 09, 2019
by
Matija Obreza
Browse files
Fix: invalid map bounds with 0 georeferenced accessions
parent
a5e831ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/accessions/ui/MapPage.tsx
View file @
2442f962
...
...
@@ -321,13 +321,15 @@ class BrowsePage extends React.Component<IMapPageProps, any> {
return
<
Loading
/>;
}
if
(
Math
.
abs
(
mapInfo
.
bounds
[
0
][
0
]
-
mapInfo
.
bounds
[
1
][
0
])
<
Math
.
abs
(
initialBounds
[
0
][
0
]
-
initialBounds
[
1
][
0
]))
{
initialBounds
[
0
][
0
]
=
mapInfo
.
bounds
[
0
][
0
];
initialBounds
[
1
][
0
]
=
mapInfo
.
bounds
[
1
][
0
];
}
if
(
Math
.
abs
(
mapInfo
.
bounds
[
0
][
1
]
-
mapInfo
.
bounds
[
1
][
1
])
<
Math
.
abs
(
initialBounds
[
0
][
1
]
-
initialBounds
[
1
][
1
]))
{
initialBounds
[
0
][
1
]
=
mapInfo
.
bounds
[
0
][
1
];
initialBounds
[
1
][
1
]
=
mapInfo
.
bounds
[
1
][
1
];
if
(
mapInfo
.
bounds
[
0
][
0
]
!==
null
&&
mapInfo
.
bounds
[
1
][
0
]
!==
null
)
{
if
(
Math
.
abs
(
mapInfo
.
bounds
[
0
][
0
]
-
mapInfo
.
bounds
[
1
][
0
])
<
Math
.
abs
(
initialBounds
[
0
][
0
]
-
initialBounds
[
1
][
0
]))
{
initialBounds
[
0
][
0
]
=
mapInfo
.
bounds
[
0
][
0
];
initialBounds
[
1
][
0
]
=
mapInfo
.
bounds
[
1
][
0
];
}
if
(
Math
.
abs
(
mapInfo
.
bounds
[
0
][
1
]
-
mapInfo
.
bounds
[
1
][
1
])
<
Math
.
abs
(
initialBounds
[
0
][
1
]
-
initialBounds
[
1
][
1
]))
{
initialBounds
[
0
][
1
]
=
mapInfo
.
bounds
[
0
][
1
];
initialBounds
[
1
][
1
]
=
mapInfo
.
bounds
[
1
][
1
];
}
}
const
suggestionTerms
=
new
Map
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment