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

Canvas to draw on #9

Open
fonsp opened this issue May 21, 2020 · 10 comments · May be fixed by #234
Open

Canvas to draw on #9

fonsp opened this issue May 21, 2020 · 10 comments · May be fixed by #234
Labels
enhancement New feature or request good first issue Good for newcomers needs Pluto.jl feature Can't be done right now because something is missing from Pluto.jl itself

Comments

@fonsp
Copy link
Member

fonsp commented May 21, 2020

This can be based on the rectangle drawing demo in the Interactivity sample notebook inside Pluto.

Speed might not be great yet, but this should improve a lot once Pluto uses MsgPack instead of JSON.

@fonsp fonsp added enhancement New feature or request good first issue Good for newcomers labels May 21, 2020
@RensDimmendaal
Copy link

I'm excited about this feature. I augmented the box drawing feature for a small demo: https://twitter.com/R_Dimm/status/1305251396669800448

I don't know javascript but potentially this might serve as inspiration: https://github.com/andfanilo/streamlit-drawable-canvas they had a similar usecase but in python.

I'd be happy to take a stab at this feature someone can help specify the requirements.

@fonsp
Copy link
Member Author

fonsp commented Sep 14, 2020

Sorry I already kind of wrote this myself:
https://github.com/fonsp/disorganised-mess/blob/master/drawoncanvas.jl

🙂
let's turn it into a PlutoUI element after #3 is done

@RensDimmendaal
Copy link

Super. Keep up the great work!

@shashankp
Copy link
Contributor

Great to see already something in the works..
I was prototyping about a 2D slider

image

@fonsp
Copy link
Member Author

fonsp commented Sep 14, 2020

@dpsanders asked for that once

@shashankp
Copy link
Contributor

Create another issue to track it?

@fonsp
Copy link
Member Author

fonsp commented Sep 15, 2020

yep!

@shashankp shashankp mentioned this issue Sep 15, 2020
@fonsp fonsp added the needs Pluto.jl feature Can't be done right now because something is missing from Pluto.jl itself label Nov 1, 2021
@DhruvaSambrani
Copy link

Sorry I already kind of wrote this myself: https://github.com/fonsp/disorganised-mess/blob/master/drawoncanvas.jl

slightly_smiling_face let's turn it into a PlutoUI element after #3 is done

Hi @fonsp what's the scene on this issue? Is it just a matter of someone formalizing your code?

@fonsp fonsp linked a pull request Nov 11, 2022 that will close this issue
11 tasks
@fonsp
Copy link
Member Author

fonsp commented Nov 11, 2022

WIP at #234!

@aplavin
Copy link

aplavin commented Apr 14, 2023

@fonsp this thread and examples have been helpful!
The only thing I cannot make to work is to draw an image on the canvas from julia. https://gist.github.com/RensDimmendaal/2cb0ada5750b00d703c3976df1716e14 has an example of an image from a URL, but I have the image in Julia as a regular matrix of RGB colors. How to send it to JS and draw?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers needs Pluto.jl feature Can't be done right now because something is missing from Pluto.jl itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants