Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Ripple rewrite #4166

Closed
wants to merge 1 commit into from
Closed

Ripple rewrite #4166

wants to merge 1 commit into from

Conversation

robertmesserle
Copy link
Contributor

@jelbourn @ThomasBurleson @rschmukler @topherfangio

Please review these changes. Please also check this out and look around for any breakages that I may have caused.

I will likely be going through and adding comments to make the code easier to navigate.

@robertmesserle robertmesserle force-pushed the wip/ripple/refactor branch 2 times, most recently from 90af151 to 3c4eeac Compare August 14, 2015 20:41
@naomiblack naomiblack modified the milestone: 0.11.0 Aug 14, 2015
@robertmesserle robertmesserle force-pushed the wip/ripple/refactor branch 3 times, most recently from 2756f28 to 8c439b7 Compare August 14, 2015 22:57
* Controller used by the ripple service in order to apply ripples
* @ngInject
*/
function InkRippleServiceController ($scope, $element, rippleOptions, $window, $timeout, $mdUtil) {
Copy link
Member

Choose a reason for hiding this comment

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

I would just call this InkRippleCtrl

if (this.ripples.length === 0) this.container.css({ backgroundColor: '' });
// use a 2-second timeout in order to allow for the animation to finish
// we don't actually care how long the animation takes
this.$timeout(function () { ctrl.fadeOutComplete(ripple); }, 650, false);
Copy link
Member

Choose a reason for hiding this comment

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

Extract specific timeouts into constants?

background-clip: padding-box;
overflow: hidden;
// The following hack causes Safari/Chrome to respect overflow hidden for ripples
-webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC');
Copy link
Contributor

Choose a reason for hiding this comment

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

Any chance we have a link to an article of why this works? Would be nice to add to the comment if available.

this.mousedown = false;
this.ripples = [];
this.color = this.getColor();
this.background = this.getColor(0.5);
Copy link
Contributor

Choose a reason for hiding this comment

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

These should be deferred until the ripple render occurs (and then cached). See #4199 for details.

@robertmesserle robertmesserle force-pushed the wip/ripple/refactor branch 3 times, most recently from d3fd99f to e5d1272 Compare August 17, 2015 19:34
…n and providing more control over the ripples states

adds support for centered ripples

adds support for theme colors

adds ripple directive, adds support for mdNoInk, adds support for dimBackground, adds support for fitRipple

Ripples now respect a minimum timeout value
kennethcachia pushed a commit to kennethcachia/material that referenced this pull request Sep 23, 2015
…n and providing more control over the ripples states

Closes angular#4166

Closes angular#4199
Closes angular#3952
Closes angular#3346
Closes angular#2905
Closes angular#2636
Closes angular#2149
Closes angular#1597
Closes angular#1595
Closes angular#1398
@EladBezalel EladBezalel deleted the wip/ripple/refactor branch January 16, 2016 00:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants