Skip to content

Commit

Permalink
Added support for circle-opacity paint property
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoabinader committed Jul 8, 2015
1 parent 25e7ff7 commit f6b6151
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions js/render/draw_circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ function drawCircles(painter, layer, posMatrix, tile) {

// TODO remove this via https://github.com/mapbox/mapbox-gl-js/issues/1319
if (property.styleName === 'circle-color') {
var opacity = layer.layout['circle-opacity'];
if (opacity !== undefined) {
value = [value[0] * opacity, value[1] * opacity, value[2] * opacity, value[3] * opacity];
}
value = [value[0] * 255, value[1] * 255, value[2] * 255, value[3] * 255];
}

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"gl-matrix": "https://github.com/toji/gl-matrix/archive/v2.2.1.tar.gz",
"glify": "0.5.0",
"mapbox-gl-function": "^2.0.0",
"mapbox-gl-style-spec": "git+https://github.com/mapbox/mapbox-gl-style-spec.git#775b056316da79c8ca96c917e5a6b00181ccb49a",
"mapbox-gl-style-spec": "git+https://github.com/mapbox/mapbox-gl-style-spec.git#ff28464c4469817be96c534451548ce80a461e86",
"minifyify": "^6.1.0",
"pbf": "^1.2.0",
"pngjs": "^0.4.0",
Expand All @@ -39,7 +39,7 @@
"documentation": "git+https://github.com/documentationjs/documentation#d341019b32a8a257a93bd55586e7f09f42e29341",
"eslint": "^0.14.1",
"istanbul": "^0.3.0",
"mapbox-gl-test-suite": "git+https://github.com/mapbox/mapbox-gl-test-suite.git#7b28459dd20a2ba4a3d9ee35864f584f111fc5df",
"mapbox-gl-test-suite": "git+https://github.com/mapbox/mapbox-gl-test-suite.git#c1ade66b0c221ca1440c01a6283a6483e0e96254",
"marked": "0.3.x",
"mkdirp": "^0.5.0",
"prova": "^2.1.2",
Expand Down

0 comments on commit f6b6151

Please sign in to comment.