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

Is there any way to make the QR Code size responsive without workarounds? #27

Open
fbueckle opened this issue Jul 14, 2021 · 1 comment

Comments

@fbueckle
Copy link

Resizing the qr-code element using view port height/width is not working. The DOM element is reduced but the actually displayed code will remain the same size no matter what happens.

I would probably be able to resize the qr-code every time that the size of the window changes by binding the size to a value in my typescript file but that doesn't sound like a good workaround.

Am i just missing something or is there currently no simple solution to achieve responsiveness?

@mnahkies
Copy link
Owner

I've not given much thought to this so far, but would be interested in improving it.

In the meantime you should be able to use https://material.angular.io/cdk/layout/api#BreakpointObserver to change the size based on the current breakpoint, but I agree this doesn't feel very ergonomic. It's probably a better solution than subscribing directly to window resizing events though.

If you wanted to come up with a solution yourself I'm happy to review and accept PR's

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