Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Unified Diff: Source/devtools/front_end/SplitView.js

Issue 71633003: DevTools: added "overlayContents" mode, where DevTools content is placed around and underneath inse… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No-op if no overlayContents Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
},
/**

Powered by Google App Engine
This is Rietveld 408576698