Skip to content

Commit

Permalink
including panes config in viewer.js breaks application.
Browse files Browse the repository at this point in the history
this was introduced when Controller was split into separate mixins.
  • Loading branch information
tmcgee committed Apr 11, 2016
1 parent b6cceeb commit 7d1c51f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions viewer/js/viewer/_LayoutMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ define([
addTopics: function () {
// toggle a sidebar pane
topic.subscribe('viewer/togglePane', lang.hitch(this, function (args) {
this.toggleSidebar(args.pane, args.show);
this.togglePane(args.pane, args.show);
}));

// load a widget
Expand Down Expand Up @@ -160,12 +160,17 @@ define([
}
}
this.panes.outer.startup();
this.createPanes(panes);
},

createPanes: function (panes) {
var key;
// where to place the buttons
createPanes: function () {
var key,
panes = this.config.panes || {};
for (key in this.panes) {
if (this.panes.hasOwnProperty(key)) {
panes[key] = lang.mixin(this.panes[key], panes[key]);
}
}
// where to place the buttons
// either the center map pane or the outer pane?
this.collapseButtonsPane = this.config.collapseButtonsPane || 'outer';

Expand Down Expand Up @@ -204,6 +209,7 @@ define([
}
}

this.resizeLayout();
},

togglePane: function (id, show) {
Expand Down
2 changes: 1 addition & 1 deletion viewer/js/viewer/_MapMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ define([
});

// in _LayoutsMixin
this.resizeLayout();
this.createPanes();

// in _WidgetsMixin
this.initWidgets();
Expand Down

3 comments on commit 7d1c51f

@AlexAThomas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tim, this change seems to have prevented the creation of the toggle button that open/closes the side drawer.

Is there a change that should be made to the viewer.js file so that the panes on line 179 of _LayoutMixin can be collapsible?

@AlexAThomas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmcgee i've added a note but forgot to tag you

@tmcgee
Copy link
Member Author

@tmcgee tmcgee commented on 7d1c51f Apr 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fix that: https://github.com/cmv/cmv-app/blob/fix/floating-titlePane-IE-drag-again/viewer/js/viewer/_LayoutMixin.js#L152

(floating panes are still not fixed to my satisfaction- thus the name of that branch)

Please sign in to comment.