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