Event Types
vuer.events
#
- class vuer.events.Event[source]#
Bases:
object
An event is a message sent from the server to the client.
- class vuer.events.InitEvent[source]#
Bases:
ClientEvent
- class vuer.events.NullEvent[source]#
Bases:
ClientEvent
- class vuer.events.Noop[source]#
Bases:
ServerEvent
- etype = 'NOOP'#
- class vuer.events.Set[source]#
Bases:
ServerEvent
Set Operation (Server Event).
SET Operator is used exclusively to set the root Scene node. Throws an error (on the client side) if the data is not a Scene object.
- etype = 'SET'#
The Event Type.
- class vuer.events.Update[source]#
Bases:
ServerEvent
UPDATE Operator is used to update a specific node in the scene graph.
Use “$delete” value for elements you want to remove. Or “$strict” mode to copy the element verbatim.
- Example:
app.update @ { “key”: “my_key”, “value”: “$delete” }
app.update({ “key”: “my_key”, “value”: “$delete” }, strict=True)
app.update @ [ { “key”: “my_key”, “value”: “$delete” }, … ]
app.update({ “key”: “my_key”, “value”: “$delete” }, …, strict=True)
- etype = 'UPDATE'#
- class vuer.events.Add[source]#
Bases:
ServerEvent
ADD Operator is used to insert new nodes to the scene graph. By default it inserts into the root node, but you can specify a parent node to insert into via the to argument.
Note: only supports a single parent key right now.
- Example:
app.add @ Element(…)
app.add @ [ Element(…), Element(…), … ]
app.add(Element, to=”my_parent_key”)
app.add([Element, …], to=”my_parent_key”)
- etype = 'ADD'#
- class vuer.events.Upsert[source]#
Bases:
ServerEvent
UPSERT Operator is used to update nodes to new values, when then they do not exist, insert new ones to the scene graph.
Note: only supports a single parent key right now.
- Example:
app.upsert @ Element(…)
app.upsert @ [ Element(…), Element(…), … ]
app.upsert(Element, to=”my_parent_key”)
app.upsert([Element, …], to=”my_parent_key”)
- etype = 'UPSERT'#
- class vuer.events.Remove[source]#
Bases:
ServerEvent
An Update ServerEvent is sent to the client when the server wants to update the client’s state. It appends the data sent in the Update ServerEvent to the client’s current state.
- etype = 'REMOVE'#
- class vuer.events.Frame[source]#
Bases:
ServerEvent
A higher-level ServerEvent that wraps other ServerEvents
- ServerEvent: ServerEvent#
- etype = 'FRAME'#
- class vuer.events.End[source]#
Bases:
ServerEvent
A higher-level ServerEvent that wraps other ServerEvents
- etype = 'TERMINATE'#