mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 10:49:59 +01:00
Fix scroll up button (#638)
* fix scroll-up button * dist changes * changes * changes
This commit is contained in:
19
dist/image-sequencer-ui.js
vendored
19
dist/image-sequencer-ui.js
vendored
@@ -690,6 +690,25 @@ window.onload = function() {
|
||||
}
|
||||
refreshOptions();
|
||||
|
||||
$(window).on('scroll', scrollFunction);
|
||||
|
||||
function scrollFunction() {
|
||||
var shouldDisplay = $('body').scrollTop() > 20 || $(':root').scrollTop() > 20;
|
||||
|
||||
$('#move-up').css({
|
||||
display: shouldDisplay ? 'block' : 'none'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function topFunction() {
|
||||
$('body').animate({scrollTop: 0});
|
||||
$(':root').animate({scrollTop: 0});
|
||||
}
|
||||
|
||||
$('#move-up').on("click",topFunction);
|
||||
|
||||
|
||||
// UI for each step:
|
||||
sequencer.setUI(DefaultHtmlStepUi(sequencer));
|
||||
|
||||
|
||||
2
dist/image-sequencer-ui.min.js
vendored
2
dist/image-sequencer-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -153,25 +153,19 @@ h1 {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.move-up {
|
||||
#move-up {
|
||||
position: fixed;
|
||||
bottom: 50px;
|
||||
right: 40px;
|
||||
z-index: 3;
|
||||
z-index: 550;
|
||||
display: none;
|
||||
z-index:1000;
|
||||
}
|
||||
.move-up button {
|
||||
background:transparent;
|
||||
border:none;
|
||||
}
|
||||
.move-up button:active:hover {
|
||||
padding-right:4px !important;
|
||||
margin-right:2px;
|
||||
}
|
||||
.move-up i {
|
||||
|
||||
#move-up i {
|
||||
font-size:60px;
|
||||
opacity:0.5;
|
||||
opacity:0.7;
|
||||
color:#BABABA;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,25 @@ window.onload = function() {
|
||||
}
|
||||
refreshOptions();
|
||||
|
||||
$(window).on('scroll', scrollFunction);
|
||||
|
||||
function scrollFunction() {
|
||||
var shouldDisplay = $('body').scrollTop() > 20 || $(':root').scrollTop() > 20;
|
||||
|
||||
$('#move-up').css({
|
||||
display: shouldDisplay ? 'block' : 'none'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function topFunction() {
|
||||
$('body').animate({scrollTop: 0});
|
||||
$(':root').animate({scrollTop: 0});
|
||||
}
|
||||
|
||||
$('#move-up').on("click",topFunction);
|
||||
|
||||
|
||||
// UI for each step:
|
||||
sequencer.setUI(DefaultHtmlStepUi(sequencer));
|
||||
|
||||
|
||||
@@ -182,9 +182,8 @@
|
||||
<footer>
|
||||
<hr style="margin:20px;"><center><a class="color:grey;" id="clear-cache">Clear offline cache</a></center>
|
||||
</footer>
|
||||
<form class="move-up" action="#up">
|
||||
<button><i class="fa fa-arrow-circle-o-up"></i></button>
|
||||
</form>
|
||||
|
||||
<button id="move-up"><i class="fa fa-arrow-circle-o-up"></i></button>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
Reference in New Issue
Block a user