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

Zoom Button is wrongly placed #42

Open
andreadada opened this issue May 30, 2023 · 2 comments
Open

Zoom Button is wrongly placed #42

andreadada opened this issue May 30, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@andreadada
Copy link

andreadada commented May 30, 2023

With width <= 597 the Zoom Button takes place behind the last PDF page at the bottom. I've tried to listen to resize and call pdfViewer.hideZoom(true) if width is under 597 but does not work.

Edit:
This bug can be reproduced in the Online Demo too.

Edit 2:
I've tried to set the button z-index to an higer value and now it is sticked on bot (i assume it does what it was supposed to do), But i did only via CSS in the Page Inspector to test. Don't know how to do it in the code.

@paodb paodb added the bug Something isn't working label May 30, 2023
@paodb
Copy link
Collaborator

paodb commented Jul 13, 2023

Hello, the component has a rule to accomodate the zoom button to be at the bottom when the width is < 600 (see method). When the small-size style it's added then the button should appear at the bottom, following these styling rules but that is making the button to be hidden. So, as you already pointed out, the z-index property is missing. The button is moved from the toolbar to make sure the rest of the toolbar buttons are shown correctly (mobile in mind).

If you are using the theme approach to styled your application you can create a vcf-pdf-viewer.css file and add the missing styling. If I add

[part~="toolbar"].small-size [part~="toolbar-zoom"] {
    z-index: 99;
  }

Then the button will look like this:
image

If you're not using the themes approach, you can create a css file as well but use CssImport annotation to import the stylesheet. Like @CssImport(value = "./vcf-pdf-viewer.css, themeFor = "vcf-pdf-viewer").
I will add the missing z-index property but you can use these approaches until the fix is ready.

@paodb
Copy link
Collaborator

paodb commented Aug 30, 2024

Please try version 3.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants