plotly.js
plotly.js copied to clipboard
editable property on layout.shapes does not work
Hi all, I'm trying to limit the shape editing to individual shapes. But when I set editable true on any shape it doesn't work as intended. I was using config.editable before and yes I disabled that setting when I tried to make shapes editable.
Here's the example code: https://codepen.io/aanilyildiz/pen/WNzNvPw
You need to set shape.editable: false.
Also please note that plotly-latest does not load the latest v2.
Here is the working codepen.
I am trying make certain shapes editable not all of them so setting the editable false is not what I want to achieve. I've updated the script tag and the issue is still there, setting editable true does not make the shape editable
In your codepen one could activate the shape for editing by clicking on the edge.
The automatic logic also depends on the opacity of the shape & fillcolor as well as line.width.
So, if you want to keep the minimal line width, you could adjust the color and opacity as shown in this codepen.
Thank you so much for your help, I didn't know that the fill color opacity could affect the editable status of the shape as it wasn't documented properly.
Thank you so much for your help, I didn't know that the fill color opacity could affect the editable status of the shape as it wasn't documented properly.
Great. Please feel free to open a PR to help improve the description here: https://github.com/plotly/plotly.js/blob/fefa11cbd533d11dea7db55d5dbed76c6359cf89/src/components/shapes/attributes.js#L221-L225