Functions used by the navigation Starlet.
- Source:
Methods
-
<static> animationStep(tween)
-
Tells the framework to process one step of animation. OrionNavigation.startAnimation must be called first.
Parameters:
Name Type Description tween
Number A float (must force) from 0 to 1 indicating a percentage of distance.
- Source:
Example
OrionNavigation.stepAnimation(0.5); // The framework will position the relevant WebViews 50% across the main application window.
-
<static> getVisibleStarlet(objectName, callbackName)
-
Returns the name of the currently visible starlet in the main framework window to the callback specified.
Parameters:
Name Type Argument Default Description objectName
String <optional>
'window' Namespace containing method.
callbackName
String Name of method.
Fires:
Example
OrionNavigation.getVisibleStarlet('', 'visibleStarletCallback'); function visibleStarletCallback(starletName) { // starletName is the visible starlet }
-
<static> makeStarletVisible(starletName, focusNew, duration, direction, easingData)
-
Animates a transition to specified Starlet.
Parameters:
Name Type Description starletName
String Framework name of Starlet to switch to.
focusNew
Boolean Whether the Starlet being switched to should take input focus after animation is complete.
duration
Number How long the anomation should last (sec, float).
direction
String 'left', 'right', 'up', 'down', or 'none'.
easingData
Array:.<Number:> List of float tween values between 0 and 1 corresponing to each step of the animation.
- Source:
Example
var data = [ 0.0, 0.2, 0.4, 0.6, 0.8, 1.0 ]; OrionNavigation.makeStarletVisible('name_of_starlet', true, 2.5, 'right', data);
-
<static> offsetWindow(offset)
-
Move Navigation's WebView to the left/right (+/-offset) to animate opening and closing. The framework will make sure you don't over or underflow it's positioning. (Only available via callFunction method or reexposed methods.)
Parameters:
Name Type Description offset
Number Distance from lateral edge of this WebView to edge of main application window (px).
- Source:
- See:
Example
OrionNavigation.callFunction('offsetWindow', [-25]); // or OrionNavigation.offsetWindow(-25);
-
<static> setAnimateStarletCallback(objectName, callbackName)
-
This lets the framework know which function to call in order to navigate to a Starlet. Used when someone hits the navigate hotkey.
Parameters:
Name Type Argument Default Description objectName
String <optional>
'window' Namespace containing method.
callbackName
String Name of method.
- Source:
- See:
Example
OrionNavigation.setAnimateStarletCallback('', 'animateStarletCallback'); function animateStartletCallback(starletName, direction) { // starletName is the starlet we want to animate to // if starletName == 'next', choose the next starlet on your list. // if starletName == 'prev', choose the previos starlet on your list. // direction is 'up', 'down' , 'left', 'right' or 'none'. }
-
<static> setVisibleStarletCallback(objectName, callbackName)
-
Sets a callback to be called when the starlet in the main framework window changes (due to navigation).
Parameters:
Name Type Argument Default Description objectName
String <optional>
'window' Namespace containing method.
callbackName
String Name of method.
Fires:
Example
OrionNavigation.setVisibleStarletCallback('', 'visibleStarletCallback'); function visibleStarletCallback(starletName) { // starletName is the new visible starlet }
-
<static> startAnimation(starletName, focusNew, direction, objectName, callbackName)
-
Tells the framework to prepare for a starlet switch animation.
Parameters:
Name Type Argument Default Description starletName
String Framework name of Starlet to switch to.
focusNew
Boolean Whether the Starlet being switched to should take input focus after animation is complete.
direction
String 'left', 'right', 'up', 'down', or 'none'.
objectName
String <optional>
'window' Namespace containing method.
callbackName
String Name of method.
- Source:
Fires:
Example
OrionNavigation.startAnimation('name_of_starlet', true, 'up', '','animationReady'); animationReady(ready) { // If ready is false, there was an initialization problem. Do not continue with animation. }
-
<static> stateChanged(opened)
-
Tells the Framework navigation has opened or closed. Used internally for input focus.
Parameters:
Name Type Description opened
Boolean Whether navigation is open.
- Source:
-
<static> stopAnimation(objectName, callbackName)
-
Tells the framework to complete the animation cycle. If callback is defined, the framework will call it to let the starlet know everything has completed.
Parameters:
Name Type Argument Default Description objectName
String <optional>
'window' Namespace containing method.
callbackName
String Name of method.
- Source:
Example
OrionNavigation.stopAnimation('', 'animationComplete'); animationComplete() { // ... }
-
<static> unsetAnimateStarletCallback()
-
Clears the animate starlet callback, stopping those events from being sent.
-
<static> unsetClosedCallback()
-
Clears the lightbox closed callback, stopping those events from being sent.
- Source:
- See:
-
- OrionNavigation.setClosedCallback
-
<static> unsetVisibleStarletCallback()
-
Clears the visible starlet callback, stopping those events from being sent. (due to navigation).