feat: Add location change to intro
This commit is contained in:
parent
30fcd22a7b
commit
f2ff20ce73
3 changed files with 26 additions and 12 deletions
|
|
@ -539,6 +539,11 @@ function mapRange(value, inMin, inMax, outMin, outMax, reverse = false, clamp =
|
|||
return mapped;
|
||||
}
|
||||
|
||||
// Source - https://stackoverflow.com/a/47480429
|
||||
// Posted by Etienne Martin, modified by community. See post 'Timeline' for change history
|
||||
// Retrieved 2026-03-08, License - CC BY-SA 4.0
|
||||
const delay = ms => new Promise(res => setTimeout(res, ms));
|
||||
|
||||
// CONCEPTS
|
||||
|
||||
// NOTE: Benutzt private Zuweisungen
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ function showIntro() {
|
|||
|
||||
reject('No intro available.');
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function showAgreement() {
|
||||
|
|
@ -197,7 +197,7 @@ function showAgreement() {
|
|||
resolve(steps.agreement.msgOut);
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function showIdle() {
|
||||
|
|
@ -212,16 +212,24 @@ function showIdle() {
|
|||
|
||||
el.classList.replace('op_hide', 'op_show');
|
||||
el.style.pointerEvents = '';
|
||||
el.addEventListener('click', idleStart, false);
|
||||
|
||||
resolve('Idle.');
|
||||
el.addEventListener('contextmenu', (event) => {
|
||||
event.preventDefault();
|
||||
});
|
||||
el.addEventListener('click', (event) => {
|
||||
if (checkButtonAndTarget(event, event.target)) {
|
||||
console.log('OK go', event.target);
|
||||
resolve('Idle fin.');
|
||||
} else {
|
||||
event.preventDefault();
|
||||
}
|
||||
}, false);
|
||||
} else {
|
||||
document.removeEventListener('mouseleave', idleStart);
|
||||
document.removeEventListener('mouseenter', idleStop);
|
||||
|
||||
reject();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function loadCore() {
|
||||
|
|
@ -306,5 +314,5 @@ function stepHandler(e) {
|
|||
|
||||
resolve(msg);
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
|
@ -132,6 +132,7 @@ tags:
|
|||
.finally(() => {
|
||||
console.debug('Init end.', isAgree);
|
||||
// location = 'demo/examples/ui/new.html';
|
||||
window.location.href = './menu.html';
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue