Skip to content

Commit 6b9b9c5

Browse files
committed
fix: Set fitbounds duration to 0
1 parent 31b17c7 commit 6b9b9c5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/pages/CollectionDetail/CollectionMap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function CollectionMap({ collection }: CollectionMapProps) {
5454
bounds.extend([x1, y1, x2, y2] );
5555
}
5656
[x1, y1, x2, y2] = bounds.toArray().flat();
57-
map.fitBounds([x1, y1, x2, y2], { padding: 30, duration: 10 });
57+
map.fitBounds([x1, y1, x2, y2], { padding: 30, duration: 0 });
5858
}
5959
}, [collection, map]);
6060

src/pages/ItemDetail/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function ItemDetail() {
4545

4646
if (map && bounds) {
4747
const [x1, y1, x2, y2] = bounds;
48-
map.fitBounds([x1, y1, x2, y2], { padding: 30, duration: 10 });
48+
map.fitBounds([x1, y1, x2, y2], { padding: 30, duration: 0 });
4949
}
5050
}, [item, map]);
5151

0 commit comments

Comments
 (0)