connectome-neuprint / neuPrintExplorer

View connectomic data stored in neuPrint
Other
24 stars 4 forks source link

Disable context menu when right clicking in Neuroglancer #346

Closed hannah-martinez closed 1 year ago

hannah-martinez commented 1 year ago

When right clicking in Neuroglancer, the context menu appears. A workaround is to add oncontextmenu="return false" to the highest level Neuroglancer HTML tag (specifically, the tag with class neuroglancer-container) using the browser dev tools. Could this be incorporated into @janelia-flyem/neuroglancer?

image

neomorphic commented 1 year ago

@hannahgooden , do you plan on using the @janelia-flyem/neuroglancer code elsewhere? If not, it is probably easier to add the context menu change to @janelia-flyem/react-neuroglancer.

hannah-martinez commented 1 year ago

@janelia-flyem/react-neuroglancer would work too!

neomorphic commented 1 year ago

@hannahgooden I had a look in the neuroglancer code and it wasn't too complicated to fix, so I did it there. https://github.com/neuroglancerhub/neuroglancer/commit/a4c1289a54bffab3ac357f82fb05c0dc54097aa7

It has been applied to all of our neuprint domains. Thanks for reporting.

hannah-martinez commented 1 year ago

Thank you so much!