Constrain center in ol.interaction.Interaction.pan
This commit is contained in:
committed by
Frederic Junod
parent
73b9b6b6a0
commit
92f7f14744
@@ -42,7 +42,9 @@ ol.interaction.Interaction.pan = function(
|
|||||||
easing: ol.easing.linear
|
easing: ol.easing.linear
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
view.setCenter([currentCenter[0] + delta[0], currentCenter[1] + delta[1]]);
|
var center = view.constrainCenter(
|
||||||
|
[currentCenter[0] + delta[0], currentCenter[1] + delta[1]]);
|
||||||
|
view.setCenter(center);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user