-
Notifications
You must be signed in to change notification settings - Fork 4
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
investigate graph range error #100
Comments
|
The initial locations of the point tools are (-2,12) and (2,-12), so expanding the graph's yRange to (-12,12) means that the point tools are initially on the graph. And that exposes a problem with this bit in // @public {DerivedProperty.<Quadratic|null>}
this.onQuadraticProperty = new DerivedProperty(
[ this.locationProperty, quadraticsProperty ],
( location, quadratics ) => {
if ( graph.contains( location ) ) {
return this.getQuadraticNear( location,
GQQueryParameters.pointToolThreshold, GQQueryParameters.pointToolThreshold );
}
else {
return null;
}
} The derivation function calls Options: |
I verified that option (2) fixes the problem by setting the initial locations of the point tools to: |
Signed-off-by: Chris Malley <[email protected]>
Since we want to have the point tools start off the graph initially, I also applied option (1), so that the y coordinate of the point tools are computed based on yRange. |
Tested with a bunch of different graph ranges and all is well. Closing. |
Related to #43, discovered while @chrisklus and I were experimenting with changing constants in GQConstants.
Change these constants:
to
( -12, 12 )
causes this Error:The text was updated successfully, but these errors were encountered: