Skip to content

Commit

Permalink
fix(ripple): Revert #1098 to fix bounded ripples (#1183)
Browse files Browse the repository at this point in the history
This reverts commit 0f1ca35.
  • Loading branch information
kfranqueiro authored Aug 24, 2017
1 parent 6acbf2c commit 5769a7b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/mdc-ripple/foundation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.min(this.frame_.width, this.frame_.height);
const surfaceDiameter = Math.sqrt(Math.pow(this.frame_.width, 2) + Math.pow(this.frame_.height, 2));

// 60% of the largest dimension of the surface
this.initialSize_ = maxDim * MDCRippleFoundation.numbers.INITIAL_ORIGIN_SCALE;
Expand Down
10 changes: 6 additions & 4 deletions packages/mdc-toolbar/mdc-toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,8 @@
cursor: pointer;
}

@media (min-width: $mdc-toolbar-mobile-breakpoint) {
&__icon:last-of-type {
margin-right: 8px;
}
&__icon:last-of-type {
padding-right: 16px;
}

&__icon--menu {
Expand All @@ -117,6 +115,10 @@
padding: 16px;
}

.mdc-toolbar__icon:last-child {
padding: 16px 8px;
}

.mdc-toolbar__title {
margin-left: 16px !important;
}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/mdc-ripple/foundation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ testFoundation(`#layout sets ${strings.VAR_FG_SCALE} based on the difference bet

const maxSize = Math.max(width, height);
const initialSize = maxSize * numbers.INITIAL_ORIGIN_SCALE;
const surfaceDiameter = Math.min(width, height);
const surfaceDiameter = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2));
const maxRadius = surfaceDiameter + numbers.PADDING;
const fgScale = maxRadius / initialSize;

Expand Down

0 comments on commit 5769a7b

Please sign in to comment.