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

Commit da45942

Browse files
Splaktarjelbourn
authored andcommitted
docs(ripple): break out docs for $mdInkRippleProvider from $mdInkRipple (#11606)
fix some Closure types
1 parent 38fb991 commit da45942

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

src/core/services/ripple/ripple.js

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ var DURATION = 450;
2121
* @description
2222
* The `md-ink-ripple` directive allows you to specify the ripple color or if a ripple is allowed.
2323
*
24-
* @param {string|boolean} md-ink-ripple A color string `#FF0000` or boolean (`false` or `0`) for preventing ripple
24+
* @param {string|boolean} md-ink-ripple A color string `#FF0000` or boolean (`false` or `0`) for
25+
* preventing ripple
2526
*
2627
* @usage
2728
* ### String values
@@ -84,15 +85,24 @@ function InkRippleDirective ($mdButtonInkRipple, $mdCheckboxInkRipple) {
8485
* }
8586
* });
8687
* </hljs>
88+
*/
89+
90+
/**
91+
* @ngdoc service
92+
* @name $mdInkRippleProvider
93+
* @module material.core.ripple
8794
*
88-
* ### Disabling ripples globally
89-
* If you want to disable ink ripples globally, for all components, you can call the
95+
* @description
96+
* If you want to disable ink ripples globally, for all components, you can call the
9097
* `disableInkRipple` method in your app's config.
9198
*
99+
*
100+
* @usage
92101
* <hljs lang="js">
93102
* app.config(function ($mdInkRippleProvider) {
94103
* $mdInkRippleProvider.disableInkRipple();
95104
* });
105+
* </hljs>
96106
*/
97107

98108
function InkRippleProvider () {
@@ -131,7 +141,7 @@ function InkRippleProvider () {
131141

132142
/**
133143
* @ngdoc method
134-
* @name $mdInkRipple#disableInkRipple
144+
* @name $mdInkRippleProvider#disableInkRipple
135145
*
136146
* @description
137147
* A config-time method that, when called, disables ripples globally.
@@ -175,12 +185,10 @@ function InkRippleCtrl ($scope, $element, rippleOptions, $window, $timeout, $mdU
175185
* mouseup or mouseleave event)
176186
*/
177187
function autoCleanup (self, cleanupFn) {
178-
179188
if (self.mousedown || self.lastRipple) {
180189
self.mousedown = false;
181190
self.$mdUtil.nextTick(angular.bind(self, cleanupFn), false);
182191
}
183-
184192
}
185193

186194

@@ -222,11 +230,10 @@ InkRippleCtrl.prototype.calculateColor = function () {
222230

223231
/**
224232
* Takes a string color and converts it to RGBA format
225-
* @param color {string}
226-
* @param [multiplier] {int}
233+
* @param {string} color
234+
* @param {number} multiplier
227235
* @returns {string}
228236
*/
229-
230237
InkRippleCtrl.prototype._parseColor = function parseColor (color, multiplier) {
231238
multiplier = multiplier || 1;
232239
var colorUtil = this.$mdColorUtil;

0 commit comments

Comments
 (0)