Changeset 162528 in webkit


Ignore:
Timestamp:
Jan 22, 2014 9:54:32 AM (10 years ago)
Author:
timothy@apple.com
Message:

Remember the Timeline Overview zoom and selection between sessions.

https://bugs.webkit.org/show_bug.cgi?id=127369

Reviewed by Joseph Pecoraro.

  • UserInterface/TimelineOverview.js:

(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype.set secondsPerPixel):
(WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r162527 r162528  
     12014-01-21  Timothy Hatcher  <timothy@apple.com>
     2
     3        Remember the Timeline Overview zoom and selection between sessions.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=127369
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * UserInterface/TimelineOverview.js:
     10        (WebInspector.TimelineOverview):
     11        (WebInspector.TimelineOverview.prototype.set secondsPerPixel):
     12        (WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged):
     13
    1142014-01-21  Timothy Hatcher  <timothy@apple.com>
    215
  • trunk/Source/WebInspectorUI/UserInterface/TimelineOverview.js

    r162419 r162528  
    5959    this._scrollContainer.appendChild(this._scrollWidthSizer);
    6060
     61    this._secondsPerPixelSetting = new WebInspector.Setting("timeline-overview-seconds-per-pixel", 0.01);
     62    this._selectionStartTimeSetting = new WebInspector.Setting("timeline-overview-selection-start-time", 0);
     63    this._selectionDurationSetting = new WebInspector.Setting("timeline-overview-selection-duration", 5);
     64
    6165    this._startTime = 0;
    6266    this._currentTime = 0;
    6367    this._endTime = 0;
    64     this._secondsPerPixel = 0.0025;
     68    this._secondsPerPixel = this._secondsPerPixelSetting.value;
    6569    this._scrollStartTime = 0;
    6670
    67     this.selectionStartTime = 0;
    68     this.selectionDuration = 3;
     71    this.selectionStartTime = this._selectionStartTimeSetting.value;
     72    this.selectionDuration = this._selectionDurationSetting.value;
    6973};
    7074
     
    135139
    136140        this._secondsPerPixel = x;
     141        this._secondsPerPixelSetting.value = x;
    137142
    138143        this._needsLayout();
     
    334339    _timeRangeSelectionChanged: function(event)
    335340    {
     341        this._selectionStartTimeSetting.value = this.selectionStartTime - this._startTime;
     342        this._selectionDurationSetting.value = this.selectionDuration;
     343
    336344        this.dispatchEventToListeners(WebInspector.TimelineOverview.Event.TimeRangeSelectionChanged);
    337345    }
Note: See TracChangeset for help on using the changeset viewer.