netcreateorg / netcreate-itest

Developing the 2.0 version of NetCreate
https://github.com/netcreateorg/netcreate-2018
Other
0 stars 0 forks source link

Feature: Filter edges by source and target labels #97

Closed benloh closed 10 months ago

benloh commented 10 months ago

The built in source and label fields are actually numeric id fields. We add a mapping to quickly allow us to filter by the source and target label strings.

This is a somewhat hacky implementation. The current filter definition system is relatively elegant in that it directly reads field definitions from the template definitions. But the built in edge fields for source and target use numeric ids, so the filter definitions default to using the numeric ids. To make this work, we replace the numeric definitions with string definitions.

Addresses #94

jdanish commented 10 months ago

@benloh Seems to work on the network and summary, but the edges in the edge table are not becoming transparent.

benloh commented 10 months ago

@jdanish I think we need to change the default transparency value for edges. Try using 0.1 instead of 0.02. I think that wasn't working well before. Though we might have to revisit it.

jdanish commented 10 months ago

Sure, but this still seems to not be shifting transparency?

Note: the count seems accurate, and the remove tab works. So I think the filter is working but not the transparency / it is not being assigned? I am AOK with changing the default, though, once this works...

Screenshot 2023-11-20 at 9 59 09 PM
jdanish commented 10 months ago

So I took a look and noticed that in EdgeTable.jsx, line 639 reads:

opacity: edge.isFiltered ? edge.filteredTransparency : 1

However, the nodeTable version is simpler, so I tried changing it to:

opacity: edge.filteredTransparency

to match what is in nodeTable and that fixed it. It seems that isFiltered is always false ...

jdanish commented 10 months ago

Oh, and please do change the default transparency to mirror the node transparency (0.2). Thanks!

benloh commented 10 months ago

Ah! I was wracking my brain trying to figure out what was wrong with my logic and missed that you were referring to the table. Good catch, thanks!

A few followups:

jdanish commented 10 months ago

Great and yes that is the target behavior!

benloh commented 10 months ago

Thanks! So OK to merge?

jdanish commented 10 months ago

Yes!