wierd js / canvas issue - code example doesn't work locally

Go To StackoverFlow.com

0

Here is the best js graph drawing thing - http://thejit.org/static/v20/Jit/Examples/Other/example2.html

It is so impressive, that I wanted to play with it a bit, but after downloading all the files, it isn't working.

So I did put this html (with all other files) page on web server (jetty) but still no result:

http://i40.tinypic.com/35lhlxd.png

Opening file with Chrome, with properly added --allow-file-access-from-file doesn't fix the issue either

Obviously I am doing something wrong, but I have no idea what, so I will be very grateful for any input.

2012-04-03 19:36
by dantuch
Please state exactly what isn't working - Andrew Morton 2012-04-03 19:41
Please compare example to screen attached by me, and it will be obvious. Looks like nothing is working as it should - nodes are not drawn properly and there isn't any response to mouseclicks with movements of node - dantuch 2012-04-03 19:44
A first step would be to look for any errors in the JavaScript console. I'm not familiar with Chrome, but it looks like this could be a starting point: http://code.google.com/chrome/devtools/docs/console.htm - Andrew Morton 2012-04-03 19:51
Are you seeing any errors in your browser's debug console - Brant Olsen 2012-04-03 19:52
@Brant, I was missing 2 .png files that were mentioned in css, so I have added them, and now I see no errors in console, but still there's no improvement in whole behaviour - graph isn't drawn and it's static only - dantuch 2012-04-03 20:06
@Andrew I have fixed all the errors in console, but it didn't help anyhow. This proves that .css' and.jsfiles are placed properly. (simple alert from linked js file works good, even from the end ofinit()` method - dantuch 2012-04-03 20:11


0

Somehow html file provided in .zip download from download page is different than html file downloaded directly from online example page (this one uses obfuscated (sic!) javascript file named jit-yc.js in place of 'normal' and WELL DOCUMENTED jit.js:) ).

So, if anyone would like to try JIT (there ins't much competition in good graph drawing tools - http://arborjs.org/ seems the only one)- using official download link is the only valid way ;)

2012-04-04 09:03
by dantuch