Compare commits
2 Commits
18c32a3781
...
a4712a46ec
| Author | SHA1 | Date | |
|---|---|---|---|
| a4712a46ec | |||
| 8546deafbf |
@ -10,13 +10,44 @@
|
|||||||
<script src="grid-n-view.js"></script>
|
<script src="grid-n-view.js"></script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
/* fade-in body... */
|
||||||
|
body {
|
||||||
|
animation: fadeInAnimation ease 2s;
|
||||||
|
animation-iteration-count: 1;
|
||||||
|
animation-fill-mode: forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeInAnimation {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
var SCROLL_TIMEOUT = 100
|
||||||
|
|
||||||
|
// save/restore scroll position...
|
||||||
|
window.addEventListener('beforeunload', function(){
|
||||||
|
window.scrollX > 0 ?
|
||||||
|
(sessionStorage.windowScrollX = window.scrollX)
|
||||||
|
: (delete sessionStorage.windowScrollX)
|
||||||
|
sessionStorage.windowScrollY = window.scrollY })
|
||||||
|
var restoreScroll = function(){
|
||||||
|
setTimeout(function(){
|
||||||
|
sessionStorage.windowScrollY
|
||||||
|
&& window.scroll(
|
||||||
|
(sessionStorage.windowScrollX ?? 0)*1,
|
||||||
|
sessionStorage.windowScrollY*1) }, SCROLL_TIMEOUT ?? 100) }
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body onload="setup()">
|
<body onload="setup(); restoreScroll()">
|
||||||
|
|
||||||
<h3>ToDo</h3>
|
<h3>ToDo</h3>
|
||||||
<pre>
|
<pre>
|
||||||
|
|||||||
@ -463,7 +463,7 @@ var Gallery = {
|
|||||||
return this },
|
return this },
|
||||||
|
|
||||||
// navigate images visually...
|
// navigate images visually...
|
||||||
// XXX these seem not to work with passed list of images...
|
// XXX BUG: these seem not to work with passed list of images...
|
||||||
left: function(images){
|
left: function(images){
|
||||||
var cur = this.current
|
var cur = this.current
|
||||||
var row = this.getRow(cur, images)
|
var row = this.getRow(cur, images)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user