May 2015
Beginner to intermediate
412 pages
8h 44m
English
With PrimeFaces, we can snap the dragged component to the inner or outer boundaries of another component (a component's DOM element).
In this recipe, we will discuss snapping and its options in detail. As an example, we will develop a big h:panelGroup component as a snap target and three other small h:panelGroup components as draggable components, with various snapping options.
Generally, the snapping behavior is activated by setting the attribute snap to true. The snapping behavior is configurable with two options—snapMode and snapTolerance. The first option, snapMode, determines which edges of snap elements the draggable component will snap to. The second option, snapTolerance, determines ...
Read now
Unlock full access