Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in very simple auto-animation #3625

Open
lazy-detourer opened this issue May 14, 2024 · 0 comments
Open

Error in very simple auto-animation #3625

lazy-detourer opened this issue May 14, 2024 · 0 comments

Comments

@lazy-detourer
Copy link

<script>
	import { onMount } from 'svelte';

	import Reveal from 'reveal.js';
	import 'reveal.js/dist/reveal.css';

	onMount(() => {
		Reveal.initialize();
	});

</script>

<div class="reveal" style="height: 300px; width: 200px; margin: 0 auto">
	<div class="slides">
		<section data-auto-animate>
			<div style="background-color: green" data-id="a">
				<p>test 1</p>
				<p>test 2</p>
			</div>
		</section>
		<section data-auto-animate>
			<div style="background-color: yellow">
				<p>test 3</p>
				<p>test 4</p>
			</div>
			<div style="background-color: green" data-id="a">
				<p>test 1</p>
				<p>test 2</p>
			</div>
		</section>
	</div>
</div>

https://stackblitz.com/edit/sveltejs-kit-template-default-wte2cu?file=src%2Froutes%2F%2Bpage.svelte

I'm trying it on SvelteKit.

However, an anomaly is seen in the very simple auto-animate function.
When a slide transition occurs, content is coming in from outside the box boundaries.
Why does this happen? How do I make the contents of the green box appear without going out of bounds?
It can be reproduced by using the page down key or the mouse wheel to scroll through the slides in the linked StackBlitz.

I think I missed something very basic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant