-
Notifications
You must be signed in to change notification settings - Fork 28
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
Changing the search to include all words in a node #37
Comments
Glad you're finding the code useful. It is just one additional attribute or multiple attributes you want to search for each node. One option is just to concatenate the value for whatever additional attribute you want to search to the label at line 385 of main.js. If it's multiple attributes to search they could all be concatenated together or (probably more efficiently) the search could loop over them and check them individually. |
Thanks for the fast response. Ah I see, it's multiple attributes. So could I include: g.test(a.label.toLowerCase()) && c.push({ I'd have to change 'g.test(a.label.toLowerCase())' I'm guessing? To include more g.tests? Chris |
Yes, that's basically it. I've made the changes online to main.js. Could you download the new main.js file and replace the file in your export? Then open your config.json file in a text editor (e.g., notepad) find the line that reads "informationPanel": { and replace it with "search":{
"fulltext":true
},
"informationPanel": { Save your config.json and try it out. It should search all the node attributes for any match. |
Thanks! That's excellent and exactly what I was looking for. Another quick one: how can I enter the plot in maximum view? I must click on the minus at the bottom to get the full view. Where is this default set? Kind regards, Chris |
Hi Chris, Sorry for the long delay. The full network should be available by default, but I have seen this issue on occasion. I think it has to do with an underlying sigma.js bug that I never fully tracked down. There is a new version of sigma.js out now that I will incorporate into the plugin in due course. That should hopefully address the issue, but I don't have any immediate fix to hand I'm afraid. |
Hey! I'm looking to edit the search function in main.js to search not just for names, but any keywords contained in the node definitions returned. How would one do that?
Great script btw! Chris
The text was updated successfully, but these errors were encountered: