Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(53)

Unified Diff: trace_viewer/core/trace_model/counter.html

Issue 214100044: Added a [foreground line] + [background slice] mode to the counter UI. Base URL: https://github.com/google/trace-viewer@master
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | trace_viewer/core/tracks/counter_track.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trace_viewer/core/trace_model/counter.html
diff --git a/trace_viewer/core/trace_model/counter.html b/trace_viewer/core/trace_model/counter.html
index 5f0965825b10bc95a1012f7df33bf01ffb5d6d39..713d03ba3caf0eb52f8f499ec48e45805b6c6d3f 100644
--- a/trace_viewer/core/trace_model/counter.html
+++ b/trace_viewer/core/trace_model/counter.html
@@ -30,6 +30,7 @@ tv.exportTo('tv.c.trace_model', function() {
this.name = name;
this.series_ = [];
+ this.bgseries_ = undefined;
this.totals = [];
this.bounds = new tv.b.Range();
}
@@ -76,6 +77,16 @@ tv.exportTo('tv.c.trace_model', function() {
throw new Error('Bad counter API. No cookie.');
},
+ setBgSeries: function(series) {
+ series.counter = this;
+ this.bgseries_ = series;
+ return series;
+ },
+
+ get bgseries() {
+ return this.bgseries_;
+ },
+
addSeries: function(series) {
series.counter = this;
series.seriesIndex = this.series_.length;
@@ -136,6 +147,8 @@ tv.exportTo('tv.c.trace_model', function() {
shiftTimestampsForward: function(amount) {
for (var i = 0; i < this.series_.length; ++i)
this.series_[i].shiftTimestampsForward(amount);
+ if (this.bgseries_ !== undefined)
+ this.bgseries_.shiftTimestampsForward(amount);
},
/**
« no previous file with comments | « no previous file | trace_viewer/core/tracks/counter_track.html » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b