Skip to content

Events

The function that executes when the event fires. Events can be assigned in two ways:

  1. Using events parameter on initialization:
js
let settings = {
  ...
  events: {
    onWillPresent: (ev) => {
      console.log('Will present callback', ev);
    }
  }
}
  1. Using on method after initialization.
js
const pane = new CupertinoPane('.cupertino-pane', { /* ... */ });
pane.on('onBackdropTap', (ev) => {
  console.log('Backdrop tapped', ev);
});
NameTypeDescription
onDidDismissvoid: () => {}Call after pane will dissapeared
onWillDismissvoid: () => {}Call before pane will dissapeared
onDidPresentvoid: () => {}Call after pane will present
onWillPresentvoid: () => {}Call before panel will present
onDragStartvoid: () => {}Call when detect user drag event on pane
onDragvoid: () => {}Call executes on each new position of pane
onDragEndvoid: () => {}Executes when drag event complete
onBackdropTapvoid: () => {}Call when user tap backdrop overlay
onTransitionStartvoid: () => {}Executes before auto transition and animation start
onTransitionEndvoid: () => {}Executes when transition and animation complete