Files
michaelschiemer/resources/js/modules/scroll-timeline/steps.js
Michael Schiemer 55a330b223 Enable Discovery debug logging for production troubleshooting
- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
2025-08-11 20:13:26 +02:00

36 lines
1.2 KiB
JavaScript

import { Logger } from '../../core/logger.js';
export const scrollSteps = {
onEnter(index, el) {
el.classList.add('active');
document.body.dataset.activeScrollStep = index;
Logger.info(`[ScrollStep] Enter: ${index}`);
// Beispielaktionen
if (index === 1) showIntro();
if (index === 2) activateChart();
if (index === 3) revealQuote();
},
onLeave(index, el) {
el.classList.remove('active');
el.style.transitionDelay = '';
Logger.info(`[ScrollStep] Leave: ${index}`);
if (document.body.dataset.activeScrollStep === String(index)) {
delete document.body.dataset.activeScrollStep;
}
if (index === 1) hideIntro();
if (index === 2) deactivateChart();
if (index === 3) hideQuote();
}
};
function showIntro() { Logger.info('Intro sichtbar'); }
function hideIntro() { Logger.info('Intro ausgeblendet'); }
function activateChart() { Logger.info('Chart aktiviert'); }
function deactivateChart() { Logger.info('Chart deaktiviert'); }
function revealQuote() { Logger.info('Zitat eingeblendet'); }
function hideQuote() { Logger.info('Zitat ausgeblendet'); }