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

Commit

Permalink
[ios, macos] Fixed links to paint properties in style spec
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Jan 7, 2017
1 parent bf8d037 commit d3a2ffe
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 17 deletions.
11 changes: 10 additions & 1 deletion platform/darwin/scripts/generate-style-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,16 @@ global.propertyDoc = function (propertyName, property, layerType, kind) {
doc += '\n\n' + propertyReqs(property, spec[`${kind}_${layerType}`], layerType);
}
if ('original' in property) {
doc += `\n\nThis attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-${layerType}-${property.original}"><code>${property.original}</code></a> layout property in the Mapbox Style Specification.`;
let anchor;
switch (kind) {
case 'layout':
anchor = `layout-${layerType}-${property.original}`;
break;
case 'paint':
anchor = `paint-${property.original}`;
break;
}
doc += `\n\nThis attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#${anchor}"><code>${property.original}</code></a> layout property in the Mapbox Style Specification.`;
}
}
return doc;
Expand Down
6 changes: 3 additions & 3 deletions platform/darwin/src/MGLCircleStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslationAnchor) {
`nil` to reset it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-circle-circle-pitch-scale"><code>circle-pitch-scale</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-pitch-scale"><code>circle-pitch-scale</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleScaleAlignment;
Expand All @@ -155,7 +155,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslationAnchor) {
default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-circle-circle-translate"><code>circle-translate</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-translate"><code>circle-translate</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleTranslation;
Expand All @@ -173,7 +173,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslationAnchor) {
Otherwise, it is ignored.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-circle-circle-translate-anchor"><code>circle-translate-anchor</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-translate-anchor"><code>circle-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleTranslationAnchor;
Expand Down
6 changes: 3 additions & 3 deletions platform/darwin/src/MGLFillStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslationAnchor) {
the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-fill-fill-antialias"><code>fill-antialias</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-antialias"><code>fill-antialias</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable, getter=isFillAntialiased) MGLStyleValue<NSNumber *> *fillAntialiased;
Expand Down Expand Up @@ -129,7 +129,7 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslationAnchor) {
default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-fill-fill-translate"><code>fill-translate</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-translate"><code>fill-translate</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillTranslation;
Expand All @@ -147,7 +147,7 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslationAnchor) {
Otherwise, it is ignored.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-fill-fill-translate-anchor"><code>fill-translate-anchor</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-translate-anchor"><code>fill-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillTranslationAnchor;
Expand Down
6 changes: 3 additions & 3 deletions platform/darwin/src/MGLLineStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslationAnchor) {
Otherwise, it is ignored.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-line-line-dasharray"><code>line-dasharray</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-line-dasharray"><code>line-dasharray</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSArray<NSNumber *> *> *lineDashPattern;
Expand Down Expand Up @@ -260,7 +260,7 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslationAnchor) {
default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-line-line-translate"><code>line-translate</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-line-translate"><code>line-translate</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslation;
Expand All @@ -278,7 +278,7 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslationAnchor) {
Otherwise, it is ignored.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-line-line-translate-anchor"><code>line-translate-anchor</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-line-translate-anchor"><code>line-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslationAnchor;
Expand Down
6 changes: 3 additions & 3 deletions platform/darwin/src/MGLRasterStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-raster-raster-brightness-max"><code>raster-brightness-max</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-brightness-max"><code>raster-brightness-max</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *maximumRasterBrightness;
Expand All @@ -61,7 +61,7 @@ NS_ASSUME_NONNULL_BEGIN
it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-raster-raster-brightness-min"><code>raster-brightness-min</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-brightness-min"><code>raster-brightness-min</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *minimumRasterBrightness;
Expand Down Expand Up @@ -98,7 +98,7 @@ NS_ASSUME_NONNULL_BEGIN
it to the default value.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-raster-raster-hue-rotate"><code>raster-hue-rotate</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-hue-rotate"><code>raster-hue-rotate</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterHueRotation;
Expand Down
8 changes: 4 additions & 4 deletions platform/darwin/src/MGLSymbolStyleLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) {
Otherwise, it is ignored.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-translate"><code>icon-translate</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-icon-translate"><code>icon-translate</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTranslation;
Expand All @@ -978,7 +978,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) {
`iconTranslation` is non-`nil`. Otherwise, it is ignored.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-translate-anchor"><code>icon-translate-anchor</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-icon-translate-anchor"><code>icon-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTranslationAnchor;
Expand Down Expand Up @@ -1092,7 +1092,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) {
it is ignored.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-translate"><code>text-translate</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-text-translate"><code>text-translate</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTranslation;
Expand All @@ -1110,7 +1110,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) {
`textTranslation` is non-`nil`. Otherwise, it is ignored.
This attribute corresponds to the <a
href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-translate-anchor"><code>text-translate-anchor</code></a>
href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-text-translate-anchor"><code>text-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTranslationAnchor;
Expand Down

0 comments on commit d3a2ffe

Please sign in to comment.