Skip to content

Commit

Permalink
fix(Next > Map): Set zoom based on photo level
Browse files Browse the repository at this point in the history
  • Loading branch information
danactive committed Jul 11, 2022
1 parent 8d509d5 commit ee9ea76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion next/src/components/SplitViewer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ function SplitViewer({
const handleBeforeSlide = (carouselIndex) => {
setMemoryIndex(carouselIndex)
setViewed(carouselIndex)
const zoom = items[carouselIndex]?.coordinateAccuracy ?? metaZoom
mapRef.current.flyTo({
center: items[carouselIndex].coordinates,
zoom: metaZoom,
zoom,
transitionDuration: 500,
})
}
Expand Down

0 comments on commit ee9ea76

Please sign in to comment.