pgdad / canviz

Automatically exported from code.google.com/p/canviz
0 stars 0 forks source link

allow response to graph loaded #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently there is no way to execute a callback function when the graph has 
been loaded and parsed.  It is helpful if you want to display a loading icon 
and hide it when the graph is loaded.  Since the load function uses 
AJAX.Request any statements after canviz.load are executed directly without 
waiting for the load function to complete.

I have attached a diff output file that includes my fixes for this.  I added 
options to the canviz object as well as an event handler that manages 
callbacks.  Inside the load(AJAX.Request(onComplete())) I added a call to the 
event handler with an event named loaded.  

Not sure where else others might want to respond to the work the canviz is 
doing, but this will let you insert aribrtary event handlers as needed in the 
code.  Sorry if I didn't put this in the correct place.  

Original issue reported on code.google.com by nharmony...@gmail.com on 3 Nov 2010 at 6:10

Attachments: