Skip to content

Commit

Permalink
correctly initialize story even if welcome is hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
thejohnhoffer committed Nov 19, 2021
1 parent 0234036 commit 8481188
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build": "webpack --mode production"
},
"name": "minerva-browser",
"version": "3.2.3",
"version": "3.2.4",
"description": "A storytelling interface atop openseadragon",
"main": "index.js",
"repository": {
Expand Down
26 changes: 14 additions & 12 deletions state.js
Original file line number Diff line number Diff line change
Expand Up @@ -929,19 +929,21 @@ HashState.prototype = {
window.onpopstate();
}
// Show welcome page if no hash present
else if (this.isMissingHash && !this.hideWelcome) {
this.s = 0;
const welcome = $(this.el).find('.minerva-welcome_modal');
if (!this.customWelcome) {
const channel_count = welcome.find('.minerva-channel_count')[0];
channel_count.innerText = this.channels.length;
}
else {
const welcome_body = welcome.find('.modal-body')[0];
welcome_body.innerHTML = this.customWelcome;
else if (this.isMissingHash) {
if (!this.hideWelcome) {
const welcome = $(this.el).find('.minerva-welcome_modal');
if (!this.customWelcome) {
const channel_count = welcome.find('.minerva-channel_count')[0];
channel_count.innerText = this.channels.length;
}
else {
const welcome_body = welcome.find('.modal-body')[0];
welcome_body.innerHTML = this.customWelcome;
}
welcome.modal('show');
}
welcome.modal('show');

// Set default story even if welcome hidden
this.s = 0;
this.pushState();
window.onpopstate();
}
Expand Down

0 comments on commit 8481188

Please sign in to comment.