Integrating Jit (Spacetree) into Laravel project (second post)

Skip to first unread message


Sep 21, 2019, 8:52:28 AM9/21/19
to JavaScript InfoVis Toolkit
I am experimenting with an integration of Jit examples into a Laravel project on Ubuntu. I find no discussion on Laravel in this forum. I deleted an earlier message and reposted because of a typing error.

I have got SpaceTree to partly render to the point where the left-container text and centre-container tree render. The tree can be dragged around in the centre-container but onclick on any node does not work. And there is no display of radio buttons or text in right-container. It is blank.

Inspecting Chrome browser using Developer Tools I see this error in console:

Uncaught TypeError: Cannot set property onchange on null
at init 
at onload 

From browsing a few threads in StackOverflow I gather that this hangup might be related to loading the DOM out of sequence. The script example1.js seems to hang at the very bottom, just here ...

top.onchange = left.onchange = bottom.onchange = right.onchange = changeHandler;

Any ideas to pursue? I can drop console.log points in example1.js.

Note: In getting the script to integrate into Laravel I have had to use this notation to access imported scripts placed in public/assets folder:

<link type="text/css" href="http://localhost:8001/assets/Jit/Examples/css/base.css" rel="stylesheet" />
<link type="text/css" href="http://localhost:8001/assets/Jit/Examples/css/ForceDirected.css" rel="stylesheet" />
<script language="javascript" type="text/javascript" src="http://localhost:8001/assets/Jit/jit.js"></script>
<script language="javascript" type="text/javascript" src="http://localhost:8001/assets/Jit/Examples/Spacetree/example1.js"></script>

Reply all
Reply to author
0 new messages