dash-canvas icon indicating copy to clipboard operation
dash-canvas copied to clipboard

setting a value for 'tool' parameter does not set that tool by default

Open sstripps1 opened this issue 5 years ago • 5 comments

dash_canvas.DashCanvas(
                    id='canvas',
                    width=800,
                    height=445,
                    tool='rectangle',
                    lineWidth=2,
                    filename=filename,
                    hide_buttons=['pencil', 'line', 'pan', 'select', 'zoom'],
                    goButtonTitle='Get coordinates'
                ),

Setting the tool parameter equal to 'rectangle' is supposed to set the tool to rectangle by default when the app is opened, but instead, the 'pan' tool is selected.

sstripps1 avatar Feb 05 '20 18:02 sstripps1

Hey @emmanuelle , what's the level of effort on this one? It makes this demo a bit funky: https://dash-demo.plotly.host/annotation-bounding-box/ https://github.com/plotly/dash-customer-success/issues/254#issuecomment-583447075

jackparmer avatar Feb 07 '20 17:02 jackparmer

@jackparmer don't know but probably one or two days to figure out what's going on (maybe less if I get help from Will or Marc-André), plus a new release.

emmanuelle avatar Feb 07 '20 17:02 emmanuelle

Just to clarify: the code snippet above activates both pan and rectangle behavior for the image loaded into canvas (as shown below in the screencast).

app

ycaokris avatar Feb 14 '20 17:02 ycaokris

had the same issue with one of my apps. Managed to fix it by installing the previous release of dash pip install dash==1.10.0

Need to figure out why that is...

electron-microscopist avatar May 05 '20 13:05 electron-microscopist

Hi... Any updates on this issue? I'm still struggling with this problem. If I press the Save button initially, the correct tool gets selected. And nothing shows in the coordinates. But still, this is not good.. :)

GeorgeVJose avatar Nov 12 '20 09:11 GeorgeVJose