storyboard

bim.app. Namespace

storyboard

Description:
  • Collection of functions to handle the storyboard of the App.

Source:
Properties:
Name Type Description
containsStack function

Function to check whether contains stack or not. See bim.app.storyboard.containsStack for more details.

getStack function

Function to get stack from local storage. See bim.app.storyboard.getStack for more details.

setStack function

Function to set stack to local storage. See bim.app.storyboard.setStack for more details.

setCurrent function

Function to set current plugin to localstorage. See bim.app.storyboard.setCurrent for more details.

current function

Function to get current plugin from localstorage. See bim.app.storyboard.current for more details.

next function

Function to move to next plugin. See bim.app.storyboard.next for more details.

setPrevious function

Function to set previous plugin. See bim.app.storyboard.setPrevious for more details.

previous function

Function to get previous plugin. See bim.app.storyboard.previous for more details.

moveTo function

Function to move with data to other plugin. See bim.app.storyboard.moveTo for more details.

setGoBack function

Function to set "goBack" function in plugin. See bim.app.storyboard.setGoBack for more details.

resetGoBack function

Function to reset "goBack" function in plugin. See bim.app.storyboard.resetGoBack for more details.

goBack function

Function called directly or indirectly when user goes back. See bim.app.storyboard.goBack for more details.

Methods

(static) containsStack(stackObject, stackObjects) → {boolean}

Description:
  • Function which checks whether the storyboard contains stack in stack objects or not. Checked by second parameter's paths.

Source:
Example
bim.app.storyboard.containStack(${1:stackObject}, ${2:stackObjects});
Parameters:
Name Type Description
stackObject string
stackObjects Array
Returns:

true | false

Type
boolean

(static) getStack() → {string}

Description:
  • Function to get stack from local storage.

Source:
Example
bim.app.storyboard.getStack();
Returns:

Returns the item in local storage which has key "navigation"

Type
string

(static) setStack(params)

Description:
  • Function to set stack to local storage. Checks whether there is already existing stack or not before setting it.

Source:
Example
bim.app.storyboard.setStack();
Parameters:
Name Type Description
params Object

Required.

Properties
Name Type Description
pluginId string

Plugin ID.

Returns:

(static) setCurrent(params)

Description:
  • Function to set current plugin to localstorage.

Source:
Example
bim.app.storyboard.setCurrent(${1:pluginID});
Parameters:
Name Type Description
params string

Required. Plugin ID.

Returns:

(static) current() → {string}

Description:
  • Function to get current plugin from localstorage.

Source:
Returns:

Plugin ID. Get item using key "current" from local storage.

Type
string

(static) next(callback)

Description:
  • Function to move to next plugin. Get plugins data, save current plugin as previous, and move to next plugin.

Source:
Example
bim.app.storyboard.next(${1: callback});
Parameters:
Name Type Description
callback function
Returns:

(static) setPrevious(params)

Description:
  • Function to set previous plugin. Set plugin item in local storage using key "previous".

Source:
Parameters:
Name Type Description
params string

Required.

(static) previous() → {string}

Description:
  • Function to get previous plugin. Get previous plugin item from local storage using key "previous".

Source:
Returns:

Previous plugin item.

Type
string

(static) moveTo(params) → {Object|boolean}

Description:
  • Function to move with data to other plugin. Move with data to specific plugin's specific page.

Source:
Parameters:
Name Type Description
params Object

Required.

Properties
Name Type Description
page string

Required. Specific page of the plugin wanted to move to.

data Object

Data wanted to be sent.

reload boolean

Whether reload or not. Sent to the plugin as reloadBimPlugin=true

scrollTop string

Scroll Top

animation string

Animation

Returns:

Error detail object | false when success

Type
Object | boolean

(static) setGoBack(input)

Description:
  • Function to set "goBack" function in plugin.

    Set bim.app.storyboard.goBack() in plugin.

    Rewrites the default bim.app.storyboard.goBack made.

Source:
Example
bim.app.storyboard.setGoBack(function () {
 // Would be called when native back button pressed
});
Parameters:
Name Type Description
input function

(static) resetGoBack()

Description:
  • Function to reset "goBack" function in plugin.

    Reset bim.app.storyboard.goBack() to default status It must be same with bim.app.storyboard.goBack()

Source:
Example
bim.app.storyboard.resetGoBack();

(static) goBack()

Description:
  • Function called directly or indirectly when user goes back.

    Run by bim.app.storyboard.goBack(); or Android Backbutton.

    If page exists, close page with bim.app.close.page({ animatePages: true });

    If there is no page, go to previous plugin

Source:
Example
bim.app.storyboard.goBack();