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

Add API for getting and setting the progress #24

Merged
merged 3 commits into from
Sep 26, 2024
Merged

Add API for getting and setting the progress #24

merged 3 commits into from
Sep 26, 2024

Conversation

hirasso
Copy link
Owner

@hirasso hirasso commented Sep 26, 2024

Description

Add an API for getting and setting the scroll progress:

// getter
const progress = mirror.progress;
// setter
mirror.progress = {x: 0, y: 0.5};
// ...or only change one direction
mirror.progress = {y: 0.5};
// ...or, for both directions at once
mirror.progress = 0.5;

Checks

  • The PR is submitted to the main branch
  • The code was formatted before pushing (npm run format)
  • All tests are passing (npm run test)
  • New or updated tests are included
  • The documentation was updated as required

Additional information

Copy link

netlify bot commented Sep 26, 2024

Deploy Preview for scrollmirror ready!

Name Link
🔨 Latest commit 90e88a9
🔍 Latest deploy log https://app.netlify.com/sites/scrollmirror/deploys/66f56e4ad7034000088ea613
😎 Deploy Preview https://deploy-preview-24--scrollmirror.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hirasso hirasso merged commit 8afc66e into main Sep 26, 2024
5 checks passed
@hirasso hirasso deleted the feat/progress branch September 26, 2024 14:25
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.

1 participant