-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Basic Reactivity #42
Basic Reactivity #42
Conversation
…cytoscape into feature/reactive-updates
Feature/reactive updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @wfischer42, thanks for your hard work, can you:
- remove
wfischer42-vue-cytoscape-1.0.6.tgz
file - put
"name": "vue-cytoscape"
back inpackage.json
- bump
"version": "1.0.7"
inpackage.json
please? I'll shortly merge your changes.
Yeah, no problem! I'll take care of it now. Also, I've never used Vuepress -- would you like me to figure it out and add documentation for the changes? |
thank you again. For adding/editing documentation modify the https://github.com/rcarcasses/vue-cytoscape/tree/master/docs once committed, documentation will be build automatically. |
Documentation is updated! I didn't provide examples, but I did originally make changes to |
Sounds fantastic! Just a comment: perhaps in the future it is convenient to rewrite the logic using proxy objects' api as in the upcoming version 3 of |
package and documentation updated, you can double check it now! :) |
I'm not sure how proxy objects work, but I'll look into it at some point and see if I can figure it out. The changes I made so far are just the ones I need for my project at the moment (and I'll add more stuff as new requirements emerge). Also, I just noticed that I hadn't included the 1.0.7 changelog update in the root-level readme. Just wanted to point it out. |
This PR adds reactivity to the vue-cytoscape, specifically for the
data
andposition
element attributes. It also includes minor adjustments to the example config & data, adding types and exporting them separately.It also includes a change that should add flexibility to how ID's are added, though I haven't fully tested it.
I'm working on adding an
animate: boolean
prop for elements that will add an animation to a reactive position change, and I'll finish adding reactivity to the remaining cytoscape element attributes, such asclasses
,renderedPosition
,selected
, and so on. I'm doing them manually to avoid the "remove and re-add" approach to updates, which doesn't work particularly well if you're dealing with nodes with connected edges.