Make sure sidebar is expanded before entering walkthrough or saving

(closes #5574)
This commit is contained in:
Bryan Housel
2018-12-08 10:03:43 -05:00
parent 49c53088c0
commit cbcafaee15
2 changed files with 8 additions and 2 deletions

View File

@@ -513,6 +513,9 @@ export function modeSave(context) {
mode.enter = function() {
// Show sidebar
context.ui().sidebar.expand();
function done() {
context.ui().sidebar.show(commit);
}

View File

@@ -75,6 +75,11 @@ export function uiIntro(context) {
var baseEntities = context.history().graph().base().entities;
var countryCode = services.geocoder.countryCode;
// Show sidebar and disable the sidebar resizing button
// (this needs to be before `context.inIntro(true)`)
context.ui().sidebar.expand();
d3_selectAll('button.sidebar-toggle').classed('disabled', true);
// Block saving
context.inIntro(true);
@@ -109,8 +114,6 @@ export function uiIntro(context) {
callback(null, t('intro.graph.countrycode'));
};
// Disable the sidebar resizing button
d3_selectAll('button.sidebar-toggle').classed('disabled', true);
d3_selectAll('#map .layer-background').style('opacity', 1);