-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Get cluster objects not using dark power. #3499
Comments
Wrt to title, I'm inclined to reply with Game of Throne[I] references , but I shall resist.
I can image it looking a bit wrong if you have clustered clusters, As to getting all the clusters, since you hacking into the [I] Or Legion, or Midnight, Texas, or Day Watch....too many to choose from. |
My app is on production already and I am afraid that non public API could be changed due to the internal use, so my logic will become incorrect easily.
It is. But it's dirrectly what I need. I'm adding custom elements dirrectly to that items. It fits perfect. [I] My mistake, it should be dark force. |
I can appreciate that. But I'm afraid that that doesn't answer the question as to why Also a bit scary, circumventing the API! But I'm quite sure that the behavior of
You mean, you have clusters within cluster?
OK, your call. If it works for you then there's no problem. Only I don't think I can offer much support, if any, if things don't work out. OK, so I'll have to resist using Star Wars references. |
Itself looks fine but using of it in that way looks wrong. But if You sure that the behavior of nodeIndices won't chang, everything should be good. Thank You for your help! |
Aah, OK, then I misunderstood. The functionality of Also, the description of determining the clusters still applies. You can get the node indices from Ah, you closed already. I hope this comment is somewhat still of use. |
@wimrijnders Thanks, that will help as well. Because for cluster I use another custom drawn elements. |
'custom drawn': Any reason you can not use |
AAh, right! You want to use Now that looks like an oversight. I'm going to check the logic on this. We may need to reopen this issue. I see now where you're going. That's why you need the cluster nodes. OK, I'm going to think now about how you can get them in a 'legal' manner. |
Thanks, will be waiting for the news. |
OK, this might look silly, but it's a short, simple solution: var ids = Object.keys(network.getPositions()); // id's of all visible nodes, including clusters
// Say that ids[4] is a cluster id
network.isCluster(ids[4]); // ==> true I see you are actually using So this is just API calls. You will be returning from |
@wimrijnders , Thank You, it's really so. I don't know why I didn't try in that way. |
So we can close that issue? |
😁 Don't worry about it, shit like this happens all the time. I'm very sure I feel a lot stupider than you at the moment because of this. Yes, time to close. Until next time! |
@wimrijnders , good that You mentioned this issue, subscribed on it. Also waiting for fix of widthConstraint since it was going to infinity loop. |
Hello, is there any possibility to get cluster nodes in similar way like regular nodes (
data.nodes.get()
)? My case is to get all visible nodes on network. I am getting this info from herenetwork.clustering.body.nodeIndices
and it's seems to be a bit wrong.The text was updated successfully, but these errors were encountered: