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

feat(useGeolocation): pause and resume controls #2376

Merged
merged 2 commits into from Nov 8, 2022

Conversation

benax-se
Copy link
Contributor

@benax-se benax-se commented Oct 28, 2022

Description

An implementation of #2372
closes #2372

Additional context

None


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@benax-se benax-se force-pushed the use-geolocation-start-stop-controls branch from 592e87a to 5975465 Compare October 28, 2022 22:49
@benax-se benax-se closed this Oct 28, 2022
@benax-se benax-se reopened this Oct 28, 2022
@benax-se benax-se changed the title feat(useGeolocation): start and stop controls feat(useGeolocation): pause and resume controls Oct 28, 2022
@benax-se benax-se force-pushed the use-geolocation-start-stop-controls branch from 5975465 to d8db38f Compare October 29, 2022 15:13
@GODLiangCY GODLiangCY mentioned this pull request Oct 31, 2022
9 tasks
@antfu antfu merged commit 2c4fdcd into vueuse:main Nov 8, 2022
@@ -7,7 +7,9 @@ import type { ConfigurableNavigator } from '../_configurable'
import { defaultNavigator } from '../_configurable'
import { useSupported } from '../useSupported'

export interface UseGeolocationOptions extends Partial<PositionOptions>, ConfigurableNavigator {}
export interface UseGeolocationOptions extends Partial<PositionOptions>, ConfigurableNavigator {
immediate?: boolean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this doing anything? I don't see it being used

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the code in #2372

We are missing:

if (immediate)
    resume()

so resume() is not always directly called. I can make a PR as I need that feature.

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

Successfully merging this pull request may close these issues.

Control for useGeolocation()
4 participants