Skip to content

Commit

Permalink
refactor(slides): remove the attributes from the slider and use optio…
Browse files Browse the repository at this point in the history
…ns to pass them instead

also commented out some attributes that aren’t working right now.

BREAKING CHANGES: Slider attributes have been removed in favor of
passing them in options

references #5189
  • Loading branch information
brandyscarney committed Feb 18, 2016
1 parent 8f0b88b commit d21ae88
Showing 1 changed file with 4 additions and 35 deletions.
39 changes: 4 additions & 35 deletions ionic/components/slides/slides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,51 +153,30 @@ export class Slides extends Ion {
zoomableHeight: number
}


/**
* @input {boolean} whether or not the slides should automatically change
*/
@Input() autoplay: any;

/**
* @input {boolean} whether or not the slides should automatically change
*/
@Input() loop: any;

/**
* @input {number} The slide index to start on
*/
@Input() index: any;

/**
* @input {boolean} whether the slides should bounce
*/
@Input() bounce: any;

/**
* @input {boolean} Whether the slide should show the page or not
*/
@Input() pager: any;

/**
* @input {any} Any additional slider options you want to pass
* @input {any} Any slider options you want to configure, see swiper parameters: http://www.idangero.us/swiper/api/
*/
@Input() options: any;

/**
* @input {number} Whether or not the slider can zoom in or out
*/
@Input() zoom: any;
// @Input() zoom: any;

/**
* @input {number} how long it should take to zoom a slide
*/
@Input() zoomDuration: any;
// @Input() zoomDuration: any;

/**
* @input {number} the max scale an slide can be zoomed
*/
@Input() zoomMax: any;
// @Input() zoomMax: any;

/**
* @output {any} expression to evaluate when a slide has been changed
Expand Down Expand Up @@ -234,19 +213,9 @@ export class Slides extends Ion {
}

this.showPager = isTrueProperty(this.pager);
this.loop = isTrueProperty(this.loop);

if (typeof(this.index) != 'undefined') {
this.index = parseInt(this.index);
}

var options = defaults({
loop: this.loop,
initialSlide: this.index,
pagination: '.swiper-pagination',
paginationClickable: true,
lazyLoading: true,
preloadImages: false
}, this.options);

options.onTap = (swiper, e) => {
Expand Down

0 comments on commit d21ae88

Please sign in to comment.