Constraint center when using trackpad to zoom
This commit is contained in:
1 parent
395d833dd6
commit
7f1f3fd6fe
1 file changed
+1
-1
@@ -183,7 +183,7 @@ ol.interaction.MouseWheelZoom.handleEvent = function(mapBrowserEvent) {
|
||||
}
|
||||
if (this.lastAnchor_) {
|
||||
var center = view.calculateCenterZoom(resolution, this.lastAnchor_);
|
||||
view.setCenter(center);
|
||||
view.setCenter(view.constrainCenter(center));
|
||||
}
|
||||
view.setResolution(resolution);
|
||||
if (rebound > 0) {
|
||||
|
||||
Reference in new issue
Block a user