PREVIEW: This is a preview API. Preview APIs are production quality, but can be changed on a major version without a deprecation path.
Methods
-
(static) setupSwipeActions(elem, options) → {void}
-
Setup listeners needed for swipe actions capability.
Parameters:
Name Type Argument Description elemElement the DOM element (of the offcanvas) that hosts the swipe actions optionsObject <optional>
the options to set for swipe actions Properties
Name Type Argument Description thresholdnumber <optional>
the threshold that triggers default action. If no default action is found (no item with style "oj-swipetoreveal-default") then this value is ignored. If percentage value is specified it will be calculated based on the width of the element with class "oj-offcanvas-outer-wrapper". A default value is determined if not specified. An "ojdefaultaction" event will be fired when threshold is exceed upon release. - See:
-
- #tearDownSwipeActions
- oj.OffcanvasUtils.html#setupPanToReveal
Returns:
- Type
- void
-
(static) tearDownSwipeActions(elem) → {void}
-
Removes the listener that was added in setupSwipeActions. Page authors should call tearDownSwipeActions when the content container is no longer needed.
Parameters:
Name Type Description elemElement the DOM element (of the offcanvas) that hosts the swipe actions - See:
-
- #setupSwipeActions
- oj.OffcanvasUtils.html#tearDownPanToReveal
Returns:
- Type
- void