-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 & adjust new shapes over image trace and cartesian subplots #4775
Conversation
- activate, resize, move and delete
Thoughts on naming? I might vote for: |
- preserve first element of points in polygons for path command e.g. M, L, etc.
Good call. Revised in a585394. |
- record outline positions only on activeshapes and at init time - call update on end drags
@alexcjohnson here is a demo with shapes on template. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃 👯 🕺
Incredible work as always Mojtaba!! |
Hurray! 🎉 😍 |
Just wanted to say that this is amazing :) I hope you don't mind this quick question: Are these changes automatically available in react-plotly.js? I updated plotly.py and it works, but when I try it on react I just get a white canvas. Thanks in advance and sorry if the question does not belong here. |
Glad you like it! In principle these should be available in react-plotly.js if you upgrade the version of plotly.js via |
Makes sense 😄 I somehow thought that plotly.js would get updated automatically when I reinstalled react-plotly.js. All good now, thanks! |
Resolves #4374.
As illustrated in demo, this PR enables drawing and editing shapes over
image
trace (as well ascartesian
subplots).New
layout
attributes areFor more info regarding new attributes, please visit
plotly.js/src/components/shapes/draw_newshape/attributes.js
Lines 15 to 119 in 891b6a1
as well as
plotly.js/src/components/shapes/attributes.js
Lines 241 to 261 in 891b6a1
New modebar buttons could simply be added by passing
strings
(instead ofobjects
) inconfig
.For example:
@plotly/plotly_js
@emmanuelle