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 3a1f19b8 authored by Tobias Zeumer's avatar Tobias Zeumer

Improve highlighting logic

parent 09d9faad
......@@ -37,8 +37,10 @@ var urlParam = {};
var sig_loc = '', sig_sys = '', sig_num = '';
// Global timeouts
var timeout_highlighting = 0, timeout_modalShelfSignature = 0;
var timeout_idleReset = 0;
var timeout_highlighting;
var timeout_markerHide;
var timeout_modalShelfSignature;
var timeout_idleReset;
// Other
var screensaver_active = false;
......@@ -779,27 +781,34 @@ function split_signature(sig) {
function highlight(target, extendedMode) {
var extendedMode = (typeof extendedMode == 'undefined') ? true : false;
$('.highlight').removeClass('highlight');
clearTimeout(timeout_highlighting);
clearTimeout(timeout_markerHide);
// Default: Reset zoom and hide markers for a short time
if (extendedMode) {
$("#tubhh").panzoom("reset");
// Hide markers for a short time (unless deactivated per display options)
if ($("#tgl_poi").is(':checked') === true) {
$(".marker").toggle();
setTimeout(function() {
$(".marker").toggle();
$(".marker").hide();
timeout_markerHide = setTimeout(function() {
$(".marker").show();
}, 5000);
}
}
// Add class (with animation)
$(target).addClass('highlight');
// Remove any previous highlighting before highlighting current selection
// (could happen if clicking somethign before the setTimeout for the removal
// fired; within 15 seconds)
$('*').removeClass('highlight');
// Hmm, removing and immediatly adding does not work; add small delay
setTimeout(function() {
$(target).addClass('highlight');
}, 100);
// Remove highlighting after 15 seconds (enough time to change floor)
// Explicit: use global var, so timer from last call can be reseted
clearTimeout(timeout_highlighting);
timeout_highlighting = setTimeout(function() {
$('.highlight').removeClass('highlight');
}, 20000);
......
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