ImageGlass
ImageGlass copied to clipboard
Zooming using the mouse wheel on a SVG file with Webview2 doesn't work
System information:
- Windows OS version: Microsoft Windows NT 10.0.19045.0 64-bit
- ImageGlass version: 9.0.8.1208 (64-bit)
To Reproduce
Steps to reproduce the behavior:
- Open a SVG file with the setting "Use Webview2 for viewing SVG format" enabled
- Attempt to zoom in and out with the mouse wheel
Actual behavior:
I can zoom in or out once on an image but trying to zoom in or out more than that makes the image disappear. Afterwards, making the image reappear is impossible. When zooming in and out, the title bar also shows weird zoom values. Zooming in or out by clicking on the buttons in the toolbar works as expected, but the title bar also shows weird zoom values. (e.g. after zooming out on an image, the title bar shows a zoom value of "731.139.086.026.276.864%")
Expected behavior:
Zooming in and out should work as expected.
Screenshots:
After zooming in with the mouse wheel once
After zooming in with the mouse wheel twice
Additional context:
I have "Use smooth zooming" enabled, but a similar bug happens with this setting disabled too.
Hi @Tomoko1 Can you help me check if there are any error in WebView2. You can follow these steps:
- Open
igconfig.json
in text editor - Close all IG 9 instances
- Set
EnableDebug
totrue
, and save theigconfig.json
file - Run IG 9 again, press Ctrl+Shift+I to open WebView2 DevTool
- Go to "Console" tab of DevTool, capture it
Hello.
Here's a screen of the console (I zoomed in twice with the mouse wheel and then tried to zoom out once)
Here's also a screen of the console when I zoom out with the buttons in the toolbar.
I have the exact same issue. IG 9.0.9.1230 on Win 11. Checking to use Webview2 or not does not make a difference.
Same issue for long timeπ«₯
Still an issue in 9.0.10.201 (64-bit). "Actual size" and "Scale to fit" work, but any manual zoom-in instantly sets it to 10000% zoom. Then, depending on if 'smooth zoom' is on or not, it either only goes between 10000% and 0% (according to the titlebar, actual zoom is closer to 8k?, most definetly not 0%), or with smooth zoom off it goes 10000% -> 8000% -> 6000% -> 4500% -> 0%.
Turning off webview2 and restarting imageglass makes svgs function as a normal rasterized image
Top to bottom it's setting mode to actual size, setting mode to scale to fit, zoom in, then zoom out four times, after which no more zoom out is processed
I conducted a small investigation. When I export a file with the 'Set Viewbox' option from Affinity Designer, I can't zoom in using ImageGlass, but the size always remains at 100%.
When I export the file without this option, the zoom increases to 10000%. I also checked on two other computers where I have ImageGlass, and the effect is the same.
I believe this issue should be treated as a priority because the inability to zoom SVGs eliminates the possibility of using ImageGlass in daily work. In the old version (version 8), there were no such problems. I'm surprised that nothing has been done about this since December 2023.
@triget Can you send your sample SVG file?
You can uncheck this setting to switch to the native SVG renderer (same as v8). This is still on my priority list, but also depends on whether I can reproduce the issue, the difficulty, and my time.
@d2phap I packed the SVG into a .zip file to make it easier to download from GitHub.
Btw. Thank you for the suggestion to switch to native SVG viewing. Now the zoom works.
Unfortunately, there are now issues with some elements. Look at how the letter S appears compared to the T next to it.
Unfortunately, there are now issues with some elements. Look at how the letter S appears compared to the T next to it.
The native renderer is same as v8, it does not support scaling.
I tried opening your SVG file with v9.1.7.627, it works fine:
https://github.com/d2phap/ImageGlass/assets/3154213/f7260038-cacf-486a-a14c-80d9b1c01a1c
@triget Can you help me download & test this build?
It contains logging function to create a log file __ig_web2_log.log
when the app closed.
Please follow these scenarios:
Scenario 1: Mouse Scroll Down (Slow)
- Open your SVG file with ImageGlass
-
Scroll down
your mouse3 times
(or 3 scrolls) - Close the app, go to
IG_SVG_Debug
and copy the log file, attach here
Scenario 2: Mouse Scroll Up (Slow)
- Open your SVG file with ImageGlass
-
Scroll up
your mouse3 times
(or 3 scrolls) - Close the app, go to
IG_SVG_Debug
and copy the log file, attach here
Scenario 3: Mouse Scroll Down (Fast)
- Open your SVG file with ImageGlass
- Make long
Scroll down
your mouse multiple times - Close the app, go to
IG_SVG_Debug
and copy the log file, attach here
Scenario 4: Mouse Scroll Up (Fast)
- Open your SVG file with ImageGlass
- Make long
Scroll up
your mouse multiple times - Close the app, go to
IG_SVG_Debug
and copy the log file, attach here
Scenario 5: Mouse Scroll Down + Up
- Open your SVG file with ImageGlass
- Scroll your mouse in any direction multiple times
- Close the app, go to
IG_SVG_Debug
and copy the log file, attach here
Scenario 6: Use Trackpad
- Open your SVG file with ImageGlass
- Slowly move 2 fingers down on the trackpad
- Slowly move 2 fingers up on the trackpad
- Close the app, go to
IG_SVG_Debug
and copy the log file, attach here
After finishing all the scenarios, you should attach here 6 log files. Thank you!
@d2phap
I have executed scenarios 1-5. I do not have a trackpad (I think this is not a problem). In the scenario where I have to zoom the file, I can only do it once. After zooming in on the file, it immediately reaches 10000% magnification and nothing else can be done. I am attaching a .zip file with logs. If you need anything else, just let me know. I am happy to test/help.
I have attached a video recorded on your test build @d2phap
https://github.com/d2phap/ImageGlass/assets/9076850/2759e745-599c-4185-869b-547b12cf0b0e
If it helps, I am open to scheduling a session on TeamViewer or a similar tool, and you can test things out yourself to see how everything works :)
@triget Thanks a lot! I have been on a trip so I will try to check & get back to you when I have time.
OK, I managed to reproduce it. This issue happens when your Decimal symbol
is not .
@d2phap Can you manage to fix this? Not everywhere can the decimal symbol be used as a dot.
@triget It should be fixed in this build: https://drive.google.com/file/d/1e5y97jKVM7QWR2q5Py1-WsgOEzE93T18/view?usp=sharing
I can confirm that the issue has been fixed for me in that build ππ
Fixed in ImageGlass 9.1.8.723