[ios, macos] Renames MGLStyle.enablePlacementTransitions (#13685)
* [ios, macos] Rename enablePlacementTransitions to performsPlacementTransitions. * [ios, macos] Update changelogs.
This commit is contained in:
committed by
GitHub
parent
9e3a64970f
commit
4a858eb381
@@ -275,7 +275,7 @@ MGL_EXPORT
|
||||
|
||||
The default value of this property is `YES`.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL enablePlacementTransitions;
|
||||
@property (nonatomic, assign) BOOL performsPlacementTransitions;
|
||||
|
||||
/**
|
||||
Returns a source with the given identifier in the current style.
|
||||
|
||||
@@ -534,14 +534,14 @@ static_assert(6 == mbgl::util::default_styles::numOrderedStyles,
|
||||
return MGLTransitionFromOptions(transitionOptions);
|
||||
}
|
||||
|
||||
- (void)setEnablePlacementTransitions:(BOOL)enablePlacementTransitions
|
||||
- (void)setPerformsPlacementTransitions:(BOOL)performsPlacementTransitions
|
||||
{
|
||||
mbgl::style::TransitionOptions transitionOptions = self.rawStyle->getTransitionOptions();
|
||||
transitionOptions.enablePlacementTransitions = static_cast<bool>(enablePlacementTransitions);
|
||||
transitionOptions.enablePlacementTransitions = static_cast<bool>(performsPlacementTransitions);
|
||||
self.rawStyle->setTransitionOptions(transitionOptions);
|
||||
}
|
||||
|
||||
- (BOOL)enablePlacementTransitions
|
||||
- (BOOL)performsPlacementTransitions
|
||||
{
|
||||
mbgl::style::TransitionOptions transitionOptions = self.rawStyle->getTransitionOptions();
|
||||
return transitionOptions.enablePlacementTransitions;
|
||||
|
||||
@@ -482,12 +482,12 @@
|
||||
XCTAssert(self.style.transition.duration == transitionTest.duration);
|
||||
}
|
||||
|
||||
- (void)testEnablePlacementTransition
|
||||
- (void)testPerformsPlacementTransitions
|
||||
{
|
||||
XCTAssertTrue(self.style.enablePlacementTransitions, @"The default value for enabling placement transitions should be YES.");
|
||||
XCTAssertTrue(self.style.performsPlacementTransitions, @"The default value for enabling placement transitions should be YES.");
|
||||
|
||||
self.style.enablePlacementTransitions = NO;
|
||||
XCTAssertFalse(self.style.enablePlacementTransitions, @"Enabling placement transitions should be NO.");
|
||||
self.style.performsPlacementTransitions = NO;
|
||||
XCTAssertFalse(self.style.performsPlacementTransitions, @"Enabling placement transitions should be NO.");
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -4,7 +4,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
|
||||
|
||||
## master
|
||||
|
||||
* Added an `MGLStyle.enablePlacementTransitions` property to control how long it takes for colliding labels to fade out. ([#13565](https://github.com/mapbox/mapbox-gl-native/pull/13565))
|
||||
* Added an `MGLStyle.performsPlacementTransitions` property to control how long it takes for colliding labels to fade out. ([#13565](https://github.com/mapbox/mapbox-gl-native/pull/13565))
|
||||
* Fixed a crash when casting large numbers in `NSExpression`. ([#13580](https://github.com/mapbox/mapbox-gl-native/pull/13580))
|
||||
|
||||
## 4.7.0 - December 18, 2018
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## master
|
||||
|
||||
* Added an `MGLStyle.enablePlacementTransitions` property to control how long it takes for colliding labels to fade out. ([#13565](https://github.com/mapbox/mapbox-gl-native/pull/13565))
|
||||
* Added an `MGLStyle.performsPlacementTransitions` property to control how long it takes for colliding labels to fade out. ([#13565](https://github.com/mapbox/mapbox-gl-native/pull/13565))
|
||||
* Fixed a crash when casting large numbers in `NSExpression`. ([#13580](https://github.com/mapbox/mapbox-gl-native/pull/13580))
|
||||
|
||||
## 0.13.0 - December 20, 2018
|
||||
|
||||
Reference in New Issue
Block a user