OLD | NEW |
1 /** | 1 /** |
2 * Navigation coordinates the <plot-sk>, <query-sk>, and <trace-details-sk> | 2 * Navigation coordinates the <plot-sk>, <query-sk>, and <trace-details-sk> |
3 * elements on that main page of skiaperf. | 3 * elements on that main page of skiaperf. |
4 * | 4 * |
5 */ | 5 */ |
6 var skiaperf = (function() { | 6 var skiaperf = (function() { |
7 "use strict"; | 7 "use strict"; |
8 | 8 |
9 /** | 9 /** |
10 * Notifies the user. | 10 * Notifies the user. |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 $$$('plot-sk').remove(e.detail.id); | 165 $$$('plot-sk').remove(e.detail.id); |
166 }); | 166 }); |
167 | 167 |
168 $$$('#reset-axes').addEventListener('click', function(e) { | 168 $$$('#reset-axes').addEventListener('click', function(e) { |
169 $$$('plot-sk').resetAxes(); | 169 $$$('plot-sk').resetAxes(); |
170 }); | 170 }); |
171 | 171 |
172 // Load the commit data and set up the plot. | 172 // Load the commit data and set up the plot. |
173 sk.get('/tiles/0/-1/').then(JSON.parse).then(function(json){ | 173 sk.get('/tiles/0/-1/').then(JSON.parse).then(function(json){ |
174 that.commitData_ = json.commits; | 174 that.commitData_ = json.commits; |
| 175 $$$('query-sk').setParamSet(json.paramset); |
175 if (window.location.hash.length >= 2) { | 176 if (window.location.hash.length >= 2) { |
176 that.addTraces("__shortcut=" + window.location.hash.substr(1)) | 177 that.addTraces("__shortcut=" + window.location.hash.substr(1)) |
177 } | 178 } |
178 | 179 |
179 var skps = [0].concat(json.skps, [that.commitData_.length-1]); | 180 var skps = [0].concat(json.skps, [that.commitData_.length-1]); |
180 $$$('plot-sk').setBackgroundInfo(json.ticks, skps, that.lastCommitIndex())
; | 181 $$$('plot-sk').setBackgroundInfo(json.ticks, skps, that.lastCommitIndex())
; |
181 }); | 182 }); |
182 | 183 |
183 }; | 184 }; |
184 | 185 |
185 function onLoad() { | 186 function onLoad() { |
186 var navigation = new Navigation(); | 187 var navigation = new Navigation(); |
187 navigation.attach(); | 188 navigation.attach(); |
188 } | 189 } |
189 | 190 |
190 // If loaded via HTML Imports then DOMContentLoaded will be long done. | 191 // If loaded via HTML Imports then DOMContentLoaded will be long done. |
191 if (document.readyState != 'loading') { | 192 if (document.readyState != 'loading') { |
192 onLoad(); | 193 onLoad(); |
193 } else { | 194 } else { |
194 window.addEventListener('load', onLoad); | 195 window.addEventListener('load', onLoad); |
195 } | 196 } |
196 | 197 |
197 }()); | 198 }()); |
OLD | NEW |