Remoto - VFS
|
Create a message with an arrow pointing to a DOM element. More...
#include "remoto!stdlib:js/paneManager/arrowMessage.js"
Public Member Functions | |
arrowMessage (message, o, at, my, offset, persistent) | |
The arrowMessage constructor. More... | |
complete () | |
Once an arrowMessage has fully faded away, this method will be called, which will also call arrowMessage.destroy(). More... | |
destroy () | |
Destroy the arrowMessage and remove it from the DOM. More... | |
goAway () | |
Make the arrowMessage goAway. More... | |
message (m) | |
Change the message of an existing arrowMessage. More... | |
Create a message with an arrow pointing to a DOM element.
This is useful for pointing out changes to UI elements as they happen.
Once an arrowMessage is created, a _completeCallback can be assigned if some additional function wants to be chained on to the completion of the message.
By default, the message will appear for 2000 milliseconds and fade over 200 milliseconds, then destroy itself.
For instance:
arrowMessage | ( | message, | |
o, | |||
at, | |||
my, | |||
offset, | |||
persistent | |||
) |
The arrowMessage constructor.
message | The message to display. |
o | The object to position against. |
at | The offset of the message against the object, using jQuery's position notation. |
my | The orientation of the message against the object's position, using jQuery's position notation. |
offset | An object {left:"x", top:"y"} for final offset if positioning just doesn't do what you want. |
persistent | A boolean value which if true will cause the message to not disappear automatically. In this case one would need to call the goAway() method for a fade, or a destroy() to kill it immediately. |
This will attempt to fit a message onto the screen. If a message is trying to display in a way that will cause a part of it to be invisible, it will reposition to fit or flip the orientation. This will not always succeed.
complete | ( | ) |
Once an arrowMessage has fully faded away, this method will be called, which will also call arrowMessage.destroy().
If a _completeCallback has been defined, it will be called.
destroy | ( | ) |
Destroy the arrowMessage and remove it from the DOM.
goAway | ( | ) |
Make the arrowMessage goAway.
This is useful for arrowMessage instances created with the noanimation flag
complete() will be called after the animation completes.
message | ( | m | ) |
Change the message of an existing arrowMessage.
m | The message to update to |