-
-
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
Removing items from elements does not remove them from cytoscape instance #41
Comments
you are mutating the array here:
instead, reassign it and (I think) it should work:
|
Or even just
Gives the same result. FWIW, I would prefer to mutate the array though, to iteratively update the graph rather than be forced to re-initialize, if possible. |
This seems to be the same issue raised by @gioppoluca in #39 and #40, @rcarcasses |
is hard to know what could be wrong without a piece of testable code, can you provide such? also, are you using |
Here is your codesandbox with the delete element implemented.. It just has the addition of
I am using |
ok, I'll take a look later, this |
I see- thanks @rcarcasses! |
@rcarcasses have you looked into an/or resolved this? I've tried digging in to your source as well as cytoscope but getting quickly lost. |
@bornytm is your issue finally solved after updating? |
Hi racarcasses! I think I have run to the issue on this thread. Removing items from the elements does not remove them from Cytoscape instance. This is my cyto instance I have a computed property which is the source for the elements: I can see that my data source for the elements updates. For E.g. An Array of 149 elements to an array of 20 elements. When I change my data source from 20 to 149 (Basically adding elements) the Cytoscape collection seems to pick it up. Any help would be appreciated. Thank you. |
I am having a similar issue as @srisaiyeegharan, thought cytoscape does not pick up changes adding elements either. In the component where I am using I can force an update explicitly by adding a watcher on the elements and directly adding the elements to the graph with |
Adding items to the
elements
array successfully creates them within the cytoscape instance:But removing them:
Does not remove them from the view, even after running a new layout.
Is this the incorrect way to update the instance? Why is
vue-cytoscape
not respecting the updatedelements
data?The text was updated successfully, but these errors were encountered: