Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Per-attribute transition properties on MGLStyleLayer #8225

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[ios] Added a factory method for MGLTransition and transition-related…
… methods to NSValue(MGLAdditions)
fabian-guerra committed Mar 10, 2017
commit 09f6f9ff2d49664f72bf87fda2e1c24bdbe2f1d1
6 changes: 3 additions & 3 deletions platform/darwin/src/MGLBackgroundStyleLayer.h
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `backgroundColor` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `background-color-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition backgroundColorTransition;

@@ -94,7 +94,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `backgroundOpacity` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `background-opacity-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition backgroundOpacityTransition;

@@ -114,7 +114,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `backgroundPattern` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `background-pattern-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition backgroundPatternTransition;

20 changes: 9 additions & 11 deletions platform/darwin/src/MGLCircleStyleLayer.h
Original file line number Diff line number Diff line change
@@ -110,7 +110,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `circleBlur` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `circle-blur-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleBlurTransition;

@@ -169,7 +169,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `circleColor` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `circle-color-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleColorTransition;

@@ -201,7 +201,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `circleOpacity` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `circle-opacity-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleOpacityTransition;

@@ -235,7 +235,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `circleRadius` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `circle-radius-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleRadiusTransition;

@@ -258,7 +258,6 @@ MGL_EXPORT
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleScaleAlignment;


@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circlePitchScale __attribute__((unavailable("Use circleScaleAlignment instead.")));

#if TARGET_OS_IPHONE
@@ -316,7 +315,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `circleStrokeColor` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `circle-stroke-color-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleStrokeColorTransition;

@@ -348,7 +347,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `circleStrokeOpacity` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `circle-stroke-opacity-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleStrokeOpacityTransition;

@@ -383,7 +382,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `circleStrokeWidth` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `circle-stroke-width-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleStrokeWidthTransition;

@@ -434,9 +433,9 @@ MGL_EXPORT
#endif

/**
The transition affecting any changes to this layer’s `circleTranslate` property.
The transition affecting any changes to this layer’s `circleTranslation` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `circle-translate-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition circleTranslationTransition;

@@ -464,7 +463,6 @@ MGL_EXPORT
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleTranslationAnchor;


@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleTranslateAnchor __attribute__((unavailable("Use circleTranslationAnchor instead.")));

@end
14 changes: 6 additions & 8 deletions platform/darwin/src/MGLFillStyleLayer.h
Original file line number Diff line number Diff line change
@@ -73,7 +73,6 @@ MGL_EXPORT
*/
@property (nonatomic, null_resettable, getter=isFillAntialiased) MGLStyleValue<NSNumber *> *fillAntialiased;


@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *fillAntialias __attribute__((unavailable("Use fillAntialiased instead.")));

#if TARGET_OS_IPHONE
@@ -137,7 +136,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `fillColor` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `fill-color-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillColorTransition;

@@ -170,7 +169,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `fillOpacity` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `fill-opacity-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillOpacityTransition;

@@ -229,7 +228,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `fillOutlineColor` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `fill-outline-color-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillOutlineColorTransition;

@@ -248,7 +247,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `fillPattern` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `fill-pattern-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillPatternTransition;

@@ -299,9 +298,9 @@ MGL_EXPORT
#endif

