Committing original prototype force directed graph. Need to make it use variable data, and fetch data via REST, as well as change the stylings.
#294 Stripped html down, fixed sizes of DOM stuff, made js resize the graph on window resize, added JQuery and JQueryUI. Working on changing from static to dynamic data next.
#294 Re-worked some of the D3 code, and proceeding to fetch real BioPortal data, parse it, and use it with the graph. I anticipate much faster loading. I will try web workers once that is working, to see if it speeds anythign up further.
#294 Have a lot of the REST call work done, but when I run it, it appears to be registering a lot of nodes and links with the layout. I do multiple populate calls...I need to sort out how to prevent multiple registrations with the layout, or figure out if it's actually another problem like failure to garbage collect. It runs impossibly slow right now! Note that the REST function call is currently commented out to prevent commiting of brokenly slow code.
#294 Have previous problem fixed, but now need to get properties on graph elements updated.
#294 Have graph surviving updates, but not updating properties as they are acquired. Tested with the static data file from the original prototype. The nodes being connected is an artifact of the data file specifying links using array indices rather than javascript objects. Open questions are how to get all properties to properly update, and to add web workers.
Added use strict pragma, added key function for graph data additions. These are both really important.
#294 Fixed some strict pragma bugs, figured out what the limits of D3 are for my purpose. D3 does not allow sub-selections of the enter() selection, except in ways that break the binding of data to the selection. Data cannot be rebound, so to speak. I am fairly certain that I should set the graph up with D3 and its idioms, but then use JQuery idioms to cherry pick DOM elements that need updating. This means that my update function will be meta-D3, and won't have any D3 in it. It's odd, but I believe it may be necessary. Alternatives include recreating the entire graph on update, or allowing extra elements to be created on each update. One of those is a time cost, and the other is a memory and time cost. I can use ontology virtual ids on DOM elements so that I can pick them out later with JQuery, as opposed to using the D3 binding to find associated elements.
#294 I need to clean the code, and make nodes sized as they are in BioMixer. One this is done, I have finished the first draft of this prototype, and can proceed to do a second draft that uses web workers.
#294 Mid-stride on node sizing. Overall it is working, but there are flashes of ridiculously large nodes. Finish that, work on arc scaling, then clean the code.
#294 Have arc scaling implemented as in BioMixer, for the D3 ontology overview.
#296 Have popups for node info, with approximately correct styling, using the jquery tipsy library, with some custom improvements for popup posiitoning. It is not a perfect match to the biomixer implementation, but it's almost fully acceptable.
#296 Labels are black. Fixed graph to keep central node fixed in middle, initialize other nodes in circle, and to dynamically manage the gravity parameter to keep nodes inside the bounding box. May require tweaking alter. If charge is changed, the gravity related variables will need tweaking. The graph stabilizes much quicker now.
#296 During graph computations, I have it check if labels need to be flipped left-right on any nodes, but only ever 2 seconds. It was too intensive to do more often.
#296 Hastened layout cooling, upgraded to newest version of D3 to do so. Also prevent gravity recalculations except when a bit of time has passed, like I previously did for label direction recalculations.
#296 Added per ontology node coloring, fixed up some of the recoloration methods. Made the css messier (needs cleaning along with main code). Want to get the gravity and label direction computations into web workers next, and finish with the overall coloration and look for a match to BioMixer.
#296 Made the graph resizable. Not quite perfect, and fails at small sizes, but can be tweaked later when we are embedding.
#296 Fixed tool tips; they were entirely hard coded :p Added potential fix for mutliple tool tips getting stuck open, but I couldn't replicate the problem, so Ic ouldn't fix it. Commented that stuff out.
#296 Fixed label interference with node hover, fixed popup interference with node drag. Uncommented code that should fix popups getting stuck, but it's hard to replciate, so I don't know if the fix works.
#296 Figured out complete way to prevent node label selections. Color, line thickness changes.