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 | 7 |
8 <link rel="stylesheet" | 8 <link rel="stylesheet" |
9 href="/tracing/ui/extras/chrome/cc/picture_ops_chart_summary_view.css"> | 9 href="/tracing/ui/extras/chrome/cc/picture_ops_chart_summary_view.css"> |
10 | 10 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 var chartLeft = CHART_PADDING_LEFT; | 111 var chartLeft = CHART_PADDING_LEFT; |
112 var chartRight = this.chartWidth_ - CHART_PADDING_RIGHT; | 112 var chartRight = this.chartWidth_ - CHART_PADDING_RIGHT; |
113 var chartTop = AXIS_PADDING_TOP; | 113 var chartTop = AXIS_PADDING_TOP; |
114 var chartBottom = this.chartHeight_ - AXIS_PADDING_BOTTOM; | 114 var chartBottom = this.chartHeight_ - AXIS_PADDING_BOTTOM; |
115 var chartInnerWidth = chartRight - chartLeft; | 115 var chartInnerWidth = chartRight - chartLeft; |
116 | 116 |
117 if (x > chartLeft && x < chartRight && y > chartTop && y < chartBottom) { | 117 if (x > chartLeft && x < chartRight && y > chartTop && y < chartBottom) { |
118 this.currentBarMouseOverTarget_ = Math.floor( | 118 this.currentBarMouseOverTarget_ = Math.floor( |
119 (x - chartLeft) / chartInnerWidth * this.opsTimingData_.length); | 119 (x - chartLeft) / chartInnerWidth * this.opsTimingData_.length); |
120 | 120 |
121 this.currentBarMouseOverTarget_ = tr.b.clamp( | 121 this.currentBarMouseOverTarget_ = tr.b.math.clamp( |
122 this.currentBarMouseOverTarget_, 0, this.opsTimingData_.length - 1); | 122 this.currentBarMouseOverTarget_, 0, this.opsTimingData_.length - 1); |
123 } | 123 } |
124 | 124 |
125 if (this.currentBarMouseOverTarget_ === lastBarMouseOverTarget) | 125 if (this.currentBarMouseOverTarget_ === lastBarMouseOverTarget) |
126 return; | 126 return; |
127 | 127 |
128 this.drawChartContents_(); | 128 this.drawChartContents_(); |
129 }, | 129 }, |
130 | 130 |
131 updateChartContents: function() { | 131 updateChartContents: function() { |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 resetOpsTimingData_: function() { | 442 resetOpsTimingData_: function() { |
443 this.opsTimingData_.length = 0; | 443 this.opsTimingData_.length = 0; |
444 } | 444 } |
445 }; | 445 }; |
446 | 446 |
447 return { | 447 return { |
448 PictureOpsChartSummaryView, | 448 PictureOpsChartSummaryView, |
449 }; | 449 }; |
450 }); | 450 }); |
451 </script> | 451 </script> |
OLD | NEW |