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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect uses of Bound2.dilated #181

Closed
pixelzoom opened this issue Jul 22, 2020 · 2 comments
Closed

incorrect uses of Bound2.dilated #181

pixelzoom opened this issue Jul 22, 2020 · 2 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Jul 22, 2020

For phetsims/qa#514 and phetsims/qa#515.

Bounds2.dilated take 1 argument:

  dilated: function( d ) {
    return new Bounds2( this.minX - d, this.minY - d, this.maxX + d, this.maxY + d );
  },

There are a few cases where it's being called with 2 arguments.

// ZoomButtonGroup.js:
    zoomOutButton.touchArea = zoomOutButton.localBounds.dilated( 5, 5 );
    zoomInButton.touchArea = zoomOutButton.localBounds.dilated( 5, 5 );

// In MacroPHMeterNode.js:
   this.touchArea = this.localBounds.dilated( 20, 20 );

All of the above should have 1 argument. This doesn't hurt anything, because the 2nd arg is ignored.

@pixelzoom pixelzoom self-assigned this Jul 22, 2020
pixelzoom added a commit that referenced this issue Jul 22, 2020
pixelzoom added a commit that referenced this issue Jul 22, 2020
pixelzoom added a commit that referenced this issue Jul 22, 2020
pixelzoom added a commit to phetsims/ph-scale-basics that referenced this issue Jul 22, 2020
@pixelzoom
Copy link
Contributor Author

Fixed in master, cherry-picked to 1.4 branches of ph-scale and ph-scale-basics.

Labeling with "fix-awaiting-deploy". There's nothing to test here, but I want to remember that the change has been made.

@pixelzoom
Copy link
Contributor Author

This has shown no problems in many cycles of CT, and there is nothing specific to test. So closing.

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

No branches or pull requests

1 participant