-
Notifications
You must be signed in to change notification settings - Fork 5
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
Incorrect ruler length with shuffleListeners
query parameter
#133
Comments
It would not be tragic if this sim did not support |
shuffleListeners
query parameter
The problem is in GeometricOpticsRulerNode: zoomScaleProperty.link( zoomScale => {
// update model length, so that view length remains the same
ruler.scaleLength( zoomScale );
// update view
this.removeAllChildren();
this.addChild( createRulerNode( this.ruler.length, zoomTransformProperty.value, zoomScale, options.rulerOptions ) );
} ); This listener depends on zoomScaleProperty and zoomTransformProperty, but is only listenening to zoomScaleProperty. It assumes that zoomTransformProperty is updated before zoomScaleProperty. |
The rulers went through a major rewrite. But this is still a problem, as indicated by this TODO in GORulerNode.js: //TODO https://github.com/phetsims/geometric-optics/issues/133 this listener also depends on zoomTransformProperty, so there's a problematic ordering dependency there
zoomScaleProperty.link( zoomScale => { |
Fixed in the above commit, tested with |
As part of the work on #129, we found that run the simulation with the query parameters ea&shuffleListeners lead to an unexpected behavior.
Putting a ruler within the playArea and zooming out leas to a ruler that is twice as long as expected.
The text was updated successfully, but these errors were encountered: