Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 7440fbd

Browse files
committed
Merge pull request #4804 from lkcampbell/fix-issue-4383
Fix for Issue #4383: Updated documentation on sidebar view events
2 parents 72b398d + 203d1d7 commit 7440fbd

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/project/SidebarView.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,17 @@
2626
/*global define, $, document, window, brackets */
2727

2828
/**
29-
* The view that controls the showing and hiding of the sidebar. Dispatches the following events:
30-
* hide -- when the sidebar is hidden
31-
* show -- when the sidebar is shown
29+
* The view that controls the showing and hiding of the sidebar.
30+
*
31+
* Although the sidebar view doesn't dispatch any events directly, it is a
32+
* resizable element (../utils/Resizer.js), which means it can dispatch Resizer
33+
* events. For example, if you want to listen for the sidebar showing
34+
* or hiding itself, set up listeners for the corresponding Resizer events,
35+
* panelCollapsed and panelExpanded:
36+
*
37+
* $("#sidebar").on("panelCollapsed", ...);
38+
* $("#sidebar").on("panelExpanded", ...);
39+
*
3240
*/
3341

3442
define(function (require, exports, module) {
@@ -162,8 +170,8 @@ define(function (require, exports, module) {
162170
CommandManager.register(Strings.CMD_HIDE_SIDEBAR, Commands.VIEW_HIDE_SIDEBAR, toggle);
163171

164172
// Define public API
165-
exports.toggle = toggle;
166-
exports.show = show;
167-
exports.hide = hide;
168-
exports.isVisible = isVisible;
173+
exports.toggle = toggle;
174+
exports.show = show;
175+
exports.hide = hide;
176+
exports.isVisible = isVisible;
169177
});

0 commit comments

Comments
 (0)