About 2D Panel Rules and SVG Elements

Two wizards let you define, update, and delete animation and event rules associated with 2D Panels to monitor and interact with experiences.

This page discusses:

See Also
Editing Animation Rules
Editing Event Rules

Animation Rule

An animation rule is an object associated with an SVG element. It contains a condition, actions to be executed when the condition is TRUE, and actions to be executed when the condition is FALSE. The condition is described by a logical equation taking as argument a set of ports of the experience.

These actions enable you to change the colors of objects or texts, the visibility of objects, the position, and size of objects, etc.

Event Rule

An event rule is an object associated with an SVG element. It contains a statement list to be executed as soon as the event occurs. An event can be raised by clicking the SVG element. The statement list contains a set of assignment statements.

SVG Elements

The contents of the SVG file associated with the 2D panel is filtered to be displayed in the Elements area of the Animations and Events dialog boxes.

To appear in the Elements area, elements have to fulfill these conditions:

  • To be a graphical element or a group
  • To have an id attribute
An example of an SVG code corresponding to a valid graphical element is as follows:
<rect
     label="Rect2-1Scale"
     style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke-width:1"
     id="Rect2-1Scale"
     width="17"
     height="17"
     x="80"
     y="119" 
/>
In the tree of the Elements area, all the elements can be animated and they are named by their identifiers (id). You can hover over these identifiers to see more information about the elements.