Skip to main content
Language

Configure Snapping

PhotoEditor SDK supports several configuration options to customize the snapping behavior for all sprites in the editor.

In this example, the editor's snapping behavior is configured to act as a guide for the user to see where the sprites should be placed. A use case could be that an application displays the photos both in rectangular as well as in circular shapes which requires the editor to indicate in which area the sprites' visibility is best.

Rotation snapping#

By default, the snapping is enabled when rotating a sprite. In this example, this behavior is disabled since only the outer positional snapping guides are needed.

Vertical center line snapping#

If set to true (by default) the center of the sprite snaps to a vertical line indicating the center of the photo. In this example, this behavior is disabled since only the outer positional snapping guides are needed.

Horizontal center line snapping#

If set to true (by default) By default, the center of the sprite snaps to a horizontal line indicating the center of the photo. In this example, this behavior is disabled since only the outer positional snapping guides are needed.

Outer positional snapping#

Sprites snap to the border of the photo along horizontal and vertical lines. By default, these lines are placed at a distance of 5% of the smaller side of the photo from the border (corresponding to 0.05). In this example, we want to increase this distance to 10% to define the visibility of the photo.