-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Scattermapbox line trailing gaps #1421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
63b33c3
8215169
1a22beb
24d7c47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -365,6 +365,23 @@ describe('scattermapbox convert', function() { | |
expect(actualText).toEqual(['A', 'B', 'C', 'F', '']); | ||
}); | ||
|
||
it('for lines traces with trailing gaps', function() { | ||
var opts = _convert(Lib.extendFlat({}, base, { | ||
mode: 'lines', | ||
lon: [10, '20', 30, 20, null, 20, 10, null], | ||
lat: [20, 20, '10', null, 10, 10, 20, null] | ||
})); | ||
|
||
assertVisibility(opts, ['none', 'visible', 'none', 'none']); | ||
|
||
var lineCoords = [ | ||
[[10, 20], [20, 20], [30, 10]], | ||
[[20, 10], [10, 20]] | ||
]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Previously, this was: var lineCoords = [
[[10, 20], [20, 20], [30, 10]],
[[20, 10], [10, 20]].
[]
]; which lead to an invalid GeoJSON and made There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great. I thought this would be a pretty easy fix. Just to confirm, I assume it will also handle There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes it does: 1a22beb |
||
|
||
expect(opts.line.geojson.coordinates).toEqual(lineCoords, 'have correct line coords'); | ||
}); | ||
|
||
it('should correctly convert \'textposition\' to \'text-anchor\' and \'text-offset\'', function() { | ||
var specs = { | ||
'top left': ['top-right', [-0.65, -1.65]], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as #1414 (comment) - is this an intentional pattern now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
24d7c47 - better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, much better to my eye - thanks!