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

Draw polygon by click #6319

Open
chenxiaoleizi opened this issue May 6, 2020 · 7 comments · May be fixed by #8430
Open

Draw polygon by click #6319

chenxiaoleizi opened this issue May 6, 2020 · 7 comments · May be fixed by #8430
Labels

Comments

@chenxiaoleizi
Copy link

Hi, i need a help in my project.
How to draw a polygon by click like below。
I did not found the example at demo page demos
draw

@virror
Copy link
Contributor

virror commented May 6, 2020

@chenxiaoleizi
Copy link
Author

This might help?
http://fabricjs.com/fabric-intro-part-1#path_and_pathgroup

If i click the canvas and get a position, how to add it to the fabric.Path instance or i need a new instance of fabric.Path and add it to the canvas?

@asturur
Copy link
Member

asturur commented May 7, 2020

let's see if we can put up a demo with a polygon. i would like to have a clear example for everyone

@asturur asturur added the docs label May 7, 2020
@chenxiaoleizi
Copy link
Author

let's see if we can put up a demo with a polygon. i would like to have a clear example for everyone

Thanks!that is wonderful!

@kchaengsiri
Copy link

I found this example hope it helps.
https://codepen.io/durga598/pen/gXQjdw?editors=0010

@chenxiaoleizi
Copy link
Author

@CKitisak Thanks!

@dmdum
Copy link

dmdum commented Dec 15, 2021

Is there an example where the points are editable after the user creates a polygon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants