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;
|
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
|
// CONCEPTS
|
||||||
|
|
||||||
// NOTE: Benutzt private Zuweisungen
|
// NOTE: Benutzt private Zuweisungen
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ function showIntro() {
|
||||||
|
|
||||||
reject('No intro available.');
|
reject('No intro available.');
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function showAgreement() {
|
function showAgreement() {
|
||||||
|
|
@ -197,7 +197,7 @@ function showAgreement() {
|
||||||
resolve(steps.agreement.msgOut);
|
resolve(steps.agreement.msgOut);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function showIdle() {
|
function showIdle() {
|
||||||
|
|
@ -212,16 +212,24 @@ function showIdle() {
|
||||||
|
|
||||||
el.classList.replace('op_hide', 'op_show');
|
el.classList.replace('op_hide', 'op_show');
|
||||||
el.style.pointerEvents = '';
|
el.style.pointerEvents = '';
|
||||||
el.addEventListener('click', idleStart, false);
|
el.addEventListener('contextmenu', (event) => {
|
||||||
|
event.preventDefault();
|
||||||
resolve('Idle.');
|
});
|
||||||
|
el.addEventListener('click', (event) => {
|
||||||
|
if (checkButtonAndTarget(event, event.target)) {
|
||||||
|
console.log('OK go', event.target);
|
||||||
|
resolve('Idle fin.');
|
||||||
|
} else {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
}, false);
|
||||||
} else {
|
} else {
|
||||||
document.removeEventListener('mouseleave', idleStart);
|
document.removeEventListener('mouseleave', idleStart);
|
||||||
document.removeEventListener('mouseenter', idleStop);
|
document.removeEventListener('mouseenter', idleStop);
|
||||||
|
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadCore() {
|
function loadCore() {
|
||||||
|
|
@ -306,5 +314,5 @@ function stepHandler(e) {
|
||||||
|
|
||||||
resolve(msg);
|
resolve(msg);
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -132,6 +132,7 @@ tags:
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
console.debug('Init end.', isAgree);
|
console.debug('Init end.', isAgree);
|
||||||
// location = 'demo/examples/ui/new.html';
|
// location = 'demo/examples/ui/new.html';
|
||||||
|
window.location.href = './menu.html';
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue