top trim

Animationen bei Eingang und Ausgang von Staten aufrufen

When building the states of a gadget, you can create various animations to play when entering and exiting states using the animate and animateExit attributes of the state element. In the following code sample, we have created a style that includes references to animations that occur when entering and exiting the hovered state. This style can then be applied to a box or a gadget in your scene.

Tabelle C.1. Liste an Staten

State Name State Description
hidden Box is not visible but the size is accounted for in the scene.
collapsed Box is not visible but the size is not accounted for in the scene.
overflowed Box contents are larger than actual size of the box.
hovered Mouse is hovering over the box.
pressed Left mouse button is pressed.
focused Box has the keyboard focus.
disabled Box is not interactive.
popped Menu is open.
toggled Control that is in the on state.
selected Items that are selected.

<style id="ani1" tag="ani1" fill="url(#redBrush)">
  <state name="hovered"
    fill="url(#greenBrush)"
    animate="url(#ani.hover)"
    animateExit="url(#ani.unhover)"/>
</style>
bottom trim