diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-01-07 15:54:08 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-01-07 15:54:08 -0800 |
commit | d3a2ffe747550216b19d678c40980231baeeef11 (patch) | |
tree | c615731800743f5278cae4059afd69b1d973da16 /platform/darwin/scripts/generate-style-code.js | |
parent | bf8d037fca3a5e76818f2cd546e783814f046019 (diff) | |
download | qtlocation-mapboxgl-d3a2ffe747550216b19d678c40980231baeeef11.tar.gz |
[ios, macos] Fixed links to paint properties in style spec
Diffstat (limited to 'platform/darwin/scripts/generate-style-code.js')
-rw-r--r-- | platform/darwin/scripts/generate-style-code.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js index dfc0d64ec2..a5fff0322d 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 <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; |