Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selection_tools VispyMouseMode incompatible with custom BaseCartesianData classes #364

Open
mmorys opened this issue Dec 22, 2020 · 0 comments
Labels

Comments

@mmorys
Copy link

mmorys commented Dec 22, 2020

Describe the bug
The currently documented means for creating a custom Glue data class involves inheriting from BaseCartesianData. A custom data class inheriting from BaseCartesianData will not be of type Data.

In order to utilize selection tools with a 3D scatter plot, the data must pass two type-checks to verify it is of type Data, making selection incompatible with custom data types.

if isinstance(layer_artist.layer, Data):

if isinstance(layer_artist.layer, Data):

Expected behavior
I would expect full compatibility of 3D Scatter plots with custom data classes.

Simple Fix
I am able to make the selection tool work properly in my local installation of glue-vispy-viewers with a simple change of these lines (and of course importing BaseCartesianData from glue.core) to:

if isinstance(layer_artist.layer, BaseCartesianData): 

I don't know what side effects this may have, but I could submit a pull request with this fix.

Details:

  • Operating System: Windows 10 64bit
  • Python version: 3.8.6
  • Glue version: 1.0.1
  • How you installed glue: conda
  • Glue-vispy-viewers version: 1.0.2
@mmorys mmorys added the bug label Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant