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

What does it mean when hsl is None in the callbacks? #4

Open
rec opened this issue Oct 16, 2021 · 3 comments
Open

What does it mean when hsl is None in the callbacks? #4

rec opened this issue Oct 16, 2021 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@rec
Copy link
Owner

rec commented Oct 16, 2021

Example here.

Is this a callback from outside the sphere?

Perhaps this is actually a different kind of callback, then?

@rec rec added the documentation Improvements or additions to documentation label Oct 16, 2021
@rec rec added this to the Beta milestone Oct 16, 2021
@Anders-Holst
Copy link
Collaborator

Yes, when you leave the sphere, there is no color under the pointer, and hsl is set to None accordingly. The same holds for the click callback. Originally, the callback was not called at all when the pointer was outside of the sphere. However, I wanted it to do things when leaving the sphere (specifically, leaving rt mode by returning to the previous mode or the last set color), and the easiest way was to remove the check on hsl previously done before the callback, and add it inside the callback instead.

@Anders-Holst
Copy link
Collaborator

Aha, what you suggest is to add a new callback which is called when leaving/entering the sphere. Yea one can do that. Build an entire event system with lots of event handlers if one likes it... I tried to keep it simple and straightforward, but agree that it is at the cost of overloading this callback to mean different things.

@rec
Copy link
Owner Author

rec commented Oct 16, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants