| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 <link rel="stylesheet" href="/tracing/ui/tracks/track.css"> | 7 <link rel="stylesheet" href="/tracing/ui/tracks/track.css"> |
| 8 | 8 |
| 9 <link rel="import" href="/tracing/ui/base/container_that_decorates_its_children.
html"> | 9 <link rel="import" href="/tracing/ui/base/container_that_decorates_its_children.
html"> |
| 10 <link rel="import" href="/tracing/ui/base/ui.html"> | 10 <link rel="import" href="/tracing/ui/base/ui.html"> |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 * @param {number} loY Lower Y bound of the search interval in view space. | 139 * @param {number} loY Lower Y bound of the search interval in view space. |
| 140 * @param {number} hiY Upper Y bound of the search interval in view space. | 140 * @param {number} hiY Upper Y bound of the search interval in view space. |
| 141 * @param {Selection} selection Selection to which to add hits. | 141 * @param {Selection} selection Selection to which to add hits. |
| 142 */ | 142 */ |
| 143 addClosestEventToSelection: function( | 143 addClosestEventToSelection: function( |
| 144 worldX, worldMaxDist, loY, hiY, selection) { | 144 worldX, worldMaxDist, loY, hiY, selection) { |
| 145 }, | 145 }, |
| 146 | 146 |
| 147 addClosestInstantEventToSelection: function(instantEvents, worldX, | 147 addClosestInstantEventToSelection: function(instantEvents, worldX, |
| 148 worldMaxDist, selection) { | 148 worldMaxDist, selection) { |
| 149 var instantEvent = tr.b.findClosestElementInSortedArray( | 149 var instantEvent = tr.b.math.findClosestElementInSortedArray( |
| 150 instantEvents, | 150 instantEvents, |
| 151 function(x) { return x.start; }, | 151 function(x) { return x.start; }, |
| 152 worldX, | 152 worldX, |
| 153 worldMaxDist); | 153 worldMaxDist); |
| 154 | 154 |
| 155 if (!instantEvent) | 155 if (!instantEvent) |
| 156 return; | 156 return; |
| 157 | 157 |
| 158 selection.push(instantEvent); | 158 selection.push(instantEvent); |
| 159 } | 159 } |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 return { | 162 return { |
| 163 Track, | 163 Track, |
| 164 }; | 164 }; |
| 165 }); | 165 }); |
| 166 </script> | 166 </script> |
| OLD | NEW |