OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview Interactive visualizaiton of TimelineModel objects | 6 * @fileoverview Interactive visualizaiton of TimelineModel objects |
7 * based loosely on gantt charts. Each thread in the TimelineModel is given a | 7 * based loosely on gantt charts. Each thread in the TimelineModel is given a |
8 * set of TimelineTracks, one per subrow in the thread. The Timeline class | 8 * set of TimelineTracks, one per subrow in the thread. The Timeline class |
9 * acts as a controller, creating the individual tracks, while TimelineTracks | 9 * acts as a controller, creating the individual tracks, while TimelineTracks |
10 * do actual drawing. | 10 * do actual drawing. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 */ | 112 */ |
113 dispatchChangeEvent: function() { | 113 dispatchChangeEvent: function() { |
114 cr.dispatchSimpleEvent(this, 'change'); | 114 cr.dispatchSimpleEvent(this, 'change'); |
115 }, | 115 }, |
116 | 116 |
117 detach: function() { | 117 detach: function() { |
118 if (this.checkForAttachInterval_) { | 118 if (this.checkForAttachInterval_) { |
119 window.clearInterval(this.checkForAttachInterval_); | 119 window.clearInterval(this.checkForAttachInterval_); |
120 this.checkForAttachInterval_ = undefined; | 120 this.checkForAttachInterval_ = undefined; |
121 } | 121 } |
122 this.iframe_.removeListener('resize', this.onResizeBoundToThis_); | 122 this.iframe_.removeEventListener('resize', this.onResizeBoundToThis_); |
123 this.parentEl_.removeChild(this.iframe_); | 123 this.parentEl_.removeChild(this.iframe_); |
124 }, | 124 }, |
125 | 125 |
126 get scaleX() { | 126 get scaleX() { |
127 return this.scaleX_; | 127 return this.scaleX_; |
128 }, | 128 }, |
129 set scaleX(s) { | 129 set scaleX(s) { |
130 var changed = this.scaleX_ != s; | 130 var changed = this.scaleX_ != s; |
131 if (changed) { | 131 if (changed) { |
132 this.scaleX_ = s; | 132 this.scaleX_ = s; |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 * The TimelineModel being viewed by the timeline | 723 * The TimelineModel being viewed by the timeline |
724 * @type {TimelineModel} | 724 * @type {TimelineModel} |
725 */ | 725 */ |
726 cr.defineProperty(Timeline, 'model', cr.PropertyKind.JS); | 726 cr.defineProperty(Timeline, 'model', cr.PropertyKind.JS); |
727 | 727 |
728 return { | 728 return { |
729 Timeline: Timeline, | 729 Timeline: Timeline, |
730 TimelineViewport: TimelineViewport | 730 TimelineViewport: TimelineViewport |
731 }; | 731 }; |
732 }); | 732 }); |
OLD | NEW |