"use strict"; (function () { ///////////////// // Begin scoping function // Dec 05, 2022 ///////////////////////////////////////////// let localJourneyMember; let localJourneyMemberData; MemberStack.onReady.then(async function (member) { // Assign the logged-in member to our localMember mixing mediums/journey variable localJourneyMember = member; localJourneyMemberData = await member.getMetaData(); // Hide all animated Paths(navy blue) const animPaths = document.querySelectorAll('[id$="-anim"]'); for (let i = 0; i < animPaths.length; i++) { animPaths[i].style.visibility = "hidden"; } //journeyAnimation(); }); ///////////////////////////////////////////// //const journeyAnimation = function () { window.onload = function () { let lastActivityCompleted, nextActivity, islandPath, lastIsland, island, placement; let activitiesCompleted = localJourneyMemberData.activitiesCompleted; let activitiesIsInprogress = localJourneyMemberData.activitiesInprogress; const journeyCompletedPath = [ "understandingPurpose", "valueYouBring", "sharingStrengths", "interestMapping", "curiosityWalkabout", "journeyMapping", "inspirationAudit", "shapingSelf", "findingFocus", "goodQuestions", "interestInspiration", "projectPlanning", "motivationMoments", "freshPerspectives", "learningToAdapt", "designingImpact", "growingYourImpact", "buildingYourTeam", "mixingMediums", "draftYourNarrative", "sharedExperiences", ]; // Label the last activity for the journey Path(21 main activities) let lastActivity = ""; for (let i = 0; i < journeyCompletedPath.length; i++) { if ( activitiesCompleted.includes(journeyCompletedPath[i]) && activitiesIsInprogress.includes(journeyCompletedPath[i]) ) { lastActivity = journeyCompletedPath[i]; } else { //console.log(lastActivity); break; } } // Show animation for the last activity for the journey Path(21 main activities) //............................................................................. //......... // 1A. understandingPurpose activity - In Progress if ( activitiesIsInprogress.includes("understandingPurpose") && lastActivity === "" ) { placement = "group1"; inProgressScroll(); } //......... // 1B. understandingPurpose activity - Completed if ( !activitiesIsInprogress.includes("valueYouBring") && lastActivity === "understandingPurpose" ) { document .getElementById("valueyoubring2_off") .addEventListener("mouseover", function () { document.getElementById("valueyoubring2_label_next").style.display = "block"; document.getElementById( "valueyoubring2_label_locked" ).style.visibility = "hidden"; }); document .getElementById("valueyoubring2_off") .addEventListener("mouseout", function () { document.getElementById("valueyoubring2_label_next").style.display = "none"; }); lastActivityCompleted = "findingpurpose"; nextActivity = "valueyoubring2"; islandPath = "path-dots-2-anim"; lastIsland = "group1"; island = "group2"; nextActivityAnim(); } //......... // 2A. valueYouBring activity - In Progress if ( activitiesIsInprogress.includes("understandingPurpose") && activitiesIsInprogress.includes("valueYouBring") && lastActivity === "understandingPurpose" ) { placement = "group2"; inProgressScroll(); } //......... // 2B. valueYouBring activity - Completed if ( !activitiesIsInprogress.includes("sharingStrengths") && lastActivity === "valueYouBring" ) { document .getElementById("sharingstrengths3_off") .addEventListener("mouseover", function () { document.getElementById("sharingstrengths3_off").style.cursor = "pointer"; document.getElementById( "sharingstrengths3_label_next" ).style.display = "block"; document.getElementById( "sharingstrengths3_label_locked" ).style.visibility = "hidden"; }); document .getElementById("sharingstrengths3_off") .addEventListener("mouseout", function () { document.getElementById("sharingstrengths3_off").style.cursor = "default"; document.getElementById( "sharingstrengths3_label_next" ).style.display = "none"; }); lastActivityCompleted = "valueyoubring2"; nextActivity = "sharingstrengths3"; islandPath = "path-dots-3-anim"; lastIsland = "group2"; island = "group2"; nextActivityAnim(); } //......... // 3A. sharingStrengths - In Progress if ( activitiesIsInprogress.includes("understandingPurpose") && activitiesIsInprogress.includes("valueYouBring") && activitiesIsInprogress.includes("sharingStrengths") && lastActivity === "valueYouBring" ) { placement = "group2"; inProgressScroll(); } //......... // 3B. sharingStrengths activity - Completed if ( !activitiesIsInprogress.includes("interestMapping") && lastActivity === "sharingStrengths" ) { document .getElementById("interestmapping4_off") .addEventListener("mouseover", function () { document.getElementById("interestmapping4_off").style.cursor = "pointer"; document.getElementById("interestmapping4_label_next").style.display = "block"; document.getElementById( "interestmapping4_label_locked" ).style.visibility = "hidden"; }); document .getElementById("interestmapping4_off") .addEventListener("mouseout", function () { document.getElementById("interestmapping4_off").style.cursor = "default"; document.getElementById("interestmapping4_label_next").style.display = "none"; }); document.getElementById("sharingstrengths3_border").style.fill = "#2a3c63"; lastActivityCompleted = "sharingstrengths3"; nextActivity = "interestmapping4"; islandPath = "path-dots-4-anim"; lastIsland = "group2"; island = "group2"; nextActivityAnim(); } //......... // 4A. interestMapping activity - In Progress if ( activitiesIsInprogress.includes("understandingPurpose") && activitiesIsInprogress.includes("valueYouBring") && activitiesIsInprogress.includes("sharingStrengths") && activitiesIsInprogress.includes("interestMapping") && lastActivity === "sharingStrengths" ) { placement = "group2"; inProgressScroll(); } //......... // 4. interestMapping activity - Completed if ( !activitiesIsInprogress.includes("curiosityWalkabout") && lastActivity === "interestMapping" ) { document .getElementById("curiositywalkabout5_off") .addEventListener("mouseover", function () { document.getElementById("curiositywalkabout5_off").style.cursor = "pointer"; document.getElementById( "curiositywalkabout5_label_next" ).style.display = "block"; document.getElementById( "curiositywalkabout5_label_locked" ).style.visibility = "hidden"; }); document .getElementById("curiositywalkabout5_off") .addEventListener("mouseout", function () { document.getElementById("curiositywalkabout5_off").style.cursor = "default"; document.getElementById( "curiositywalkabout5_label_next" ).style.display = "none"; }); document.getElementById("interestmapping4_border").style.fill = "#2a3c63"; lastActivityCompleted = "interestmapping4"; nextActivity = "curiositywalkabout5"; islandPath = "path-dots-5-anim"; lastIsland = "group2"; island = "group3"; nextActivityAnim(); } //......... // 5A. curiosityWalkabout activity - In Progress if ( activitiesIsInprogress.includes("understandingPurpose") && activitiesIsInprogress.includes("valueYouBring") && activitiesIsInprogress.includes("sharingStrengths") && activitiesIsInprogress.includes("interestMapping") && activitiesIsInprogress.includes("curiosityWalkabout") && lastActivity === "interestMapping" ) { placement = "group3"; inProgressScroll(); } //......... // 5. curiosityWalkabout activity - Completed if ( !activitiesIsInprogress.includes("journeyMapping") && lastActivity === "curiosityWalkabout" ) { document .getElementById("journeymapping6_off") .addEventListener("mouseover", function () { document.getElementById("journeymapping6_off").style.cursor = "pointer"; document.getElementById("journeymapping6_label_next").style.display = "block"; document.getElementById( "journeymapping6_label_locked" ).style.visibility = "hidden"; }); document .getElementById("journeymapping6_off") .addEventListener("mouseout", function () { document.getElementById("journeymapping6_off").style.cursor = "default"; document.getElementById("journeymapping6_label_next").style.display = "none"; }); document.getElementById("curiositywalkabout5_border").style.fill = "#2a3c63"; lastActivityCompleted = "curiositywalkabout5"; nextActivity = "journeymapping6"; islandPath = "path-dots-6-anim"; lastIsland = "group3"; island = "group3"; nextActivityAnim(); } //......... // 6A. journeyMapping activity - In Progress if ( activitiesIsInprogress.includes("understandingPurpose") && activitiesIsInprogress.includes("valueYouBring") && activitiesIsInprogress.includes("sharingStrengths") && activitiesIsInprogress.includes("interestMapping") && activitiesIsInprogress.includes("curiosityWalkabout") && activitiesIsInprogress.includes("journeyMapping") && lastActivity === "curiosityWalkabout" ) { placement = "group3"; inProgressScroll(); } //......... // 6. journeyMapping activity - Completed if ( !activitiesIsInprogress.includes("inspirationAudit") && lastActivity === "journeyMapping" ) { document .getElementById("inspirationaudit7_off") .addEventListener("mouseover", function () { document.getElementById("inspirationaudit7_off").style.cursor = "pointer"; document.getElementById( "inspirationaudit7_label_next" ).style.display = "block"; document.getElementById( "inspirationaudit7_label_locked" ).style.visibility = "hidden"; }); document .getElementById("inspirationaudit7_off") .addEventListener("mouseout", function () { document.getElementById("inspirationaudit7_off").style.cursor = "default"; document.getElementById( "inspirationaudit7_label_next" ).style.display = "none"; }); document.getElementById("journeymapping6_border").style.fill = "#2a3c63"; lastActivityCompleted = "journeymapping6"; nextActivity = "inspirationaudit7"; islandPath = "path-dots-7-anim"; lastIsland = "group2"; island = "group3"; nextActivityAnim(); } //......... // 7A. inspirationAudit activity - In Progress if ( activitiesIsInprogress.includes("understandingPurpose") && activitiesIsInprogress.includes("valueYouBring") && activitiesIsInprogress.includes("sharingStrengths") && activitiesIsInprogress.includes("interestMapping") && activitiesIsInprogress.includes("curiosityWalkabout") && activitiesIsInprogress.includes("journeyMapping") && activitiesIsInprogress.includes("inspirationAudit") && lastActivity === "journeyMapping" ) { placement = "group3"; inProgressScroll(); } //......... // 7. inspirationAudit activity - Completed if ( !activitiesIsInprogress.includes("shapingSelf") && lastActivity === "inspirationAudit" ) { document .getElementById("shapingself8_off") .addEventListener("mouseover", function () { document.getElementById("shapingself8_off").style.cursor = "pointer"; document.getElementById("shapingself8_label_next").style.display = "block"; document.getElementById( "shapingself8_label_locked" ).style.visibility = "hidden"; }); document .getElementById("shapingself8_off") .addEventListener("mouseout", function () { document.getElementById("shapingself8_off").style.cursor = "default"; document.getElementById("shapingself8_label_next").style.display = "none"; }); document.getElementById("inspirationaudit7_border").style.fill = "#2a3c63"; lastActivityCompleted = "inspirationaudit7"; nextActivity = "shapingself8"; islandPath = "path-dots-8-anim"; lastIsland = "group3"; island = "group4"; nextActivityAnim(); } //......... // 8A. shapingSelf activity - In Progress if ( activitiesIsInprogress.includes("understandingPurpose") && activitiesIsInprogress.includes("valueYouBring") && activitiesIsInprogress.includes("sharingStrengths") && activitiesIsInprogress.includes("interestMapping") && activitiesIsInprogress.includes("curiosityWalkabout") && activitiesIsInprogress.includes("journeyMapping") && activitiesIsInprogress.includes("inspirationAudit") && activitiesIsInprogress.includes("shapingSelf") && lastActivity === "inspirationAudit" ) { placement = "group4"; inProgressScroll(); } //......... // 8. shapingSelf activity - Completed if ( !activitiesIsInprogress.includes("findingFocus") && lastActivity === "shapingSelf" ) { document .getElementById("findingfocus9_off") .addEventListener("mouseover", function () { document.getElementById("findingfocus9_off").style.cursor = "pointer"; document.getElementById("findingfocus9_label_next").style.display = "block"; document.getElementById( "findingfocus9_label_locked" ).style.visibility = "hidden"; }); document .getElementById("findingfocus9_off") .addEventListener("mouseout", function () { document.getElementById("findingfocus9_off").style.cursor = "default"; document.getElementById("findingfocus9_label_next").style.display = "none"; }); document.getElementById("shapingself8_border").style.fill = "#2a3c63"; lastActivityCompleted = "shapingself8"; nextActivity = "findingfocus9"; islandPath = "path-dots-9-anim"; lastIsland = "group4"; island = "group4"; nextActivityAnim(); } //......... // 9A. findingFocus activity - In Progress if ( activitiesIsInprogress.includes("understandingPurpose") && activitiesIsInprogress.includes("valueYouBring") && activitiesIsInprogress.includes("sharingStrengths") && activitiesIsInprogress.includes("interestMapping") && activitiesIsInprogress.includes("curiosityWalkabout") && activitiesIsInprogress.includes("journeyMapping") && activitiesIsInprogress.includes("inspirationAudit") && activitiesIsInprogress.includes("shapingSelf") && activitiesIsInprogress.includes("findingFocus") && lastActivity === "shapingSelf" ) { placement = "group4"; inProgressScroll(); } //......... // 9. findingFocus activity - Completed if ( !activitiesIsInprogress.includes("goodQuestions") && lastActivity === "findingFocus" ) { document .getElementById("goodquestions10_off") .addEventListener("mouseover", function () { document.getElementById("goodquestions10_off").style.cursor = "pointer"; document.getElementById("goodquestions10_label_next").style.display = "block"; document.getElementById( "goodquestions10_label_locked" ).style.visibility = "hidden"; }); document .getElementById("goodquestions10_off") .addEventListener("mouseout", function () { document.getElementById("goodquestions10_off").style.cursor = "default"; document.getElementById("goodquestions10_label_next").style.display = "none"; }); document.getElementById("valueyoubring2_on").style.display = "block"; document.getElementById("valueyoubring2_on").style.visibility = "visible"; document.getElementById("findingfocus9_border").style.fill = "#2a3c63"; lastActivityCompleted = "findingfocus9"; nextActivity = "goodquestions10"; islandPath = "path-dots-10-anim"; lastIsland = "group4"; island = "group5"; nextActivityAnim(); } //......... // 10A. goodQuestions activity - In Progress if ( activitiesIsInprogress.includes("understandingPurpose") && activitiesIsInprogress.includes("valueYouBring") && activitiesIsInprogress.includes("sharingStrengths") && activitiesIsInprogress.includes("interestMapping") && activitiesIsInprogress.includes("curiosityWalkabout") && activitiesIsInprogress.includes("journeyMapping") && activitiesIsInprogress.includes("inspirationAudit") && activitiesIsInprogress.includes("shapingSelf") && activitiesIsInprogress.includes("findingFocus") && activitiesIsInprogress.includes("goodQuestions") && lastActivity === "findingFocus" ) { placement = "group5"; inProgressScroll(); } //......... // 10. goodQuestions activity - Completed if ( !activitiesIsInprogress.includes("interestInspiration") && lastActivity === "goodQuestions" ) { document .getElementById("interestInspiration11_off") .addEventListener("mouseover", function () { document.getElementById("interestInspiration11_off").style.cursor = "pointer"; document.getElementById( "interestInspiration11_label_next" ).style.display = "block"; document.getElementById( "interestInspiration11_label_locked" ).style.visibility = "hidden"; }); document .getElementById("interestInspiration11_off") .addEventListener("mouseout", function () { document.getElementById("interestInspiration11_off").style.cursor = "default"; document.getElementById( "interestInspiration11_label_next" ).style.display = "none"; }); document.getElementById("goodquestions10_border").style.fill = "#2a3c63"; lastActivityCompleted = "goodquestions10"; nextActivity = "interestInspiration11"; islandPath = "path-dots-11-anim"; lastIsland = "group5"; island = "group5"; nextActivityAnim(); } //......... // 11A. interestInspiration activity - In Progress if ( activitiesIsInprogress.includes("understandingPurpose") && activitiesIsInprogress.includes("valueYouBring") && activitiesIsInprogress.includes("sharingStrengths") && activitiesIsInprogress.includes("interestMapping") && activitiesIsInprogress.includes("curiosityWalkabout") && activitiesIsInprogress.includes("journeyMapping") && activitiesIsInprogress.includes("inspirationAudit") && activitiesIsInprogress.includes("shapingSelf") && activitiesIsInprogress.includes("findingFocus") && activitiesIsInprogress.includes("goodQuestions") && activitiesIsInprogress.includes("interestInspiration") && lastActivity === "goodQuestions" ) { placement = "group5"; inProgressScroll(); } //......... // 11. interestInspiration activity - Completed if ( !activitiesIsInprogress.includes("projectPlanning") && lastActivity === "interestInspiration" ) { document .getElementById("projectplanning12_off") .addEventListener("mouseover", function () { document.getElementById("projectplanning12_off").style.cursor = "pointer"; document.getElementById( "projectplanning12_label_next" ).style.display = "block"; document.getElementById( "projectplanning12_label_locked" ).style.visibility = "hidden"; }); document .getElementById("projectplanning12_off") .addEventListener("mouseout", function () { document.getElementById("projectplanning12_off").style.cursor = "default"; document.getElementById( "projectplanning12_label_next" ).style.display = "none"; }); document.getElementById("interestInspiration11_border").style.fill = "#2a3c63"; lastActivityCompleted = "interestInspiration11"; nextActivity = "projectplanning12"; islandPath = "path-dots-12-anim"; lastIsland = "group5"; island = "group6"; nextActivityAnim(); } //......... // 12. projectPlanning activity - Completed if ( !activitiesIsInprogress.includes("motivationMoments") && lastActivity === "projectPlanning" ) { document .getElementById("motivationmoments13_off") .addEventListener("mouseover", function () { document.getElementById("motivationmoments13_off").style.cursor = "pointer"; document.getElementById( "motivationmoments13_label_next" ).style.display = "block"; document.getElementById( "motivationmoments13_label_locked" ).style.visibility = "hidden"; }); document .getElementById("motivationmoments13_off") .addEventListener("mouseout", function () { document.getElementById("motivationmoments13_off").style.cursor = "default"; document.getElementById( "motivationmoments13_label_next" ).style.display = "none"; }); document.getElementById("projectplanning12_border").style.fill = "#2a3c63"; lastActivityCompleted = "projectplanning12"; nextActivity = "motivationmoments13"; islandPath = "path-dots-13-anim"; lastIsland = "group6"; island = "group6"; nextActivityAnim(); } //......... // 13. motivationMoments activity - Completed if ( !activitiesIsInprogress.includes("freshPerspectives") && lastActivity === "motivationMoments" ) { document .getElementById("freshperspectives14_off") .addEventListener("mouseover", function () { document.getElementById("freshperspectives14_off").style.cursor = "pointer"; document.getElementById( "freshperspectives14_label_next" ).style.display = "block"; document.getElementById( "freshperspectives14_label_locked" ).style.visibility = "hidden"; }); document .getElementById("freshperspectives14_off") .addEventListener("mouseout", function () { document.getElementById("freshperspectives14_off").style.cursor = "default"; document.getElementById( "freshperspectives14_label_next" ).style.display = "none"; }); document.getElementById("motivationmoments13_border").style.fill = "#2a3c63"; lastActivityCompleted = "motivationmoments13"; nextActivity = "freshperspectives14"; islandPath = "path-dots-14-anim"; lastIsland = "group6"; island = "group7"; nextActivityAnim(); } //......... // 14. freshPerspectives activity - Completed if ( !activitiesIsInprogress.includes("learningToAdapt") && lastActivity === "freshPerspectives" ) { document .getElementById("learningtoadapt15_off") .addEventListener("mouseover", function () { document.getElementById("learningtoadapt15_off").style.cursor = "pointer"; document.getElementById( "learningtoadapt15_label_next" ).style.display = "block"; document.getElementById( "learningtoadapt15_label_locked" ).style.visibility = "hidden"; }); document .getElementById("learningtoadapt15_off") .addEventListener("mouseout", function () { document.getElementById("learningtoadapt15_off").style.cursor = "default"; document.getElementById( "learningtoadapt15_label_next" ).style.display = "none"; }); document.getElementById("freshperspectives14_border").style.fill = "#2a3c63"; lastActivityCompleted = "freshperspectives14"; nextActivity = "learningtoadapt15"; islandPath = "path-dots-15-anim"; lastIsland = "group7"; island = "group7"; nextActivityAnim(); } //......... // 15. learningToAdapt activity - Completed if ( !activitiesIsInprogress.includes("designingImpact") && lastActivity === "learningToAdapt" ) { document .getElementById("designingimpact16_off") .addEventListener("mouseover", function () { document.getElementById("designingimpact16_off").style.cursor = "pointer"; document.getElementById( "designingimpact16_label_next" ).style.display = "block"; document.getElementById( "designingimpact16_label_locked" ).style.visibility = "hidden"; }); document .getElementById("designingimpact16_off") .addEventListener("mouseout", function () { document.getElementById("designingimpact16_off").style.cursor = "default"; document.getElementById( "designingimpact16_label_next" ).style.display = "none"; }); document.getElementById("learningtoadapt15_border").style.fill = "#2a3c63"; lastActivityCompleted = "learningtoadapt15"; nextActivity = "designingimpact16"; islandPath = "path-dots-16-anim"; lastIsland = "group7"; island = "group8"; nextActivityAnim(); } //......... // 16. designingImpact activity - Completed if ( !activitiesIsInprogress.includes("growingYourImpact") && lastActivity === "designingImpact" ) { document .getElementById("growingyourimpact17_off") .addEventListener("mouseover", function () { document.getElementById("growingyourimpact17_off").style.cursor = "pointer"; document.getElementById( "growingyourimpact17_label_next" ).style.display = "block"; document.getElementById( "growingyourimpact17_label_locked" ).style.visibility = "hidden"; }); document .getElementById("growingyourimpact17_off") .addEventListener("mouseout", function () { document.getElementById("growingyourimpact17_off").style.cursor = "default"; document.getElementById( "growingyourimpact17_label_next" ).style.display = "none"; }); document.getElementById("valueyoubring2_on").style.display = "block"; document.getElementById("valueyoubring2_on").style.visibility = "visible"; document.getElementById("designingimpact16_border").style.fill = "#2a3c63"; lastActivityCompleted = "designingimpact16"; nextActivity = "growingyourimpact17"; islandPath = "path-dots-17-anim"; lastIsland = "group8"; island = "group8"; nextActivityAnim(); } //......... // 17. growingYourImpact activity - Completed if ( !activitiesIsInprogress.includes("buildingYourTeam") && lastActivity === "growingYourImpact" ) { document .getElementById("buildingyourteam18_off") .addEventListener("mouseover", function () { document.getElementById("buildingyourteam18_off").style.cursor = "pointer"; document.getElementById( "buildingyourteam18_label_next" ).style.display = "block"; document.getElementById( "buildingyourteam18_label_locked" ).style.visibility = "hidden"; }); document .getElementById("buildingyourteam18_off") .addEventListener("mouseout", function () { document.getElementById("buildingyourteam18_off").style.cursor = "default"; document.getElementById( "buildingyourteam18_label_next" ).style.display = "none"; }); console.log("growingYourImpact activity"); document.getElementById("valueyoubring2_on").style.display = "block"; document.getElementById("valueyoubring2_on").style.visibility = "visible"; lastActivityCompleted = "growingyourimpact17"; nextActivity = "buildingyourteam18"; islandPath = "path-dots-18-anim"; lastIsland = "group8"; island = "group8"; nextActivityAnim(); } //......... // 18. buildingYourTeam activity - Completed if ( !activitiesIsInprogress.includes("mixingMediums") && lastActivity === "buildingYourTeam" ) { document .getElementById("mixingmediums19_off") .addEventListener("mouseover", function () { document.getElementById("mixingmediums19_off").style.cursor = "pointer"; document.getElementById("mixingmediums19_label_next").style.display = "block"; document.getElementById( "mixingmediums19_label_locked" ).style.visibility = "hidden"; }); document .getElementById("mixingmediums19_off") .addEventListener("mouseout", function () { document.getElementById("mixingmediums19_off").style.cursor = "default"; document.getElementById("mixingmediums19_label_next").style.display = "none"; }); lastActivityCompleted = "buildingyourteam18"; nextActivity = "mixingmediums19"; islandPath = "path-dots-19-anim"; lastIsland = "group8"; island = "group9"; nextActivityAnim(); } //......... // 19. mixingMediums activity - Completed if ( !activitiesIsInprogress.includes("draftYourNarrative") && lastActivity === "mixingMediums" ) { document .getElementById("draftyournarrative20_off") .addEventListener("mouseover", function () { document.getElementById("draftyournarrative20_off").style.cursor = "pointer"; document.getElementById( "draftyournarrative20_label_next" ).style.display = "block"; document.getElementById( "draftyournarrative20_label_locked" ).style.visibility = "hidden"; }); document .getElementById("draftyournarrative20_off") .addEventListener("mouseout", function () { document.getElementById("draftyournarrative20_off").style.cursor = "default"; document.getElementById( "draftyournarrative20_label_next" ).style.display = "none"; }); lastActivityCompleted = "mixingmediums19"; nextActivity = "draftyournarrative20"; islandPath = "path-dots-20-anim"; lastIsland = "group9"; island = "group9"; nextActivityAnim(); } //......... // 20. draftYourNarrative activity - Completed if ( !activitiesIsInprogress.includes("sharedExperiences") && lastActivity === "draftYourNarrative" ) { document .getElementById("sharedexperiences21_off") .addEventListener("mouseover", function () { document.getElementById("sharedexperiences21_off").style.cursor = "pointer"; document.getElementById( "sharedexperiences21_label_next" ).style.display = "block"; document.getElementById( "sharedexperiences21_label_locked" ).style.visibility = "hidden"; }); document .getElementById("sharedexperiences21_off") .addEventListener("mouseout", function () { document.getElementById("sharedexperiences21_off").style.cursor = "default"; document.getElementById( "sharedexperiences21_label_next" ).style.display = "none"; }); lastActivityCompleted = "draftyournarrative20"; nextActivity = "sharedexperiences21"; islandPath = "path-dots-21-anim"; lastIsland = "group9"; island = "group9"; nextActivityAnim(); } //............................................................................. function nextActivityAnim() { document.getElementById( lastActivityCompleted + "_inprogress" ).style.visibility = "visible"; document.getElementById(lastIsland).style.visibility = "visible"; document.getElementById(lastActivityCompleted + "_on").style.display = "block"; document.getElementById(lastActivityCompleted + "_on").style.opacity = "0"; document.getElementById(lastActivityCompleted + "_border").style.fill = "#2a3c63"; setTimeout(function () { // Cross-Browser Scrolling // patch all methods seamless.polyfill(); // or use specific methods seamless.scrollBy(window, { behavior: "smooth", top: 200, left: 0, right: 0, }); seamless.scrollIntoView(document.querySelector("#" + lastIsland), { behavior: "smooth", block: "center", inline: "center", }); }, 1600); setTimeout(function () { document .getElementById(lastActivityCompleted + "_border") .classList.add("activity_border_fill"); document.getElementById( lastActivityCompleted + "_inprogress" ).style.visibility = "visible"; document .getElementById(lastActivityCompleted + "_arrow") .classList.add("anim-arrow"); document .getElementById(lastActivityCompleted + "_on") .classList.add("activity_anim_back"); document.getElementById(islandPath).style.visibility = "visible"; document.getElementById(islandPath).classList.add("path_anim"); document .getElementById(nextActivity + "_off") .classList.add("new_activty_in_journey_anim"); document.getElementById(island).classList.add("new_group_anim"); }, 2600); setTimeout(function () { document .getElementById(nextActivity + "_off") .classList.remove("new_activty_in_journey_anim"); document .getElementById(nextActivity + "_off") .classList.add("jmapbtn-next-off"); }, 5000); } //............................................................................. function inProgressScroll() { // Delay the scrolling for 1.6 seconds setTimeout(() => { // Patch all scrolling methods for cross-browser compatibility seamless.polyfill(); // Scroll the window by 200 pixels vertically with smooth behavior seamless.scrollBy(window, { behavior: "smooth", top: 200, left: 0, right: 0, }); // Scroll the document to center the element with the placement element with smooth behavior seamless.scrollIntoView(document.querySelector("#" + placement), { behavior: "smooth", block: "center", inline: "center", }); }, 1600); } }; ///////// })();