This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
refs #6779: mobile SDK style transition options #7711
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
aeb20cb
refs #6779: first cut of iOS transition options
incanus b2b0198
use properties instead
incanus 705cb6b
use auto
incanus fb9c416
[core] Fix calculation of delayed transitions
jfirebaugh 59f5e7a
Merge remote-tracking branch 'origin/fix-7720' into 6779-style-transi…
incanus 2c68ae7
re-enable transition delay due to #7756 fix
incanus 2f4ee9c
Merge remote-tracking branch 'origin/master' into 6779-style-transiti…
incanus 16d6a05
pipe Android support
incanus 530e32b
docs comments
incanus 6ddc216
clearer function naming
incanus 1fa75dd
update macos for new function
incanus 71947b6
exercise macos transition options
incanus 264005b
upping checkstyle max file length to 2042 per chat with @zugaldia
incanus d2d4af9
minor comment clarity tweaks
incanus 37f3c54
Merge remote-tracking branch 'origin/master' into 6779-style-transiti…
incanus 6745984
update Android, iOS, and macOS changelogs
incanus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1226,7 +1226,7 @@ - (void)handlePanGesture:(UIPanGestureRecognizer *)pan | |
if (drift) | ||
{ | ||
CGPoint offset = CGPointMake(velocity.x * self.decelerationRate / 4, velocity.y * self.decelerationRate / 4); | ||
_mbglMap->moveBy({ offset.x, offset.y }, MGLDurationInSeconds(self.decelerationRate)); | ||
_mbglMap->moveBy({ offset.x, offset.y }, MGLDurationInSecondsFromTimeInterval(self.decelerationRate)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You’ll need to make corresponding changes to the macOS implementation of MGLMapView. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
|
||
[self notifyGestureDidEndWithDrift:drift]; | ||
|
@@ -1316,7 +1316,7 @@ - (void)handlePinchGesture:(UIPinchGestureRecognizer *)pinch | |
|
||
if (velocity && duration) | ||
{ | ||
_mbglMap->setScale(newScale, mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y }, MGLDurationInSeconds(duration)); | ||
_mbglMap->setScale(newScale, mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y }, MGLDurationInSecondsFromTimeInterval(duration)); | ||
} | ||
|
||
[self notifyGestureDidEndWithDrift:velocity && duration]; | ||
|
@@ -1375,7 +1375,7 @@ - (void)handleRotateGesture:(UIRotationGestureRecognizer *)rotate | |
CGFloat newRadians = radians + velocity * decelerationRate * 0.1; | ||
CGFloat newDegrees = MGLDegreesFromRadians(newRadians) * -1; | ||
|
||
_mbglMap->setBearing(newDegrees, mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y }, MGLDurationInSeconds(decelerationRate)); | ||
_mbglMap->setBearing(newDegrees, mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y }, MGLDurationInSecondsFromTimeInterval(decelerationRate)); | ||
|
||
[self notifyGestureDidEndWithDrift:YES]; | ||
|
||
|
@@ -1504,7 +1504,7 @@ - (void)handleDoubleTapGesture:(UITapGestureRecognizer *)doubleTap | |
CGPoint gesturePoint = [self anchorPointForGesture:doubleTap]; | ||
|
||
mbgl::ScreenCoordinate center(gesturePoint.x, gesturePoint.y); | ||
_mbglMap->scaleBy(2, center, MGLDurationInSeconds(MGLAnimationDuration)); | ||
_mbglMap->scaleBy(2, center, MGLDurationInSecondsFromTimeInterval(MGLAnimationDuration)); | ||
|
||
__weak MGLMapView *weakSelf = self; | ||
|
||
|
@@ -1532,7 +1532,7 @@ - (void)handleTwoFingerTapGesture:(UITapGestureRecognizer *)twoFingerTap | |
CGPoint gesturePoint = [self anchorPointForGesture:twoFingerTap]; | ||
|
||
mbgl::ScreenCoordinate center(gesturePoint.x, gesturePoint.y); | ||
_mbglMap->scaleBy(0.5, center, MGLDurationInSeconds(MGLAnimationDuration)); | ||
_mbglMap->scaleBy(0.5, center, MGLDurationInSecondsFromTimeInterval(MGLAnimationDuration)); | ||
|
||
__weak MGLMapView *weakSelf = self; | ||
|
||
|
@@ -2288,7 +2288,7 @@ - (void)_setCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate edgePaddin | |
mbgl::AnimationOptions animationOptions; | ||
if (duration) | ||
{ | ||
animationOptions.duration.emplace(MGLDurationInSeconds(duration)); | ||
animationOptions.duration.emplace(MGLDurationInSecondsFromTimeInterval(duration)); | ||
animationOptions.easing.emplace(MGLUnitBezierForMediaTimingFunction(function)); | ||
} | ||
if (completion) | ||
|
@@ -2329,7 +2329,7 @@ - (void)setZoomLevel:(double)zoomLevel animated:(BOOL)animated | |
|
||
_mbglMap->setZoom(zoomLevel, | ||
MGLEdgeInsetsFromNSEdgeInsets(self.contentInset), | ||
MGLDurationInSeconds(duration)); | ||
MGLDurationInSecondsFromTimeInterval(duration)); | ||
} | ||
|
||
- (void)setMinimumZoomLevel:(double)minimumZoomLevel | ||
|
@@ -2441,7 +2441,7 @@ - (void)_setVisibleCoordinates:(const CLLocationCoordinate2D *)coordinates count | |
mbgl::AnimationOptions animationOptions; | ||
if (duration > 0) | ||
{ | ||
animationOptions.duration.emplace(MGLDurationInSeconds(duration)); | ||
animationOptions.duration.emplace(MGLDurationInSecondsFromTimeInterval(duration)); | ||
animationOptions.easing.emplace(MGLUnitBezierForMediaTimingFunction(function)); | ||
} | ||
if (completion) | ||
|
@@ -2489,13 +2489,13 @@ - (void)_setDirection:(CLLocationDirection)direction animated:(BOOL)animated | |
{ | ||
_mbglMap->setBearing(direction, | ||
MGLEdgeInsetsFromNSEdgeInsets(self.contentInset), | ||
MGLDurationInSeconds(duration)); | ||
MGLDurationInSecondsFromTimeInterval(duration)); | ||
} | ||
else | ||
{ | ||
CGPoint centerPoint = self.userLocationAnnotationViewCenter; | ||
_mbglMap->setBearing(direction, mbgl::ScreenCoordinate { centerPoint.x, centerPoint.y }, | ||
MGLDurationInSeconds(duration)); | ||
MGLDurationInSecondsFromTimeInterval(duration)); | ||
} | ||
} | ||
|
||
|
@@ -2548,7 +2548,7 @@ - (void)setCamera:(MGLMapCamera *)camera withDuration:(NSTimeInterval)duration a | |
mbgl::AnimationOptions animationOptions; | ||
if (duration > 0) | ||
{ | ||
animationOptions.duration.emplace(MGLDurationInSeconds(duration)); | ||
animationOptions.duration.emplace(MGLDurationInSecondsFromTimeInterval(duration)); | ||
animationOptions.easing.emplace(MGLUnitBezierForMediaTimingFunction(function)); | ||
} | ||
if (completion) | ||
|
@@ -2594,7 +2594,7 @@ - (void)_flyToCamera:(MGLMapCamera *)camera edgePadding:(UIEdgeInsets)insets wit | |
mbgl::AnimationOptions animationOptions; | ||
if (duration >= 0) | ||
{ | ||
animationOptions.duration = MGLDurationInSeconds(duration); | ||
animationOptions.duration = MGLDurationInSecondsFromTimeInterval(duration); | ||
} | ||
if (peakAltitude >= 0) | ||
{ | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, I overlooked the fact that changes to the style URL can also be animated. That’s kind of awkward, since changing the style URL means swapping one MGLStyle object for another.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, #5665 makes it sound like we don’t have “diff and patch” functionality in mbgl yet. Has the situation changed since July?