Chromium Code Reviews| Index: Source/devtools/front_end/SplitView.js |
| diff --git a/Source/devtools/front_end/SplitView.js b/Source/devtools/front_end/SplitView.js |
| index ff02030631236ef3a15abc39cf09041d101991b2..78f69f5dacf56aca428622d63c18e7429bffc5de 100644 |
| --- a/Source/devtools/front_end/SplitView.js |
| +++ b/Source/devtools/front_end/SplitView.js |
| @@ -47,6 +47,7 @@ WebInspector.SplitView = function(isVertical, sidebarSizeSettingName, defaultSid |
| this._secondElement = this.element.createChild("div", "split-view-contents scroll-target split-view-contents-second"); |
| this._resizerElement = this.element.createChild("div", "split-view-resizer"); |
| + this._onDragStartBound = this._onDragStart.bind(this); |
| this.installResizer(this._resizerElement); |
| this._resizable = true; |
| @@ -64,6 +65,10 @@ WebInspector.SplitView = function(isVertical, sidebarSizeSettingName, defaultSid |
| this._innerSetVertical(isVertical); |
| } |
| +WebInspector.SplitView.Events = { |
|
pfeldman
2013/12/05 15:44:06
rollback
dgozman
2013/12/06 16:17:13
Done.
|
| + LayoutChanged: "LayoutChanged" |
| +}; |
| + |
| WebInspector.SplitView.prototype = { |
| /** |
| * @return {boolean} |
| @@ -308,6 +313,8 @@ WebInspector.SplitView.prototype = { |
| this._sidebarSize = size; |
| + this.dispatchEventToListeners(WebInspector.SplitView.Events.LayoutChanged); |
| + |
| // No need to recalculate this._sidebarSize and this._totalSize again. |
| this._muteOnResize = true; |
| this.doResize(); |
| @@ -442,7 +449,15 @@ WebInspector.SplitView.prototype = { |
| */ |
| installResizer: function(resizerElement) |
| { |
| - resizerElement.addEventListener("mousedown", this._onDragStart.bind(this), false); |
| + resizerElement.addEventListener("mousedown", this._onDragStartBound, false); |
| + }, |
| + |
| + /** |
| + * @param {Element} resizerElement |
| + */ |
| + uninstallResizer: function(resizerElement) |
| + { |
| + resizerElement.removeEventListener("mousedown", this._onDragStartBound, false); |
| }, |
| /** |