Skip to content

Commit

Permalink
Use linear interpolation for rotated icons
Browse files Browse the repository at this point in the history
Update test-suite
  • Loading branch information
Lucas Wojciechowski committed Jun 15, 2016
1 parent ceeb8aa commit 9832cde
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions js/data/bucket/symbol_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ SymbolBucket.prototype.populateBuffers = function(collisionTile, stacks, icons)
}
if (image.pixelRatio !== 1) {
this.iconsNeedLinear = true;
} else if (layout['icon-rotate'] !== 0 || !this.layer.isLayoutValueFeatureConstant('icon-rotate')) {
this.iconsNeedLinear = true;
}
}
} else {
Expand Down
10 changes: 10 additions & 0 deletions js/style/style_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,16 @@ StyleLayer.prototype = util.inherit(Evented, {
}
},

isLayoutValueFeatureConstant: function(name) {
var declaration = this._layoutDeclarations[name];

if (declaration) {
return declaration.isFeatureConstant;
} else {
return true;
}
},

isPaintValueZoomConstant: function(name) {
var transition = this._paintTransitions[name];

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"highlight.js": "9.3.0",
"istanbul": "^0.4.2",
"lodash": "^4.13.1",
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#0ad44d726e46c09252b6cf4432e2bf336f3c8560",
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#f18ddd9bd1e2bd075715b6462417ac682410f043",
"nyc": "6.4.0",
"remark": "4.2.2",
"remark-html": "3.0.0",
Expand Down

0 comments on commit 9832cde

Please sign in to comment.