From fabaa6bfb90f3d18a1274635e8cd7b32c5b7857a Mon Sep 17 00:00:00 2001 From: Oskar Karlsson Date: Tue, 1 Oct 2013 14:36:36 +0200 Subject: [PATCH 1/5] Gave searchPanel a min height --- src/search/FindInFiles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/FindInFiles.js b/src/search/FindInFiles.js index d563543b07d..2155a9a6cf9 100644 --- a/src/search/FindInFiles.js +++ b/src/search/FindInFiles.js @@ -848,7 +848,7 @@ define(function (require, exports, module) { // Initialize items dependent on HTML DOM AppInit.htmlReady(function () { var panelHtml = Mustache.render(searchPanelTemplate, Strings); - searchResultsPanel = PanelManager.createBottomPanel("find-in-files.results", $(panelHtml)); + searchResultsPanel = PanelManager.createBottomPanel("find-in-files.results", $(panelHtml), 100); $searchResults = $("#search-results"); $searchSummary = $searchResults.find(".title"); From 429ae863e9c58603b47cbe8896e5742cfd4b8cc7 Mon Sep 17 00:00:00 2001 From: Oskar Karlsson Date: Wed, 2 Oct 2013 21:19:25 +0200 Subject: [PATCH 2/5] Changed default minSize from 0 to 100 for Resizer.makeResizable() --- src/utils/Resizer.js | 9 ++++++--- src/view/PanelManager.js | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/utils/Resizer.js b/src/utils/Resizer.js index c97f7d38748..9cba4a57f22 100644 --- a/src/utils/Resizer.js +++ b/src/utils/Resizer.js @@ -139,7 +139,7 @@ define(function (require, exports, module) { * @param {!string} position Which side of the element can be dragged: one of the POSITION_* constants * (TOP/BOTTOM for vertical resizing or LEFT/RIGHT for horizontal). * @param {?number} minSize Minimum size (width or height) of the element's outer dimensions, including - * border & padding. Defaults to 0. + * border & padding. Defaults to 100. * @param {?boolean} collapsible Indicates the panel is collapsible on double click on the * resizer. Defaults to false. * @param {?string} forceLeft CSS selector indicating element whose 'left' should be locked to the @@ -162,8 +162,11 @@ define(function (require, exports, module) { elementSizeFunction = direction === DIRECTION_HORIZONTAL ? $element.width : $element.height, resizerCSSPosition = direction === DIRECTION_HORIZONTAL ? "left" : "top", contentSizeFunction = direction === DIRECTION_HORIZONTAL ? $resizableElement.width : $resizableElement.height; - - minSize = minSize || 0; + + if (minSize === undefined) { + minSize = DEFAULT_MIN_SIZE; + } + collapsible = collapsible || false; $element.prepend($resizer); diff --git a/src/view/PanelManager.js b/src/view/PanelManager.js index 42cd694f670..43326bc4fa1 100644 --- a/src/view/PanelManager.js +++ b/src/view/PanelManager.js @@ -150,7 +150,7 @@ define(function (require, exports, module) { * Represents a panel below the editor area (a child of ".content"). * * @param {!jQueryObject} $panel The entire panel, including any chrome, already in the DOM. - * @param {number=} minSize Minimum height of panel in px; default is 0 + * @param {number=} minSize Minimum height of panel in px; default is 100 */ function Panel($panel, minSize) { this.$panel = $panel; @@ -187,7 +187,7 @@ define(function (require, exports, module) { * * @param {!string} id Unique id for this panel. Use package-style naming, e.g. "myextension.feature.panelname" * @param {!jQueryObject} $panel DOM content to use as the panel. Need not be in the document yet. - * @param {number=} minSize Minimum height of panel in px; default is 0 + * @param {number=} minSize Minimum height of panel in px; default is 100 * @return {!Panel} */ function createBottomPanel(id, $panel, minSize) { From 4e2ff4558f926f458f973f76260e507ec6f870ec Mon Sep 17 00:00:00 2001 From: Oskar Karlsson Date: Thu, 3 Oct 2013 21:42:18 +0200 Subject: [PATCH 3/5] Changed comments that are related to minSize for creating panels --- src/utils/Resizer.js | 2 +- src/view/PanelManager.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/Resizer.js b/src/utils/Resizer.js index 9cba4a57f22..c4a1966f178 100644 --- a/src/utils/Resizer.js +++ b/src/utils/Resizer.js @@ -139,7 +139,7 @@ define(function (require, exports, module) { * @param {!string} position Which side of the element can be dragged: one of the POSITION_* constants * (TOP/BOTTOM for vertical resizing or LEFT/RIGHT for horizontal). * @param {?number} minSize Minimum size (width or height) of the element's outer dimensions, including - * border & padding. Defaults to 100. + * border & padding. Defaults to DEFAULT_MIN_SIZE. * @param {?boolean} collapsible Indicates the panel is collapsible on double click on the * resizer. Defaults to false. * @param {?string} forceLeft CSS selector indicating element whose 'left' should be locked to the diff --git a/src/view/PanelManager.js b/src/view/PanelManager.js index 43326bc4fa1..e558cae02b7 100644 --- a/src/view/PanelManager.js +++ b/src/view/PanelManager.js @@ -150,7 +150,7 @@ define(function (require, exports, module) { * Represents a panel below the editor area (a child of ".content"). * * @param {!jQueryObject} $panel The entire panel, including any chrome, already in the DOM. - * @param {number=} minSize Minimum height of panel in px; default is 100 + * @param {number=} minSize Minimum height of panel in px; default is DEFAULT_MIN_SIZE */ function Panel($panel, minSize) { this.$panel = $panel; @@ -187,7 +187,7 @@ define(function (require, exports, module) { * * @param {!string} id Unique id for this panel. Use package-style naming, e.g. "myextension.feature.panelname" * @param {!jQueryObject} $panel DOM content to use as the panel. Need not be in the document yet. - * @param {number=} minSize Minimum height of panel in px; default is 100 + * @param {number=} minSize Minimum height of panel in px; default is DEFAULT_MIN_SIZE * @return {!Panel} */ function createBottomPanel(id, $panel, minSize) { From f2bd6b2498006428acfa76dbc526755e03d5bdd8 Mon Sep 17 00:00:00 2001 From: Oskar Karlsson Date: Thu, 3 Oct 2013 22:48:20 +0200 Subject: [PATCH 4/5] Modified comment --- src/view/PanelManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/PanelManager.js b/src/view/PanelManager.js index e558cae02b7..1241d0f287a 100644 --- a/src/view/PanelManager.js +++ b/src/view/PanelManager.js @@ -187,7 +187,7 @@ define(function (require, exports, module) { * * @param {!string} id Unique id for this panel. Use package-style naming, e.g. "myextension.feature.panelname" * @param {!jQueryObject} $panel DOM content to use as the panel. Need not be in the document yet. - * @param {number=} minSize Minimum height of panel in px; default is DEFAULT_MIN_SIZE + * @param {number=} minSize Minimum height of panel in px. * @return {!Panel} */ function createBottomPanel(id, $panel, minSize) { From 5aff26817ea2cb02508fbb374e2013424c63c764 Mon Sep 17 00:00:00 2001 From: Oskar Karlsson Date: Thu, 3 Oct 2013 22:52:02 +0200 Subject: [PATCH 5/5] Missed one comment --- src/view/PanelManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/PanelManager.js b/src/view/PanelManager.js index 1241d0f287a..fcb27758d0f 100644 --- a/src/view/PanelManager.js +++ b/src/view/PanelManager.js @@ -150,7 +150,7 @@ define(function (require, exports, module) { * Represents a panel below the editor area (a child of ".content"). * * @param {!jQueryObject} $panel The entire panel, including any chrome, already in the DOM. - * @param {number=} minSize Minimum height of panel in px; default is DEFAULT_MIN_SIZE + * @param {number=} minSize Minimum height of panel in px. */ function Panel($panel, minSize) { this.$panel = $panel;