OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2012 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="import" href="/tracing/base/event.html"> | 8 <link rel="import" href="/tracing/base/event.html"> |
9 <link rel="import" href="/tracing/base/iteration_helpers.html"> | 9 <link rel="import" href="/tracing/base/iteration_helpers.html"> |
10 <link rel="import" href="/tracing/base/settings.html"> | 10 <link rel="import" href="/tracing/base/settings.html"> |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 vp.queueDisplayTransformAnimation(animation); | 647 vp.queueDisplayTransformAnimation(animation); |
648 } else { | 648 } else { |
649 this.displayTransform_.set(vp.currentDisplayTransform); | 649 this.displayTransform_.set(vp.currentDisplayTransform); |
650 this.displayTransform_.scaleX *= scale; | 650 this.displayTransform_.scaleX *= scale; |
651 this.displayTransform_.xPanWorldPosToViewPos( | 651 this.displayTransform_.xPanWorldPosToViewPos( |
652 goalFocalPointXWorld, goalFocalPointXView, this.viewWidth_); | 652 goalFocalPointXWorld, goalFocalPointXView, this.viewWidth_); |
653 vp.setDisplayTransformImmediately(this.displayTransform_); | 653 vp.setDisplayTransformImmediately(this.displayTransform_); |
654 } | 654 } |
655 }, | 655 }, |
656 | 656 |
657 selectPowerSamplesInCurrentTimeRange_: function() { | |
658 var selectionBounds = this.brushingStateController_.selection.bounds; | |
659 if (this.model.device.powerSeries && !selectionBounds.empty) { | |
660 var events = this.model.device.powerSeries.getSamplesWithinRange( | |
661 selectionBounds.min, selectionBounds.max); | |
662 var selection = new tr.model.EventSet(events); | |
663 this.brushingStateController_.changeSelectionFromTimeline(selection); | |
664 } | |
665 }, | |
666 | |
667 /** | 657 /** |
668 * Zoom into the current selection. | 658 * Zoom into the current selection. |
669 */ | 659 */ |
670 zoomToSelection: function() { | 660 zoomToSelection: function() { |
671 if (!this.brushingStateController.selectionOfInterest.length) | 661 if (!this.brushingStateController.selectionOfInterest.length) |
672 return; | 662 return; |
673 | 663 |
674 var bounds = this.brushingStateController.selectionOfInterest.bounds; | 664 var bounds = this.brushingStateController.selectionOfInterest.bounds; |
675 if (!bounds.range) | 665 if (!bounds.range) |
676 return; | 666 return; |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 Polymer.dom(this.$.hint_text).textContent = text; | 1142 Polymer.dom(this.$.hint_text).textContent = text; |
1153 this.$.hint_text.style.display = ''; | 1143 this.$.hint_text.style.display = ''; |
1154 }, | 1144 }, |
1155 | 1145 |
1156 hideHintText_: function() { | 1146 hideHintText_: function() { |
1157 this.pendingHintTextClearTimeout_ = undefined; | 1147 this.pendingHintTextClearTimeout_ = undefined; |
1158 this.$.hint_text.style.display = 'none'; | 1148 this.$.hint_text.style.display = 'none'; |
1159 } | 1149 } |
1160 }); | 1150 }); |
1161 </script> | 1151 </script> |
OLD | NEW |