feat(slides): add swiper controller (#9983)

This commit is contained in:
Job
2017-01-12 19:41:17 +01:00
committed by Brandy Carney
parent e35a3b1ab7
commit f499496e4d
7 changed files with 235 additions and 2 deletions

View File

@ -161,6 +161,22 @@ export class Slides extends Ion {
}
private _autoplayMs: number;
/**
* @input {Slides} Pass another Slides instance or array of Slides instances
* that should be controlled by this Slides instance.
* Default: `null`.
*/
@Input()
get control() {
return this._control;
}
set control(val: Slides | Slides[]) {
if (val instanceof Slides || Array.isArray(val)) {
this._control = val;
}
}
private _control: Slides | Slides[] = null;
/**
* @input {string} Could be `slide`, `fade`, `cube`, `coverflow` or `flip`.
* Default: `slide`.
@ -551,6 +567,10 @@ export class Slides extends Ion {
/** @private */
runCallbacksOnInit = true;
// Controller
controlBy = 'slide';
controlInverse = false;
// Keyboard
/**
* @private
@ -827,6 +847,8 @@ export class Slides extends Ion {
/** @internal */
_slidesSizesGrid: any;
/** @internal */
_spline: any;
/** @internal */
_supportTouch: boolean;
/** @internal */
_supportGestures: boolean;