Skip to content

Commit 5285343

Browse files
committed
added jasmine tests for icon-rotate and icon-allow-overlap
1 parent 093f507 commit 5285343

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

test/jasmine/tests/scattermapbox_test.js

+22
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,28 @@ describe('scattermapbox convert', function() {
465465
expect(symbolProps).toEqual(expected, 'geojson properties');
466466
});
467467

468+
469+
it('should allow symbols to be rotated and overlapped', function() {
470+
var opts = _convert(Lib.extendFlat({}, base, {
471+
mode: 'markers',
472+
marker: {
473+
symbol: ['monument', 'music', 'harbor'],
474+
angle: [0, 90, 45],
475+
allowoverlap: true
476+
},
477+
}));
478+
479+
var symbolAngle = opts.symbol.geojson.features.map(function(f) {
480+
return f.properties.angle;
481+
});
482+
483+
var expected = [0, 90, 45, undefined, undefined];
484+
expect(symbolAngle).toEqual(expected, 'geojson properties');
485+
486+
expect(opts.symbol.layout['icon-allow-overlap']).toEqual(true, 'symbol layout');
487+
});
488+
489+
468490
it('should generate correct output for text + lines traces', function() {
469491
var opts = _convert(Lib.extendFlat({}, base, {
470492
mode: 'lines+text',

0 commit comments

Comments
 (0)