grid

Specifies whether dragged objects are snapped to a grid.

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:

# Syntax

set the grid to {true | false}

# Examples

set the grid to true

# Description

Use the grid property to align objects easily.

If the grid property is set to true, any object the user moves or resizes is moved or resized to the nearest point on the grid. If the object is moved, its top and left are multiples of the gridSize. If the object is resized, its height and width are multiples of the gridSize.

If the grid is false, moved and resized objects are not constrain and are moved to exactly where the user puts them.

The setting of the grid property does not affect the move command, or setting properties such as the location or rectangle of the object, or nudging objects a single pixel with the arrow keys. Only mouse movements are affected.

# Tags

# See

- **keyword:** top, point, rectangle - **constant:** left - **property:** location, slices, height, properties, width, gridSize - **command:** move - **glossary:** object, property, pixel, constrain, command