Skip to content

Instantly share code, notes, and snippets.

@natduca
Created April 16, 2015 23:54
Show Gist options
  • Save natduca/d525057fb1c0a70011cc to your computer and use it in GitHub Desktop.
Save natduca/d525057fb1c0a70011cc to your computer and use it in GitHub Desktop.
+ tv.e.audits.mergeEvents(
+ allLatencyEvents.map(function(event) {
+ return {start: event.start, end: event.start, event: event
+ },
+ 150,
+ function(eventsToMerge) {
+ var events = eventsToMerge.map(function(e) { return e.event; });
+
+ var e0 = events[0];
+ var colorId = tv.b.ui.getColorIdForGeneralPurposeString('mt_input');
+ var eN = events[events.length - 1];
+ var ir = new tv.c.trace_model.InteractionRecord(
+ title, colorId,
+ e0.start, eN.end - e0.start);
+ ir.events = events;
+ this.model.addInteractionRecord(ir)
+ });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment