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

prevent if not in viewport #60

Open
github-actions bot opened this issue Jun 4, 2024 · 0 comments
Open

prevent if not in viewport #60

github-actions bot opened this issue Jun 4, 2024 · 0 comments
Labels
components Components pkgs scope enhancement New feature or request todo

Comments

@github-actions
Copy link

github-actions bot commented Jun 4, 2024

// TODO: prevent if not in viewport

		if (!allowAutoAnimate.value || childCount.value <= 1) return;

		// autoplay
		sliderInterval.value = setInterval(() => {
			// TODO: prevent if not in viewport
			if (mouseOnTabs.value) return;

			debouncedTab(false);
		}, props.intervalDuration);
	}

	/**
	 * switch tabs
	 */
	const debouncedTab = _.debounce(tab);

	// lifecycle
	if (isBrowser) {
		onMounted(() => {
			loading.value = true;
			launchInterval();
			loading.value = false;
		});

		onBeforeUnmount(() => {
@github-actions github-actions bot added the todo label Jun 4, 2024
@vis97c vis97c added components Components pkgs scope enhancement New feature or request labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
components Components pkgs scope enhancement New feature or request todo
Projects
None yet
Development

No branches or pull requests

1 participant