[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
@@ -523,12 +523,17 @@ double Transform::getAngle() const {
|
||||
#pragma mark - Pitch
|
||||
|
||||
void Transform::setPitch(double pitch, const Duration& duration) {
|
||||
setPitch(pitch, {NAN, NAN}, duration);
|
||||
}
|
||||
|
||||
void Transform::setPitch(double pitch, const PrecisionPoint& anchor, const Duration& duration) {
|
||||
if (std::isnan(pitch)) {
|
||||
return;
|
||||
}
|
||||
|
||||
CameraOptions camera;
|
||||
camera.pitch = pitch;
|
||||
camera.anchor = anchor;
|
||||
easeTo(camera, duration);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user