Merge pull request #1975 from fredj/rotation-anchor
Rotate around arbitrary coordinate
This commit is contained in:
@@ -128,11 +128,7 @@ ol.interaction.Interaction.rotateWithoutConstraints =
|
||||
}
|
||||
}
|
||||
goog.asserts.assertInstanceof(view, ol.View2D);
|
||||
if (goog.isDefAndNotNull(opt_anchor)) {
|
||||
var center = view.calculateCenterRotate(rotation, opt_anchor);
|
||||
view.setCenter(center);
|
||||
}
|
||||
view.setRotation(rotation);
|
||||
view.rotate(rotation, opt_anchor);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user