Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit element placing inside multiple rectangles #33

Closed
JohnKiller opened this issue Sep 26, 2021 · 1 comment
Closed

Limit element placing inside multiple rectangles #33

JohnKiller opened this issue Sep 26, 2021 · 1 comment

Comments

@JohnKiller
Copy link

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
Copy link
Collaborator

lavrton commented Jun 12, 2023

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.

@lavrton lavrton closed this as completed Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants