drawsvg iconDRAWSVG user's guide

8.1. Constraints introduction

DRAWSVG includes a constraints manager.

Constraints are defined in the document (with defs elements) and applied to the elements (with drawsvg:constraints attribute).

Figure 8.1. Constraints definition

Constraints definition

The constraints are executed automatically on modification of the associated elements and propagated on the impacted elements.

The management of constraints is transparent for the user.

Constraints are typed and have modifiable properties.

Constraints properties can be edited and removed with the selected element properties dialog and its constraints tab panel.

The execution of constraints can be started explicitly.

Figure 8.2. Constraints tab panel

Constraints tab panel

Constraints have a priority property that can be specified to control the order of execution on an element.