ExitComponent Class
This component is responsible to quit the application and redirect the user to an external URL.
Constructor
ExitComponent
(
-
core
Parameters:
-
core
CoreWanaplan Core.
Item Index
Methods
Methods
destroy
()
Called when the component is destroyed. The menu item is removed.
disable
()
Disables the component
doExit
(
-
event
Exits the plan and redirects the user to the exit url (see api.exitUrl)
Parameters:
-
event
ObjectThe event object.
enable
()
Enables the component
exit
(
-
event
Displays a confirm dialog and exits if the user clicks on exit button.
Parameters:
-
event
ObjectThe event object.
getTargeted
(
Object
-
vector
Finds out if the given position is over an element handled by the component
Parameters:
-
vector
VectorA position, usually the cursor's one.
Returns:
Object:
The targeted element, or null if nothing is found.
initialize
()
Initializes the component by adding a new entry in the top menu.
onContextChanged
(
-
context
Method called when the context is switched (2D -> 3D or 3D -> 2D)
Parameters:
-
context
StringThe new context
startListening
()
Calls all the event listeners.
stopListening
()
Removes all the event listeners.
update
()
Generic update method, called on every frame
Properties
structure
wnp.Structure
Structure file instance (shortcut to wanaplan.structure).
This is the base object where the whole plan is saved
Events
wnp.request.exit
Fired to quit Wanaplan.
wnp.request.exited
Fired when quitting Wanaplan.