Changeset 568 in tmcsimulator
- Timestamp:
- 01/24/2020 12:55:29 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/webapps/GTEC/js/vdsLayer.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/webapps/GTEC/js/vdsLayer.js
r567 r568 1 1 var postmileList = []; // the list of postmiles saved from the json file. 2 var chosenColor = null; // stores color that user picks2 var chosenColor = "yellow"; // stores color that user picks, initial default yellow 3 3 4 4 // function to find differences between two arrays … … 135 135 first[1] + " " + first[2] + " " + range.toFixed(3) + " " 136 136 + getColorAbbr(chosenColor); 137 console.log(lineOut); 137 138 138 139 // Using Ajax POST to send the data … … 188 189 { 189 190 console.log('wrong choice'); 191 clicked = !clicked; 190 192 } 191 193 clicked = !clicked; … … 306 308 map.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(yellowColor); 307 309 // store the user picked color in "chosenColor" 310 308 311 redColor.addEventListener('click', function() { 309 312 chosenColor = "red"; 313 redColor.style.background = "red"; 314 greenColor.style.background = "gray"; 315 yellowColor.style.background = "gray"; 316 310 317 }); 311 318 greenColor.addEventListener('click', function() { 312 319 chosenColor = "lime"; 320 greenColor.style.background = "green"; 321 redColor.style.background = "gray"; 322 yellowColor.style.background = "gray"; 313 323 }); 314 324 yellowColor.addEventListener('click', function(){ 315 325 chosenColor = "yellow"; 326 yellowColor.style.background = "yellow"; 327 redColor.style.background = "gray"; 328 greenColor.style.background = "gray"; 316 329 }); 317 330 }
Note: See TracChangeset
for help on using the changeset viewer.
