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

Set Camera View size and position for each slide or click #1997

Closed
gy-mate opened this issue Dec 30, 2024 · 2 comments
Closed

Set Camera View size and position for each slide or click #1997

gy-mate opened this issue Dec 30, 2024 · 2 comments

Comments

@gy-mate
Copy link
Contributor

gy-mate commented Dec 30, 2024

Is your feature request related to a problem? Please describe.

I'd like to maximize the Camera View size on each slide or click.

Describe the solution you'd like

A (frontmatter?) setting that would allow me to predefine the Camera View size and position for each slide or click. Furthermore, a cubic-bezier() animation between these states would be nice.

My university teacher @nemethf suggested this after viewing a prerecorded presentation of mine.

Describe alternatives you've considered

Manually moving and resizing the Camera View—unfortunately, this isn't a viable solution when giving a live presentation.

@kermanx
Copy link
Member

kermanx commented Feb 21, 2025

I personally think this feature is too specific and is quite hard to implement in a simple-to-implement and graceful-to-use way. Thus I am afraid that this won't be implemented in Slidev itself. Also, this can be done via an addon/custom setups with something like:

const { currentSlideNo } = useNav()
watch(currentSlideNo, () => {
  const cameraViewElement = ...
  cameraViewElement.style.position = 'fixed'
  cameraViewElement.style.left = '....'
})

@kermanx kermanx closed this as completed Feb 21, 2025
@gy-mate
Copy link
Contributor Author

gy-mate commented Feb 21, 2025

@kermanx Awesome, good to know! Thanks for the answer! :)

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

2 participants