Skip to content

prevent if not in viewport #60

Open
@github-actions

Description

@github-actions

// 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(() => {

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions