Skip to content

Commit

Permalink
Merge pull request #58 from le717/split-view
Browse files Browse the repository at this point in the history
Fix Deprecation Warnings
  • Loading branch information
gruehle committed Oct 10, 2014
2 parents e8a8719 + b73ff3a commit 3ecb32a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ define(function (require, exports, module) {
EditorManager = brackets.getModule("editor/EditorManager"),
ExtensionUtils = brackets.getModule("utils/ExtensionUtils"),
FileUtils = brackets.getModule("file/FileUtils"),
PanelManager = brackets.getModule("view/PanelManager"),
WorkspaceManager = brackets.getModule("view/WorkspaceManager"),
PopUpManager = brackets.getModule("widgets/PopUpManager"),
PreferencesManager = brackets.getModule("preferences/PreferencesManager"),
Resizer = brackets.getModule("utils/Resizer"),
StringUtils = brackets.getModule("utils/StringUtils"),
MainViewManager = brackets.getModule("view/MainViewManager"),
_ = brackets.getModule("thirdparty/lodash");

// Templates
Expand Down Expand Up @@ -250,7 +251,7 @@ define(function (require, exports, module) {
$panel = $(panelHTML);
$iframe = $panel.find("#panel-markdown-preview-frame");

panel = PanelManager.createBottomPanel("markdown-preview-panel", $panel);
panel = WorkspaceManager.createBottomPanel("markdown-preview-panel", $panel);
$panel.on("panelResizeUpdate", function (e, newSize) {
$iframe.attr("height", newSize);
});
Expand Down Expand Up @@ -335,7 +336,7 @@ define(function (require, exports, module) {
.appendTo($("#main-toolbar .buttons"));

// Add a document change handler
$(DocumentManager).on("currentDocumentChange", _currentDocChangedHandler);
$(MainViewManager).on("currentFileChange", _currentDocChangedHandler);

// currentDocumentChange is *not* called for the initial document. Use
// appReady() to set initial state.
Expand All @@ -344,6 +345,6 @@ define(function (require, exports, module) {
});

// Listen for resize events
$(PanelManager).on("editorAreaResize", _resizeIframe);
$(MainViewManager).on("workspaceUpdateLayout", _resizeIframe);
$("#sidebar").on("panelCollapsed panelExpanded panelResizeUpdate", _resizeIframe);
});

0 comments on commit 3ecb32a

Please sign in to comment.