Skip to content

Commit 5b3ecf8

Browse files
committed
Don't change zoom level arbitrarily. Just use point extent
1 parent 5b568ab commit 5b3ecf8

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

app/javascript/controllers/better_together/map_controller.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,7 @@ export default class extends Controller {
9595
return marker
9696
})
9797

98-
const currentZoom = this.map.getZoom()
9998
const bounds = L.latLngBounds(points.map(point => [point.lat, point.lng]))
10099
this.map.fitBounds(bounds)
101-
const newZoom = this.map.getZoom()
102-
const halfwayZoom = (currentZoom + newZoom) / 2
103-
this.map.setZoom(halfwayZoom)
104100
}
105101
}

0 commit comments

Comments
 (0)