You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read through the FAQ and Guides before asking a question
I am using the latest version of Victory
I've searched open issues to make sure I'm not opening a duplicate issue
The Problem
There's a previous issue related to this (over a year old) but hasn't been addressed yet. In a combined Victory Zoom/Brush example, the brush goes out of sync with the zoom when you adjust the brush to a smaller value and then zoom back out using a mouse scroll.
Set the brush to any length on either side smaller than the start
Zoom out using the mouse wheel
My (very naive) guess as to what's happening here after looking into the source code is that some of the values are not being updated/re-run as needed since it's the zoom that's controlling the domain. It seems that currentDomain is being set when the brush is being configured (as expected) but it's not being re-calc'd on zoom. Then when it's running into the following code when we zoom back out
it's setting the domain to be the currentDomain which hasn't been updated (I believe in this case cachedBrushDomain is the entire domain since this only happens when zoomDomain returns to its original value. This could be way out of the ballpark but just a best guess. Please let me know if there's a potential workaround/fix coming soon for this!
The text was updated successfully, but these errors were encountered:
Bugs and Questions
Checklist
I have read through the FAQ and Guides before asking a question
I am using the latest version of Victory
I've searched open issues to make sure I'm not opening a duplicate issue
The Problem
There's a previous issue related to this (over a year old) but hasn't been addressed yet. In a combined Victory Zoom/Brush example, the brush goes out of sync with the zoom when you adjust the brush to a smaller value and then zoom back out using a mouse scroll.
Reproduction
https://codesandbox.io/s/muddy-architecture-2fqbu?file=/index.js
Based on the brush/zoom example in the docs.
My (very naive) guess as to what's happening here after looking into the source code is that some of the values are not being updated/re-run as needed since it's the zoom that's controlling the domain. It seems that
currentDomain
is being set when the brush is being configured (as expected) but it's not being re-calc'd on zoom. Then when it's running into the following code when we zoom back outit's setting the domain to be the
currentDomain
which hasn't been updated (I believe in this casecachedBrushDomain
is the entire domain since this only happens whenzoomDomain
returns to its original value. This could be way out of the ballpark but just a best guess. Please let me know if there's a potential workaround/fix coming soon for this!The text was updated successfully, but these errors were encountered: