Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] make sure the RangeBrush updates on slider range changes #2047

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jwhitaker-swiftnav
Copy link

@jwhitaker-swiftnav jwhitaker-swiftnav commented Nov 30, 2022

Before this commit, if you have, e.g., a Slider with

range={[0,10]},
value={[4,5]},

, then it and its RangeBrush will look like

----||----- <- RangeBrush/histogram
====||===== <- Slider

. A bug will then appear if you change the Slider's range, say to

range={[0,5]},
value={[4,5]},

: then you will see a situation like

----||----- <- RangeBrush (**incorrect**)
--------|-| <- Slider (correct)

where the RangeBrush has failed to update and so looks out of sync with its Slider. This commit fixes the problem.

Signed-off-by: Jarrad Whitaker <jwhitaker 馃摟 swift-nav.com>

I'm unable to write a test for this, sorry, because the RangeBrush fails to render at all in jsdom.

Additionally, it's admittedly unlikely, but on the offchance you'd consider a bugfix release to v2.5.5 there is a backport of this commit at https://github.com/jwhitaker-swiftnav/kepler.gl/tree/fix-rangeplot-handles-backport that applies to the v2.5.5 tag.

@jwhitaker-swiftnav jwhitaker-swiftnav force-pushed the fix-rangeplot-handles branch 2 times, most recently from 364c4cc to 4848bf5 Compare November 30, 2022 02:55
Before this commit, if you have, e.g., a Slider with

    range={[0,10]},
    value={[4,5]},

, then it and its RangeBrush will look like

    ----||----- <- RangeBrush/histogram
    ====||===== <- Slider

. A bug will then appear if you change the Slider's range, say
to

    range={[0,5]},
    value={[4,5]},

: then you will see a situation like

    ----||----- <- RangeBrush (**incorrect**)
    --------|-| <- Slider (correct)

where the RangeBrush has failed to update and so looks out
of sync with its Slider. This commit fixes the problem.

Signed-off-by: Jarrad Whitaker <jwhitaker-swiftnav@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant