Skip to content

The opacityscale, 'extremes', has constant opacity equal to 1 #4723

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

Closed
empet opened this issue Apr 2, 2020 · 1 comment · Fixed by #4725
Closed

The opacityscale, 'extremes', has constant opacity equal to 1 #4723

empet opened this issue Apr 2, 2020 · 1 comment · Fixed by #4725
Assignees
Labels
bug something broken

Comments

@empet
Copy link

empet commented Apr 2, 2020

The function createWave()

function createWave(n, minOpacity) {
generates an opacityscale with all opacities equal to 1, because:

 Math.max(1, Math.min(0, v)) // line 27

is 1 for any v.

Replacing it by:

 Math.min(1, Math.max(0, v)) 

removes the actual drawback, and leads to a non-constant opacityscale.

@archmoj archmoj added the bug something broken label Apr 2, 2020
@archmoj
Copy link
Contributor

archmoj commented Apr 2, 2020

@empet Thanks very much for uncovering this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants