-
Notifications
You must be signed in to change notification settings - Fork 44
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 Zoom Level for WebView to Maintain Aspect Ratio on Small Laptop Devices (Desktop) #46
Comments
Thank you for your feedback! Just to clarify, are you asking for a method similar to |
Yes, that is the exact behavior, I need to scale down the webview which means zoom out if the user device width and height are less than the minimum value. I do not think the calculation should be on the webview library side, I believe if we have an option to just scale up and down the webview will be helpful. I hope you find the explanation helpful. Thanks |
Got you! I will add it to our plan, but it may take some time as I have a deadline this month. You are also welcome to submit a PR yourself! |
I have added support for this issue on Android and Desktop. However, I encountered some issues with the iOS implementation and am currently working on resolving them. @DatL4g, could you please review the Desktop implementation first? It is relatively simple, but it has one problem: the zoomLevel can only be set after the page has loaded, which causes a visible shake effect for the user. Do you have any suggestions for resolving this issue? |
Can be fixed if we resolve this #37 (comment) |
@DatL4g I discovered that |
@alirezat775 I have implemented the basic functionality for this issue. However, as mentioned above, there seems to be a problem with the desktop side. Could you review and test it on this branch to see if the problem also exists on your side? |
@KevinnZou, I checked it, and the zoom level problem is the same as you mentioned in the last comment, for testing, I set the zoom level to Scale := 1.2 ^ ZoomLevel; |
@alirezat775 Thank you for your help! I have implemented your formula to fix the issue. Could you please give it a final review before I proceed with opening the PR? |
@KevinnZou Thank you for the Implementation, It works on the zoom-in perfectly, however for the zoom-out, it does not work, I did debug it, and I implemented this code
The issue was |
@alirezat775 Thank you for your help! I have submitted the PR and will release it in the next version. I really appreciate your contribution to this issue! |
The current implementation of WebView in our application does not maintain the correct aspect ratio when viewed on small laptop devices. This leads to a distorted user interface, affecting the usability and overall user experience.
On laptops with smaller screens, the WebView content appears compressed, leading to layout issues and potential loss of UI functionality.
If we have the option to set the zoom level, we can adjust the correct zoom level on small laptop devices.
Thank you in advance
The text was updated successfully, but these errors were encountered: