-
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.
Merge pull request #1 from simularium/filament-bending-lit-examples
Add literature examples of bending actin filaments
- Loading branch information
Showing
8 changed files
with
184 additions
and
23 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,47 @@ | ||
let activeIndex = 0 | ||
|
||
function showSlides(index, loop=true) { | ||
index = showSlide(index, loop) | ||
|
||
if (loop) { | ||
timer = setTimeout(showSlides, 5000, index + 1) | ||
} else { | ||
clearTimeout(timer) | ||
} | ||
} | ||
|
||
function showSlide(index, loop=false) { | ||
let slides = document.getElementsByClassName("slide") | ||
let dots = document.getElementsByClassName("dot") | ||
|
||
if (index == -1) { | ||
index = slides.length - 1 | ||
} | ||
|
||
index = index % slides.length | ||
activeIndex = index | ||
|
||
for (i = 0; i < slides.length; i++) { | ||
slides[i].style.display = "none" | ||
if (!loop) { | ||
slides[i].className = slides[i].className.replace(" fullfade", " fadein") | ||
} | ||
} | ||
|
||
for (i = 0; i < dots.length; i++) { | ||
dots[i].className = dots[i].className.replace(" active", "") | ||
} | ||
|
||
slides[index].style.display = "block" | ||
dots[index].className += " active" | ||
|
||
return index | ||
} | ||
|
||
function nextSlide() { | ||
showSlides(activeIndex + 1, false) | ||
} | ||
|
||
function prevSlide() { | ||
showSlides(activeIndex - 1, false) | ||
} |
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