mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
more docs
This commit is contained in:
@ -93,18 +93,19 @@ export class Content extends Ion {
|
||||
/**
|
||||
* Returns the content and scroll elements' dimensions.
|
||||
* @returns {Object} dimensions The content and scroll elements' dimensions
|
||||
* @returns {Number} dimensions.contentHeight content offsetHeight
|
||||
* @returns {Number} dimensions.contentTop content offsetTop
|
||||
* @returns {Number} dimensions.contentBottom content offsetTop+offsetHeight
|
||||
* @returns {Number} dimensions.contentWidth content offsetWidth
|
||||
* @returns {Number} dimensions.contentLeft content offsetLeft
|
||||
* @returns {Number} dimensions.contentRight content offsetLeft + offsetWidth
|
||||
* @returns {Number} dimensions.scrollHeight scroll scrollHeight
|
||||
* @returns {Number} dimensions.scrollTop scroll scrollTop
|
||||
* @returns {Number} dimensions.scrollBottom scroll scrollTop + scrollHeight
|
||||
* @returns {Number} dimensions.scrollWidth scroll scrollWidth
|
||||
* @returns {Number} dimensions.scrollLeft scroll scrollLeft
|
||||
* @returns {Number} dimensions.scrollRight scroll scrollLeft + scrollWidth
|
||||
* {Number} dimensions.contentHeight content offsetHeight
|
||||
* {Number} dimensions.contentTop content offsetTop
|
||||
* {Number} dimensions.contentBottom content offsetTop+offsetHeight
|
||||
* {Number} dimensions.contentWidth content offsetWidth
|
||||
* {Number} dimensions.contentLeft content offsetLeft
|
||||
* {Number} dimensions.contentRight content offsetLeft + offsetWidth
|
||||
* {Number} dimensions.scrollHeight scroll scrollHeight
|
||||
* {Number} dimensions.scrollTop scroll scrollTop
|
||||
* {Number} dimensions.scrollBottom scroll scrollTop + scrollHeight
|
||||
* {Number} dimensions.scrollWidth scroll scrollWidth
|
||||
* {Number} dimensions.scrollLeft scroll scrollLeft
|
||||
* {Number} dimensions.scrollRight scroll scrollLeft + scrollWidth
|
||||
* TODO: figure out how to get this to work
|
||||
*/
|
||||
getDimensions() {
|
||||
let scrollElement = this.scrollElement;
|
||||
|
@ -5,7 +5,9 @@ import * as dom from '../../util/dom';
|
||||
import {Platform} from '../../platform/platform';
|
||||
import {IonInput} from './input';
|
||||
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Component({
|
||||
selector: 'focus-holder'
|
||||
})
|
||||
@ -14,15 +16,26 @@ import {IonInput} from './input';
|
||||
directives: [forwardRef(() => FocusInput)]
|
||||
})
|
||||
export class FocusHolder {
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
constructor() {
|
||||
this.i = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @param {TODO} inputType TODO
|
||||
*/
|
||||
setFocusHolder(inputType) {
|
||||
this.i[2].type = inputType;
|
||||
this.i[2].setFocus();
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @param {TODO} tabIndex TODO
|
||||
*/
|
||||
receivedFocus(tabIndex) {
|
||||
if (tabIndex === '999') {
|
||||
// focus on the previous input
|
||||
@ -34,6 +47,10 @@ export class FocusHolder {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @param {TODO} input TODO
|
||||
*/
|
||||
register(input) {
|
||||
this.i.push(input);
|
||||
}
|
||||
@ -79,4 +96,3 @@ class FocusInput {
|
||||
this._t = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,9 @@ import {Directive} from 'angular2/angular2';
|
||||
import {IonicConfig} from '../../config/config';
|
||||
import {pointerCoord, hasPointerMoved} from '../../util/dom';
|
||||
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'ion-label',
|
||||
properties: [
|
||||
@ -19,10 +21,18 @@ import {pointerCoord, hasPointerMoved} from '../../util/dom';
|
||||
}
|
||||
})
|
||||
export class Label {
|
||||
/**
|
||||
* TODO
|
||||
* @param {IonicConfig} config
|
||||
*/
|
||||
constructor(config: IonicConfig) {
|
||||
this.scrollAssist = config.setting('keyboardScrollAssist');
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @param {TODO} ev TODO
|
||||
*/
|
||||
pointerStart(ev) {
|
||||
if (this.scrollAssist) {
|
||||
// remember where the touchstart/mousedown started
|
||||
@ -30,6 +40,10 @@ export class Label {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @param {TODO} ev TODO
|
||||
*/
|
||||
pointerEnd(ev) {
|
||||
if (this.container) {
|
||||
|
||||
|
@ -6,7 +6,9 @@ import {IonicDirective} from '../../config/annotations';
|
||||
import {ListVirtualScroll} from './virtual';
|
||||
import * as util from 'ionic/util';
|
||||
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@IonicDirective({
|
||||
selector: 'ion-list',
|
||||
properties: [
|
||||
@ -16,11 +18,18 @@ import * as util from 'ionic/util';
|
||||
]
|
||||
})
|
||||
export class List extends Ion {
|
||||
constructor(elementRef: ElementRef, ionicConfig: IonicConfig) {
|
||||
super(elementRef, ionicConfig);
|
||||
/**
|
||||
* TODO
|
||||
* @param {ElementRef} elementRef TODO
|
||||
* @param {IonicConfig} config TODO
|
||||
*/
|
||||
constructor(elementRef: ElementRef, config: IonicConfig) {
|
||||
super(elementRef, config);
|
||||
this.ele = elementRef.nativeElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
onIonInit() {
|
||||
if (util.isDefined(this.virtual)) {
|
||||
console.log('Content', this.content);
|
||||
@ -29,7 +38,10 @@ export class List extends Ion {
|
||||
this._initVirtualScrolling();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* TODO
|
||||
*/
|
||||
_initVirtualScrolling() {
|
||||
if(!this.content) {
|
||||
return;
|
||||
@ -38,12 +50,18 @@ export class List extends Ion {
|
||||
this._virtualScrollingManager = new ListVirtualScroll(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @param {TODO} item TODO
|
||||
*/
|
||||
setItemTemplate(item) {
|
||||
this.itemTemplate = item;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'ion-header',
|
||||
properties: [
|
||||
|
@ -52,7 +52,9 @@ class DisplayWhen {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Directive({
|
||||
selector: '[show-when]',
|
||||
host: {
|
||||
@ -60,7 +62,11 @@ class DisplayWhen {
|
||||
}
|
||||
})
|
||||
export class ShowWhen extends DisplayWhen {
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @param {string} showWhen The value of the element's 'show-when' attribute
|
||||
* @param {NgZone} ngZone TODO
|
||||
*/
|
||||
constructor(
|
||||
@Attribute('show-when') showWhen: string,
|
||||
ngZone: NgZone
|
||||
@ -74,7 +80,9 @@ export class ShowWhen extends DisplayWhen {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Directive({
|
||||
selector: '[hide-when]',
|
||||
host: {
|
||||
@ -82,7 +90,11 @@ export class ShowWhen extends DisplayWhen {
|
||||
}
|
||||
})
|
||||
export class HideWhen extends DisplayWhen {
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @param {string} showWhen The value of the element's 'hide-when' attribute
|
||||
* @param {NgZone} ngZone TODO
|
||||
*/
|
||||
constructor(
|
||||
@Attribute('hide-when') hideWhen: string,
|
||||
ngZone: NgZone
|
||||
@ -95,4 +107,3 @@ export class HideWhen extends DisplayWhen {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user