-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
scattergl reversed lines bug #2904
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
Comments
Thanks for the report! |
As well as { autorange:'reversed' }, I observed that the issue also exists using |
The bug is actually related to the modification of scale parameter within the vertex-shader of regl-line2d library: node_modules/regl-line2d/miter-vert.glsl The users may also wait for additional tests to be completed and possibly a new release of the mentioned library. In the meantime using the following function inside the vertex-shader file could help fix the issues e.g. reversed bounds in 2D space. float repaireScale( float a ) { float b = a; if (abs(b) < MIN_DIFF) { if (b < 0.0) b = -MIN_DIFF; else b = MIN_DIFF; } return b; } void main() { vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord; vec2 newScale = scale; newScale.x = repaireScale(newScale.x); newScale.y = repaireScale(newScale.y); vec2 scaleRatio = newScale * viewport.zw; ... } |
Upgrade regl-line2d module to fix scattergl bug when using reversed bounds with only line type, issue #2904
https://codepen.io/anon/pen/EpJObQ
for scattergl
if autorange: 'reversed'
with mode: 'lines+markers' works fine, but with mode: 'lines' - one incorrect horisontal line (hints display correctly on free space)
The text was updated successfully, but these errors were encountered: