source: tmcsimulator/trunk/webapps/einotebook/cad/cad.js @ 415

Revision 415, 821 bytes checked in by jdalbey, 7 years ago (diff)

einotebook fix to #131

  • Property svn:executable set to *
Line 
1/**
2 * Setup the CAD screen.
3 */
4function setupCad()
5{
6  //updateCad();
7}
8
9var events;
10function loadScript(theEvents, theIncidents)
11{
12        events = theEvents;
13    updateCad();
14}
15
16/**
17 * Updates the current event tab.
18 */
19function updateCad()
20{
21    // Set timer to do this again in one second
22        setTimeout("updateCad()", 1000);
23   
24    var currentEvent = events.getLastExecutedEvent(readCookie("time"));
25    //console.log("length " + currentEvent.length);
26    // Show current event to Current Event Window
27    var currDiv = document.getElementById("cadpadcontent");
28    // empty holder for display current events
29    var display = "";
30    var evt;
31   
32    // get all the current events
33    for (evt=0; evt<currentEvent.length; evt++) {
34        display += currentEvent[evt].html();
35    }
36
37    currDiv.innerHTML = display;
38}
Note: See TracBrowser for help on using the repository browser.