polotno-project / polotno-board

Roadmap and bug-tracker for the Polotno project.
https://polotno.dev/
9 stars 1 forks source link

Limit element placing inside multiple rectangles #33

Closed JohnKiller closed 1 year ago

JohnKiller commented 2 years ago

A way to set some rectangles inside the canvas that delimits the places where the user can put things into. For example, in the T-Shirt sample, I would like the user to put their logo only on the shoulder and on the center. But it would be nice if this feature can be made to snap instead of forcing, this way those rectangles are not a hard limit but just helps the user to place things in the correct spot, but allows them to override that. This feature is also useful to set a margin in the canvas area so only the background can go over it, while all elements must be inside the rectangle. Hope my request is clear, thanks for the nice product!

lavrton commented 1 year ago

I think it can be already implemented using https://polotno.com/docs/demo-grid/.

Also, optionally, you can listen for any changes in the store, check positions of elements. If they are out of place, show some warning in the UI.