[core, ios, osx] Tilt around visual center point
The tilt gesture on both iOS and OS X now respects the content insets. On iOS, in user tracking mode, it additionally respects the user dot’s position if it’s aligned to the top or bottom of the view.
This commit is contained in:
committed by
Minh Nguyễn
parent
97fc2120c4
commit
8a23bdcd01
@@ -357,7 +357,11 @@ void Map::resetNorth(const Duration& duration) {
|
||||
#pragma mark - Pitch
|
||||
|
||||
void Map::setPitch(double pitch, const Duration& duration) {
|
||||
transform->setPitch(pitch * M_PI / 180, duration);
|
||||
setPitch(pitch, {NAN, NAN}, duration);
|
||||
}
|
||||
|
||||
void Map::setPitch(double pitch, const PrecisionPoint& anchor, const Duration& duration) {
|
||||
transform->setPitch(pitch * M_PI / 180, anchor, duration);
|
||||
update(Update::Repaint);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user