From e0338f7c1c1cc34c56ef4ef17cb733e9a0fb27f0 Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Fri, 28 Aug 2015 16:07:54 -0700 Subject: [PATCH] material docs --- ionic/components/material/button.ts | 8 ++++++ ionic/components/material/ripple.ts | 39 ++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/ionic/components/material/button.ts b/ionic/components/material/button.ts index 3ccc9b2d39..6f21aa5827 100644 --- a/ionic/components/material/button.ts +++ b/ionic/components/material/button.ts @@ -3,11 +3,19 @@ import {ElementRef, Directive, onDestroy} from 'angular2/angular2'; import {IonicConfig} from '../../config/config'; import {MaterialRippleEffect} from '../material/ripple'; +/** + * TODO + */ @Directive({ selector: 'button,[button]', lifecycle: [onDestroy] }) export class MaterialButton { + /** + * TODO + * @param {ElementRef} elementRef TODO + * @param {IonicConfig} config TODO + */ constructor(elementRef: ElementRef, config: IonicConfig) { this.elementRef = elementRef; diff --git a/ionic/components/material/ripple.ts b/ionic/components/material/ripple.ts index c3279e8fcc..84afe05e76 100644 --- a/ionic/components/material/ripple.ts +++ b/ionic/components/material/ripple.ts @@ -8,7 +8,14 @@ import {ElementRef, forwardRef} from 'angular2/angular2'; import {MaterialButton} from './button'; +/** + * TODO + */ export class MaterialRippleEffect { + /** + * TODO + * @param {MaterialButton} button TODO + */ constructor(button: MaterialButton) { this.elementRef = button.elementRef; this.element = this.elementRef.nativeElement; @@ -37,6 +44,10 @@ export class MaterialRippleEffect { this._initRipple(); } + /** + * @private + * TODO + */ _initRipple() { this.frameCount = 0; this.rippleSize = 0; @@ -124,24 +135,44 @@ export class MaterialRippleEffect { } } - + /** + * TODO + * @returns {TODO} TODO + */ getFrameCount() { return this.frameCount; } + /** + * TODO + * @param {TODO} fC TODO + */ setFrameCount(fC) { this.frameCount = fC; } + /** + * TODO + * @return {Element} TODO + */ getRippleElement() { return this.rippleElement; } + /** + * TODO + * @param {number} newX TODO + * @param {number} newY TODO + */ setRippleXY(newX, newY) { this.x = newX; this.y = newY; } + /** + * TODO + * @param {TODO} start TODO + */ setRippleStyles(start) { if (this.rippleElement !== null) { var transformString; @@ -174,6 +205,9 @@ export class MaterialRippleEffect { } } + /** + * TODO + */ animFrameHandler() { if (this.frameCount-- > 0) { window.requestAnimationFrame(this.animFrameHandler.bind(this)); @@ -182,5 +216,8 @@ export class MaterialRippleEffect { } } + /** + * TODO + */ elementClicked(event) {} }