allow response to graph loaded

#65 · open · 0 comments

View on GitHub ↗

GoogleCodeExporter

``` 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 `[email protected]` on 3 Nov 2010 at 6:10 Attachments: - [canviz.txt](https://storage.googleapis.com/google-code-attachments/canviz/issue-65/comment-0/canviz.txt)

Comments