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

fix: Correct unbounded ripple diameter #1098

Merged
merged 11 commits into from
Aug 24, 2017
Merged

fix: Correct unbounded ripple diameter #1098

merged 11 commits into from
Aug 24, 2017

Conversation

touficbatache
Copy link
Contributor

@touficbatache touficbatache commented Aug 8, 2017

Fixes and closes #1067

@codecov-io
Copy link

codecov-io commented Aug 9, 2017

Codecov Report

Merging #1098 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1098      +/-   ##
=========================================
+ Coverage    99.9%   99.9%   +<.01%     
=========================================
  Files          69      69              
  Lines        3302    3305       +3     
  Branches      405     405              
=========================================
+ Hits         3299    3302       +3     
  Misses          3       3
Impacted Files Coverage Δ
packages/mdc-ripple/foundation.js 100% <100%> (ø) ⬆️
packages/mdc-dialog/foundation.js 100% <0%> (ø) ⬆️
packages/mdc-dialog/index.js 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97575c3...3aab485. Read the comment docs.

Copy link
Contributor

@yeelan0319 yeelan0319 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@touficbatache Thanks for filing this PR.

I think it overall looks good, could you address the concern in the comment and then I will help merge it.

@@ -471,7 +471,7 @@ export default class MDCRippleFoundation extends MDCFoundation {
this.frame_ = this.adapter_.computeBoundingRect();

const maxDim = Math.max(this.frame_.height, this.frame_.width);
const surfaceDiameter = Math.sqrt(Math.pow(this.frame_.width, 2) + Math.pow(this.frame_.height, 2));
const surfaceDiameter = this.frame_.width;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we change this to Math.min(this.frame_.width, this.frame_.height) so when unbounded ripple is applied to non-square surface, it will always start within the container.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sure, done!

Copy link
Contributor

@yeelan0319 yeelan0319 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@touficbatache
Copy link
Contributor Author

@yeelan0319 No problem, happy to be a part of the community 😃

@yeelan0319 yeelan0319 merged commit 0f1ca35 into material-components:master Aug 24, 2017
kfranqueiro pushed a commit that referenced this pull request Aug 24, 2017
kfranqueiro added a commit that referenced this pull request Aug 24, 2017
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.

Correct unbounded ripple diameter
3 participants