Hi,
I want to build a small app for annotating images. The user can draw a path like in the example below with the “drawclosedpath” button in Dash. Now when selecting the path, by double-clicking on a point of this path, it is possible to remove this point. My question: Is there any possibility to do the reverse? By that I mean: How can I add a point to the path after it is already created?
import plotly.express as px
from dash import Dash, dcc, html, Input, Output, no_update, callback
from skimage import data
img = data.chelsea()
fig = px.imshow(img)
fig.update_layout(dragmode="drawclosedpath")
config = {
"modeBarButtonsToAdd": [
"drawclosedpath",
"eraseshape",
],
"doubleClickDelay": 1000,
}
# Build App
app = Dash(__name__)
app.layout = html.Div(
[
dcc.Graph(id="fig-image", figure=fig, config=config),
]
)
app.run()
Thanks for your help