mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
docs(slides): add params for slide functions (#10972)
* Update documentation for ion-slide Reading the documentation and following along left me lost as to why the .lockNextSlides() was not working, this was because it required a boolean parameter that was not reflected in the documentation. This PR adds the JSDoc @param to show that the function requires a boolean parameter. Does not include a definition for the single parameters so this may cause issue in the theme of the docs template. * Changing order of type definition * Adding definitions to JSdoc for slider.
This commit is contained in:

committed by
Brandy Carney

parent
bc9accf215
commit
65c250be95
@ -1035,6 +1035,8 @@ export class Slides extends Ion {
|
||||
|
||||
/**
|
||||
* Lock or unlock the ability to slide to the next slides.
|
||||
* @param {boolean} shouldLockSwipeToNext If set to true the user will not be able to swipe to the next slide.
|
||||
* Set to false to unlock this behaviour.
|
||||
*/
|
||||
lockSwipeToNext(shouldLockSwipeToNext: boolean) {
|
||||
this._allowSwipeToNext = !shouldLockSwipeToNext;
|
||||
@ -1042,6 +1044,8 @@ export class Slides extends Ion {
|
||||
|
||||
/**
|
||||
* Lock or unlock the ability to slide to the previous slides.
|
||||
* @param {boolean} shouldLockSwipeToPrev If set to true the user will not be able to swipe to the previous slide.
|
||||
* Set to false to unlock this behaviour.
|
||||
*/
|
||||
lockSwipeToPrev(shouldLockSwipeToPrev: boolean) {
|
||||
this._allowSwipeToPrev = !shouldLockSwipeToPrev;
|
||||
@ -1049,6 +1053,8 @@ export class Slides extends Ion {
|
||||
|
||||
/**
|
||||
* Lock or unlock the ability to slide to change slides.
|
||||
* @param {boolean} shouldLockSwipes If set to true user can not swipe in either direction on slide.
|
||||
* False allows swiping in both directions.
|
||||
*/
|
||||
lockSwipes(shouldLockSwipes: boolean) {
|
||||
this._allowSwipeToNext = this._allowSwipeToPrev = !shouldLockSwipes;
|
||||
@ -1056,6 +1062,7 @@ export class Slides extends Ion {
|
||||
|
||||
/**
|
||||
* Enable or disable keyboard control.
|
||||
* @param {boolean} shouldEnableKeyboard If set to true the slider can be controled by a keyboard.
|
||||
*/
|
||||
enableKeyboardControl(shouldEnableKeyboard: boolean) {
|
||||
enableKeyboardControl(this, this._plt, shouldEnableKeyboard);
|
||||
|
Reference in New Issue
Block a user