From d3a2ffe747550216b19d678c40980231baeeef11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Sat, 7 Jan 2017 15:54:08 -0800 Subject: [PATCH] [ios, macos] Fixed links to paint properties in style spec --- platform/darwin/scripts/generate-style-code.js | 11 ++++++++++- platform/darwin/src/MGLCircleStyleLayer.h | 6 +++--- platform/darwin/src/MGLFillStyleLayer.h | 6 +++--- platform/darwin/src/MGLLineStyleLayer.h | 6 +++--- platform/darwin/src/MGLRasterStyleLayer.h | 6 +++--- platform/darwin/src/MGLSymbolStyleLayer.h | 8 ++++---- 6 files changed, 26 insertions(+), 17 deletions(-) diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js index dfc0d64ec2d..a5fff0322df 100644 --- a/platform/darwin/scripts/generate-style-code.js +++ b/platform/darwin/scripts/generate-style-code.js @@ -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 ${property.original} 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 ${property.original} layout property in the Mapbox Style Specification.`; } } return doc; diff --git a/platform/darwin/src/MGLCircleStyleLayer.h b/platform/darwin/src/MGLCircleStyleLayer.h index cdb51f0819f..87839467a99 100644 --- a/platform/darwin/src/MGLCircleStyleLayer.h +++ b/platform/darwin/src/MGLCircleStyleLayer.h @@ -137,7 +137,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslationAnchor) { `nil` to reset it to the default value. This attribute corresponds to the circle-pitch-scale + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-pitch-scale">circle-pitch-scale layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *circleScaleAlignment; @@ -155,7 +155,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslationAnchor) { default value. This attribute corresponds to the circle-translate + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-translate">circle-translate layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *circleTranslation; @@ -173,7 +173,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslationAnchor) { Otherwise, it is ignored. This attribute corresponds to the circle-translate-anchor + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-translate-anchor">circle-translate-anchor layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *circleTranslationAnchor; diff --git a/platform/darwin/src/MGLFillStyleLayer.h b/platform/darwin/src/MGLFillStyleLayer.h index f46998be5b4..8bdf177a300 100644 --- a/platform/darwin/src/MGLFillStyleLayer.h +++ b/platform/darwin/src/MGLFillStyleLayer.h @@ -60,7 +60,7 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslationAnchor) { the default value. This attribute corresponds to the fill-antialias + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-antialias">fill-antialias layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable, getter=isFillAntialiased) MGLStyleValue *fillAntialiased; @@ -129,7 +129,7 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslationAnchor) { default value. This attribute corresponds to the fill-translate + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-translate">fill-translate layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *fillTranslation; @@ -147,7 +147,7 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslationAnchor) { Otherwise, it is ignored. This attribute corresponds to the fill-translate-anchor + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-translate-anchor">fill-translate-anchor layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *fillTranslationAnchor; diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h index 75a71a3923c..f25acecf972 100644 --- a/platform/darwin/src/MGLLineStyleLayer.h +++ b/platform/darwin/src/MGLLineStyleLayer.h @@ -201,7 +201,7 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslationAnchor) { Otherwise, it is ignored. This attribute corresponds to the line-dasharray + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-line-dasharray">line-dasharray layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *> *lineDashPattern; @@ -260,7 +260,7 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslationAnchor) { default value. This attribute corresponds to the line-translate + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-line-translate">line-translate layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *lineTranslation; @@ -278,7 +278,7 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslationAnchor) { Otherwise, it is ignored. This attribute corresponds to the line-translate-anchor + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-line-translate-anchor">line-translate-anchor layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *lineTranslationAnchor; diff --git a/platform/darwin/src/MGLRasterStyleLayer.h b/platform/darwin/src/MGLRasterStyleLayer.h index 45ab25a8f1b..54a3149e8c2 100644 --- a/platform/darwin/src/MGLRasterStyleLayer.h +++ b/platform/darwin/src/MGLRasterStyleLayer.h @@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN it to the default value. This attribute corresponds to the raster-brightness-max + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-brightness-max">raster-brightness-max layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *maximumRasterBrightness; @@ -61,7 +61,7 @@ NS_ASSUME_NONNULL_BEGIN it to the default value. This attribute corresponds to the raster-brightness-min + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-brightness-min">raster-brightness-min layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *minimumRasterBrightness; @@ -98,7 +98,7 @@ NS_ASSUME_NONNULL_BEGIN it to the default value. This attribute corresponds to the raster-hue-rotate + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-hue-rotate">raster-hue-rotate layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *rasterHueRotation; diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h index 264d3adb0fe..278c582c932 100644 --- a/platform/darwin/src/MGLSymbolStyleLayer.h +++ b/platform/darwin/src/MGLSymbolStyleLayer.h @@ -960,7 +960,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) { Otherwise, it is ignored. This attribute corresponds to the icon-translate + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-icon-translate">icon-translate layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *iconTranslation; @@ -978,7 +978,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) { `iconTranslation` is non-`nil`. Otherwise, it is ignored. This attribute corresponds to the icon-translate-anchor + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-icon-translate-anchor">icon-translate-anchor layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *iconTranslationAnchor; @@ -1092,7 +1092,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) { it is ignored. This attribute corresponds to the text-translate + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-text-translate">text-translate layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *textTranslation; @@ -1110,7 +1110,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) { `textTranslation` is non-`nil`. Otherwise, it is ignored. This attribute corresponds to the text-translate-anchor + href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-text-translate-anchor">text-translate-anchor layout property in the Mapbox Style Specification. */ @property (nonatomic, null_resettable) MGLStyleValue *textTranslationAnchor;