wiki:TanmayTasks

Version 10 (modified by jdalbey, 6 years ago) (diff)

add item 5.

Tanmay Tasks

Estimated time in parentheses.

Graphic traffic events creator.

  1. Add 3 color buttons (2)
  1. On second click, change remaining dots to current color. (1.5)
  1. Assemble one line of traffic file. (2)
  1. Have buttons change to named color when clicked. Turn off when another button clicked. Initially, have Yellow button active (avoids having "undefined" appear in output file).  See attached color button html demo. (1)
  1. Have the program automatically increment the time by 30 seconds for each line of output. The following code should do the trick. It just needs to be inserted into the appropriate spot in vdsLayer. (0.5)
    // Initialize the current time to zero
    var currentTime = new Date(0);
    currentTime.setHours(0);
    currentTime.setMinutes(0);
    currentTime.setSeconds(0);
    
    // Increment the time by one-half minute (30 seconds)
    var millisecs = currentTime.getTime();
    millisecs += 30000;  
    var currentTime = new Date(millisecs)
    
    // Create a printable string for the time (HH:MM:SS)
    var printableTime = currentTime.toLocaleTimeString('it-IT')
    

Attachments