Closed aegis1980 closed 3 years ago
Hey,
This looks good but needs a few changes.
selected
property should only be called when a node is clicked. This retains backward compatibility. As it currently is it will fire when an edge is clicked. This will break existing apps that do not know how to handle the edge click event (such as if they look up a node in a database), I don't think it is right to make a breaking change and just inform people in the readme they must update their code. selected
property, which is the selected node, and a selected_edge
property which is the selected edge.selected_edge
property should be set to null, and vice versa. Only one thing should be able to be selected at once. This also means that reacting to both a node and edge click can be easily done in one call back without a unified attribute. Happy to debate the changes, but if these are made I will merge, and publish the new package.
Cool.
I wondered whether perhaps selected
prop remains (ie node-only functionality is unchanged, no breaking changes) but is marked as "pending depreciation" (however that is done in a python/javascript world), to be replaced with selected_node
and selected_edge
?
Will push code which does this in a mo (plus addresses your third point, I think).
Yes on .vscode
PS Great work BTW! Forget to say before.
I think that is a good system, I have checked the code and run the examples. Everything looks good. Thanks for updating the readme.
I have put a question on the plotly/dash forums to check what is the best practice around marking a property as deprecated, but in the mean time I am going to merge this in and publish it.
Thanks for the contribution.
Release published: https://pypi.org/project/dash-interactive-graphviz/0.3.0/
Sorry. Got trigger happy. Going to update
usage_highlight.py
. EDIT: 'usage.py' work find though