Skip to content

How to force draggable, resizable to increment or decrement to the multiples of Xpx (i.e. 50px) #954

@jadiagaurang

Description

@jadiagaurang

Environments

Description

I am trying to force user to drag or resize single element or group of element to the multiple of Xpx (i.e. 50px).

image

I am using following config properties to achieve 50x50 grid.

snapDigit: 50,
snapThreshold: 50, // Distance value that can snap to guidelines
snapGridWidth: 50, 
snapGridHeight: 50, 

But, for some reason, sometimes, users are able to drag or resize Elements into non multiples of 50px x 50px cell.

For time being I am using request to move the element back into into 50px x 50px cell.

But, is there any efficient inbuild way to achieve that?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions