Murali-group / GraphSpace

The interactive graph sharing website.
http://graphspace.org
GNU General Public License v2.0
30 stars 41 forks source link

For issue #293 Layout overwrites 'font-size' node attribute #299

Closed YoonjinTKim closed 6 years ago

YoonjinTKim commented 7 years ago

Instead of setting the font-size as 0 pt, graphs_page.js file created original_opacity hashmap for text-opacity for each node and save the 'text-opacity' into hashmap. When #toggleNodeLabels is clicked, hideGraphInformation save 'text-opacity' style for each node into original_opacity{} and set 'text-opacity' to 0. When #toggleNodeLabels is unchecked, showGraphInformation sets 'text-opacity' back to the original 'text-opacity' of each node by calling the value from the original_opacity hashmap.

By using this method, each node can use font-size and text-opacity from json file independently and the script updates each node.

1 2 3 4