View / add adjust* methods to manipulate the view more easily
API changes: * (breaking) the `rotate` method is gone * the `adjustRotation`, `adjustResolution` and `adjustZoom` methods are now available and allow using an anchor. This means interactions do not have to do the anchor computation themselves and this also fix anchor computation when constraints must be applied.
This commit is contained in:
@@ -118,9 +118,8 @@ class PinchRotate extends PointerInteraction {
|
||||
|
||||
// rotate
|
||||
if (this.rotating_) {
|
||||
const rotation = view.getRotation();
|
||||
map.render();
|
||||
rotate(view, rotation + rotationDelta, this.anchor_);
|
||||
view.adjustRotation(rotationDelta, this.anchor_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user