Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/traces/scattermapbox/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,13 @@ module.exports = overrideAll({
},
angle: {
valType: 'number',
dflt: 0,
dflt: 'auto',
role: 'style',
arrayOk: true,
description: [
'Sets the marker rotation, in degrees clockwise.'
'Sets the marker orientation from true North, in degrees clockwise.',
'When using the *auto* default, no rotation would be applied',
'in perspective views which is different from using a zero angle.'
].join(' ')
},
allowoverlap: {
Expand Down
4 changes: 2 additions & 2 deletions src/traces/scattermapbox/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ module.exports = function convert(gd, calcTrace) {
'icon-size': trace.marker.size / 10
});

if('angle' in trace.marker) {
if('angle' in trace.marker && trace.marker.angle !== 'auto') {
Lib.extendFlat(symbol.layout, {
// unfortunately cant use {angle} do to this issue:
// https://github.com/mapbox/mapbox-gl-js/issues/873
Expand Down Expand Up @@ -258,7 +258,7 @@ function makeSymbolGeoJSON(calcTrace, gd) {
getFillFunc(symbol) :
blankFillFunc;

var fillAngle = (angle) ?
var fillAngle = (angle !== 'auto') ?
getFillFunc(angle, true) :
blankFillFunc;

Expand Down