-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
494 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/**************************************************** | ||
* run splash screen and it as info into action bar | ||
*******************************************************/ | ||
// author:LMI | ||
|
||
define([], function() { | ||
return { | ||
showSplashScreen: function(mapView) { // <-- Add mapView as an argument here | ||
// Code for showing the splash screen | ||
// run splash screen function | ||
function showSplashScreen() { | ||
var modal = document.getElementById("splashModal"); | ||
var modalContent = document.querySelector(".modal-content"); | ||
var span = document.getElementsByClassName("close")[0]; | ||
// var offsetX, offsetY, isDragging = false; //prepared for future adjustment, i.e. window draging | ||
|
||
// Center the modal initially | ||
modalContent.style.left = "50%"; | ||
modalContent.style.top = "50%"; | ||
modalContent.style.transform = "translate(-50%, -50%)"; | ||
|
||
modal.style.display = "block"; | ||
|
||
// Close modal when 'x' is clicked | ||
span.onclick = function() { | ||
modal.style.display = "none"; | ||
}; | ||
|
||
// Close modal when clicking outside of it | ||
window.onclick = function(event) { | ||
if (event.target === modal) { | ||
modal.style.display = "none"; | ||
} | ||
}; | ||
} | ||
|
||
// Run the function | ||
mapView.when(() => { | ||
showSplashScreen(); | ||
// the function run splash screen | ||
}); | ||
|
||
|
||
// Call the modal from info-button | ||
//document.getElementById('infoButton').addEventListener('click', showSplashScreen); | ||
} | ||
}; | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.