Uh oh!
There was an error while loading. Please reload this page.
Draw & adjust new shapes over image trace and cartesian subplots - #4775
Conversation
- activate, resize, move and delete
alexcjohnson
commented
Apr 20, 2020
Thoughts on naming? I might vote for: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- preserve first element of points in polygons for path command e.g. M, L, etc.
archmoj
commented
Apr 20, 2020
Good call. Revised in a585394. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- record outline positions only on activeshapes and at init time - call update on end drags
@alexcjohnson here is a demo with shapes on template. |
jackparmer
commented
Apr 28, 2020
Incredible work as always Mojtaba!! |
emmanuelle
commented
Apr 28, 2020
Hurray! 🎉 😍 |
pfebrer
commented
May 11, 2020
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. |
nicolaskruchten
commented
May 11, 2020
Glad you like it! In principle these should be available in react-plotly.js if you upgrade the version of plotly.js via |
pfebrer
commented
May 11, 2020
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
imagetrace (as well ascartesiansubplots).New
layoutattributes 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