-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Conversation
90af151
to
3c4eeac
Compare
2756f28
to
8c439b7
Compare
* Controller used by the ripple service in order to apply ripples | ||
* @ngInject | ||
*/ | ||
function InkRippleServiceController ($scope, $element, rippleOptions, $window, $timeout, $mdUtil) { |
There was a problem hiding this comment.
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
8c439b7
to
e0ed23b
Compare
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); |
There was a problem hiding this comment.
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?
e0ed23b
to
e6d20fa
Compare
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'); |
There was a problem hiding this comment.
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.
01c67b7
to
94efe87
Compare
this.mousedown = false; | ||
this.ripples = []; | ||
this.color = this.getColor(); | ||
this.background = this.getColor(0.5); |
There was a problem hiding this comment.
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.
d3fd99f
to
e5d1272
Compare
…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
e5d1272
to
88ca869
Compare
…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
@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.