/**
The transition affecting any changes to this layer’s `fillTranslate` property.
The transition affecting any changes to this layer’s `fillTranslation` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `fill-translate-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition fillTranslationTransition;

@@ -329,7 +328,6 @@ MGL_EXPORT
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillTranslationAnchor;


@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillTranslateAnchor __attribute__((unavailable("Use fillTranslationAnchor instead.")));

@end
23 changes: 11 additions & 12 deletions platform/darwin/src/MGLLineStyleLayer.h
Original file line number Diff line number Diff line change
@@ -211,7 +211,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `lineBlur` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `line-blur-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition lineBlurTransition;

@@ -276,7 +276,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `lineColor` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `line-color-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition lineColorTransition;

@@ -303,9 +303,9 @@ MGL_EXPORT
@property (nonatomic, null_resettable) MGLStyleValue<NSArray<NSNumber *> *> *lineDashPattern;

/**
The transition affecting any changes to this layer’s `lineDasharray` property.
The transition affecting any changes to this layer’s `lineDashPattern` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `line-dasharray-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition lineDashPatternTransition;

@@ -342,7 +342,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `lineGapWidth` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `line-gap-width-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition lineGapWidthTransition;

@@ -379,7 +379,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `lineOffset` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `line-offset-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition lineOffsetTransition;

@@ -411,7 +411,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `lineOpacity` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `line-opacity-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition lineOpacityTransition;

@@ -430,7 +430,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `linePattern` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `line-pattern-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition linePatternTransition;

@@ -481,9 +481,9 @@ MGL_EXPORT
#endif

/**
The transition affecting any changes to this layer’s `lineTranslate` property.
The transition affecting any changes to this layer’s `lineTranslation` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `line-translate-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition lineTranslationTransition;

@@ -511,7 +511,6 @@ MGL_EXPORT
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslationAnchor;


@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslateAnchor __attribute__((unavailable("Use lineTranslationAnchor instead.")));

/**
@@ -535,7 +534,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `lineWidth` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `line-width-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition lineWidthTransition;

20 changes: 10 additions & 10 deletions platform/darwin/src/MGLRasterStyleLayer.h
Original file line number Diff line number Diff line change
@@ -60,9 +60,9 @@ MGL_EXPORT
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *maximumRasterBrightness;

/**
The transition affecting any changes to this layer’s `rasterBrightnessMax` property.
The transition affecting any changes to this layer’s `maximumRasterBrightness` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `raster-brightness-max-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition maximumRasterBrightnessTransition;

@@ -90,9 +90,9 @@ MGL_EXPORT
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *minimumRasterBrightness;

/**
The transition affecting any changes to this layer’s `rasterBrightnessMin` property.
The transition affecting any changes to this layer’s `minimumRasterBrightness` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `raster-brightness-min-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition minimumRasterBrightnessTransition;

@@ -117,7 +117,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `rasterContrast` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `raster-contrast-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition rasterContrastTransition;

@@ -142,7 +142,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `rasterFadeDuration` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `raster-fade-duration-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition rasterFadeDurationTransition;

@@ -169,9 +169,9 @@ MGL_EXPORT
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterHueRotation;

/**
The transition affecting any changes to this layer’s `rasterHueRotate` property.
The transition affecting any changes to this layer’s `rasterHueRotation` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `raster-hue-rotate-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition rasterHueRotationTransition;

@@ -196,7 +196,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `rasterOpacity` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `raster-opacity-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition rasterOpacityTransition;

@@ -219,7 +219,7 @@ MGL_EXPORT
/**
The transition affecting any changes to this layer’s `rasterSaturation` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `raster-saturation-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition rasterSaturationTransition;

6 changes: 3 additions & 3 deletions platform/darwin/src/MGLStyleLayer.h.ejs
Original file line number Diff line number Diff line change
@@ -113,13 +113,13 @@ MGL_EXPORT

<% if (property["transition"]) { -%>
/**
The transition affecting any changes to this layer’s `<%- camelizeWithLeadingLowercase(originalPropertyName(property)) %>` property.
The transition affecting any changes to this layer’s `<%- camelizeWithLeadingLowercase(property.name) %>` property.

This property corresponds to the background-color-transition property in the style JSON file format.
This property corresponds to the `<%- originalPropertyName(property) %>-transition` property in the style JSON file format.
*/
@property (nonatomic) MGLTransition <%- camelizeWithLeadingLowercase(property.name) %>Transition;
<% } -%>

<% } -%>
<% if (property.original) { -%>
@property (nonatomic<% if (!property.required) { %>, null_resettable<% } %>) MGLStyleValue<<%- propertyType(property, true) %>> *<%- camelizeWithLeadingLowercase(originalPropertyName(property)) %> __attribute__((unavailable("Use <%- camelizeWithLeadingLowercase(property.name) %> instead.")));

Loading