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

Commit

Permalink
Better way to exclude a paint property from generate-style-code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLoer committed Apr 24, 2018
1 parent a10543f commit 46edc83
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion platform/android/scripts/generate-style-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ var layers = Object.keys(spec.layer.type.values).map((type) => {
}, []);

const paintProperties = Object.keys(spec[`paint_${type}`]).reduce((memo, name) => {
if (name === 'line-gradient') return memo;
spec[`paint_${type}`][name].name = name;
memo.push(spec[`paint_${type}`][name]);
return memo;
Expand Down
1 change: 0 additions & 1 deletion platform/darwin/scripts/generate-style-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,6 @@ const layers = _(spec.layer.type.values).map((value, layerType) => {
}, []);

const paintProperties = Object.keys(spec[`paint_${layerType}`]).reduce((memo, name) => {
if (name === 'line-gradient') return memo;
spec[`paint_${layerType}`][name].name = name;
memo.push(spec[`paint_${layerType}`][name]);
return memo;
Expand Down
2 changes: 0 additions & 2 deletions scripts/generate-style-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ const layers = Object.keys(spec.layer.type.values).map((type) => {
}, []);

const paintProperties = Object.keys(spec[`paint_${type}`]).reduce((memo, name) => {
console.log(name);
if (name === 'line-gradient') return memo;
spec[`paint_${type}`][name].name = name;
memo.push(spec[`paint_${type}`][name]);
return memo;
Expand Down
1 change: 1 addition & 0 deletions scripts/style-spec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var spec = module.exports = require('../mapbox-gl-js/src/style-spec/reference/v8');

// Make temporary modifications here when Native doesn't have all features that JS has.
delete spec.paint_line['line-gradient'];

0 comments on commit 46edc83

Please sign in to comment.