docs(toggle): update docs

This commit is contained in:
mhartington
2016-06-24 11:55:36 -04:00
parent 30c3af4a80
commit 0743f46d5d

View File

@ -22,8 +22,6 @@ const TOGGLE_VALUE_ACCESSOR = new Provider(
* *
* See the [Angular 2 Docs](https://angular.io/docs/ts/latest/guide/forms.html) * See the [Angular 2 Docs](https://angular.io/docs/ts/latest/guide/forms.html)
* for more info on forms and inputs. * for more info on forms and inputs.
* @property {boolean} [checked] - whether the toggle it toggled or not
* @property {boolean} [disabled] - whether the toggle is disabled or not
* *
* @usage * @usage
* ```html * ```html
@ -108,12 +106,18 @@ export class Toggle implements ControlValueAccessor {
} }
} }
/**
* @private
*/
private pointerDown(ev: UIEvent): boolean { private pointerDown(ev: UIEvent): boolean {
this._startX = pointerCoord(ev).x; this._startX = pointerCoord(ev).x;
this._activated = true; this._activated = true;
return true; return true;
} }
/**
* @private
*/
private pointerMove(ev: UIEvent) { private pointerMove(ev: UIEvent) {
if (this._startX) { if (this._startX) {
let currentX = pointerCoord(ev).x; let currentX = pointerCoord(ev).x;
@ -134,6 +138,9 @@ export class Toggle implements ControlValueAccessor {
} }
} }
/**
* @private
*/
private pointerUp(ev: UIEvent) { private pointerUp(ev: UIEvent) {
if (this._startX) { if (this._startX) {
let endX = pointerCoord(ev).x; let endX = pointerCoord(ev).x;
@ -152,6 +159,9 @@ export class Toggle implements ControlValueAccessor {
} }
} }
/**
* @input {boolean} whether the toggle it toggled or not
*/
@Input() @Input()
get checked(): boolean { get checked(): boolean {
return this._checked; return this._checked;
@ -198,6 +208,9 @@ export class Toggle implements ControlValueAccessor {
*/ */
registerOnTouched(fn: any) { this.onTouched = fn; } registerOnTouched(fn: any) { this.onTouched = fn; }
/**
* @input {boolean} whether the toggle is disabled or not
*/
@Input() @Input()
get disabled(): boolean { get disabled(): boolean {
return this._disabled; return this._disabled;