From 4a858eb381ab339ed6634ad05efe4a3d555a7f35 Mon Sep 17 00:00:00 2001 From: Fabian Guerra Soto Date: Tue, 8 Jan 2019 11:56:25 -0600 Subject: [ios, macos] Renames MGLStyle.enablePlacementTransitions (#13685) * [ios, macos] Rename enablePlacementTransitions to performsPlacementTransitions. * [ios, macos] Update changelogs. --- platform/darwin/src/MGLStyle.h | 2 +- platform/darwin/src/MGLStyle.mm | 6 +++--- platform/darwin/test/MGLStyleTests.mm | 8 ++++---- platform/ios/CHANGELOG.md | 2 +- platform/macos/CHANGELOG.md | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h index 547b7ccee5..4972524c95 100644 --- a/platform/darwin/src/MGLStyle.h +++ b/platform/darwin/src/MGLStyle.h @@ -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. diff --git a/platform/darwin/src/MGLStyle.mm b/platform/darwin/src/MGLStyle.mm index 82fed5e922..5768a7aaa7 100644 --- a/platform/darwin/src/MGLStyle.mm +++ b/platform/darwin/src/MGLStyle.mm @@ -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(enablePlacementTransitions); + transitionOptions.enablePlacementTransitions = static_cast(performsPlacementTransitions); self.rawStyle->setTransitionOptions(transitionOptions); } -- (BOOL)enablePlacementTransitions +- (BOOL)performsPlacementTransitions { mbgl::style::TransitionOptions transitionOptions = self.rawStyle->getTransitionOptions(); return transitionOptions.enablePlacementTransitions; diff --git a/platform/darwin/test/MGLStyleTests.mm b/platform/darwin/test/MGLStyleTests.mm index ff075f63a6..7aaf70a80a 100644 --- a/platform/darwin/test/MGLStyleTests.mm +++ b/platform/darwin/test/MGLStyleTests.mm @@ -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 diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 58c6cf3476..aae0cc66c3 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -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 diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index 4783e23c2a..11908f0f18 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -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 -- cgit v1.2.1