Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

fix(ripple): Revert #1098 to fix bounded ripples #1183

Merged
merged 1 commit into from
Aug 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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