New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add universal preloader function #55
base: main
Are you sure you want to change the base?
Conversation
@@ -334,7 +376,18 @@ | |||
}) | |||
.onStepEnter(async response => { | |||
var chapter = config.chapters.find(chap => chap.id === response.element.id); | |||
var chapterid = chapter.id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is chapterid used?
|
||
// Code for preloader, app will not show an active map until underlying tilesets are fully loaded | ||
|
||
if (chapter.id != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whether or not chapter.id is null, opacity is set to 0
@@ -457,6 +510,18 @@ | |||
insetMap.getSource('boundsSource').setData(bounds); | |||
} | |||
|
|||
function customizeChapters(chap) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function is never called?
@pkfranz some questions in comments. also why is config.js.template renamed? |
@mikelmaron This should seamlessly work on any project, regardless of
chapter.id
naming conventions.Possible feature add: Adding it as an boolean variable in the array vs. always on?