The URI of TUHH Docker Registry changed from "docker.rz.tu-harburg.de:5000" to "docker.rz.tu-harburg.de". Please update your gitlab-ci.yml files if you use images from this registry.

Commit 790c82bc authored by Tobias Zeumer's avatar Tobias Zeumer

Screensaver: rename reset_page() to screensaver_start() and add...

Screensaver: rename reset_page() to screensaver_start() and add screensaver_stop(); only animate mapmarkers when screensaving; #36 #19
parent 4b0e572f
......@@ -288,6 +288,20 @@ dd a.inconizedLink {float: left; margin-right: 8px; }
100% {transform: translate(200%, 200%);}
}
/* .map_marker_layer use */
.map_marker_animate
{animation-name: pulse_animation; animation-duration: 30000ms; transform-origin:70% 70%; animation-iteration-count: infinite; animation-timing-function: linear;}
@keyframes pulse_animation {
0% { transform: scale(1); }
30% { transform: scale(1); }
40% { transform: scale(1); }
50% { transform: scale(1); }
60% { transform: scale(1); }
70% { transform: scale(1.05); }
80% { transform: scale(1); }
100% { transform: scale(1); }
}
/* #############################################################################
Autocomplete
############################################################################# */
......
......@@ -122,18 +122,6 @@
/* Hover cursor and animations for markers */
.marker
{cursor: pointer;}
.map_marker_layer use
{animation-name: pulse_animation; animation-duration: 30000ms; transform-origin:70% 70%; animation-iteration-count: infinite; animation-timing-function: linear;}
@keyframes pulse_animation {
0% { transform: scale(1); }
30% { transform: scale(1); }
40% { transform: scale(1); }
50% { transform: scale(1); }
60% { transform: scale(1); }
70% { transform: scale(1.05); }
80% { transform: scale(1); }
100% { transform: scale(1); }
}
/* Interactive SVG classes */
.highlight {fill: red !important; background-color: red !important; animation: highlight-animation .9s linear backwards;}
......
......@@ -20,6 +20,9 @@ var sig_loc = '', sig_sys = '', sig_num = '';
var timeout_highlighting = 0, timeout_modalShelfSignature = 0;
var timeout_idleReset = 0;
// Other
var screensaver_active = false;
/* #############################################################################
# Stuff (no function) unrelated to dom loading being finished
......@@ -403,11 +406,9 @@ $( document ).ready(function() {
# Jquery stuff independent of svg being loaded
######################################################################### */
// Add an idle timeout, when site will be reset
//timeout_idleReset
timeout_idleReset = setTimeout(function() {reset_page()}, screenSaverTime);
timeout_idleReset = setTimeout(function() {screensaver_start()}, screenSaverTime);
$(document).on('load mousemove touchstart click scroll keypress', function(event) {
clearTimeout(timeout_idleReset);
timeout_idleReset = setTimeout(function() {reset_page()}, screenSaverTime);
screensaver_stop();
});
// Listen for clicks on links in legend
......@@ -427,7 +428,6 @@ $( document ).ready(function() {
// use class keep-body-click on element or parent to prevent this when clicking on these elements themselves
$(window).on("touchstart mousedown", function() {
$(".close-body-click").hide();
$("#scrensaver").hide();
});
$(document).on('mousedown touchstart', '.keep-body-click', function(event) {
event.stopPropagation();
......@@ -814,7 +814,11 @@ function download_png() {
}, 1000);
}
function reset_page() {
/**
* When screenSaverTime is reached, reset stuff and do some "screensaving"
*/
function screensaver_start() {
// Close everything that closes by click in window, too
$(".close-body-click").hide();
......@@ -830,9 +834,35 @@ function reset_page() {
// @todo: Set default settings
// ...
$("#scrensaver").show();
// Animate markers
$('.map_marker_layer use').addClass('map_marker_animate');
log('sleeping', 'Aufgeweckt vor ' + screenSaverTime/1000/60 + ' Minuten.');
$("#scrensaver").show();
screensaver_active = true;
}
/**
* If screensaver is not running, reset timer until it will run. If it is
* actually running, then
*/
function screensaver_stop() {
// Always reset the global timer if this function is called
clearTimeout(timeout_idleReset);
timeout_idleReset = setTimeout(function() {screensaver_start()}, screenSaverTime);
// Reset other stuff IF screensaver is actualy running
if (screensaver_active == true) {
// Stop marker animation and screensaver
$('.map_marker_animate').removeClass('map_marker_animate');
$("#scrensaver").hide();
// Log being waked up
log('sleeping', 'Aufgeweckt worden');
screensaver_active = false;
}
}
/* #############################################################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment