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

Only Empress should call drawTree() #215

Open
kwcantrell opened this issue Jun 26, 2020 · 1 comment
Open

Only Empress should call drawTree() #215

kwcantrell opened this issue Jun 26, 2020 · 1 comment
Labels
refactoring Use best practices or improve the usage of public APIs

Comments

@kwcantrell
Copy link
Collaborator

I'm not really a fan of having things call drawTree() from outside of the Empress object -- from the perspective of "managing the application state", I think it makes more sense to have Empress take care of that. I would suggest making empress.setTreeNodeVisibility() also call drawTree(), and adapting the second function here (for recentering) into another Empress function that centers the camera and calls drawTree().

(That said, I realize that there are 4 other things within the Side Panel Handler that call drawTree(), so ok if you'd prefer to keep this as is for the time being.)

Originally posted by @fedarko in https://github.com/biocore/empress/pull/212/files

@fedarko
Copy link
Collaborator

fedarko commented Jun 26, 2020

Worth noting that one of those "4 other things within the Side Panel Handler" is _updateLayout(), which as it turns out is unused (it's not referred to again within the code in favor of empress.updateLayout()). (Apparently I added this function a few months ago and then never used it again. My bad.)

... So we can probably just remove that function :)

@ElDeveloper ElDeveloper added the refactoring Use best practices or improve the usage of public APIs label Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Use best practices or improve the usage of public APIs
Projects
None yet
Development

No branches or pull requests

3 participants