Changeset 401 in tmcsimulator for trunk/webapps/einotebook/script/script.js
- Timestamp:
- 05/15/2019 06:07:22 AM (7 years ago)
- File:
-
- 1 edited
-
trunk/webapps/einotebook/script/script.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/webapps/einotebook/script/script.js
r359 r401 51 51 52 52 // IF there was previously a current event THEN 53 if (highlightLatestEvent.oldEvent.id != Event.invalidID )53 if (highlightLatestEvent.oldEvent.id != Event.invalidID && currentEvent.id != 0) 54 54 { 55 55 highlightLatestEvent.oldEvent.unhighlight(); … … 64 64 } 65 65 66 67 /** Change color of text of expired events so they appear disabled. 68 * @param events The list of events 69 * @param currEvent The current event 70 */ 71 function greyOldEvents(events, currEvent) 72 { 73 // Examine all events 74 for (var evtNum = 0; evtNum < events.length; evtNum++) 75 { 76 // Change color of those before current time and Event 77 if (events[evtNum].time.compareTo(currEvent.time) < 0 && currEvent.id != events[evtNum].id) 78 { 79 events[evtNum].unhighlight(); 80 } 81 } 82 } 83 66 84 /** 67 85 * Loads the the script tab for the given document. … … 83 101 // add the Event's html 84 102 html += Script.events[i].html(); 85 //console.log(Script.events[i].html()); 86 } 103 } 104 87 105 88 106 // display events in iframe … … 97 115 Script.events.win.scrollTo(0, readCookie('scriptScrollY')); 98 116 117 greyOldEvents(Script.events, Script.events.getLastExecutedEvent(readCookie("time"))); 99 118 highlightLatestEvent(); 100 119
Note: See TracChangeset
for help on using the changeset viewer.
