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

Zooming using the mouse wheel on a SVG file with Webview2 doesn't work #1766

Closed
Tomoko1 opened this issue Dec 8, 2023 · 18 comments
Closed
Assignees
Milestone

Comments

@Tomoko1
Copy link

Tomoko1 commented Dec 8, 2023

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:

  1. Open a SVG file with the setting "Use Webview2 for viewing SVG format" enabled
  2. 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
zoomin
After zooming in with the mouse wheel twice
zoomin2

Additional context:

I have "Use smooth zooming" enabled, but a similar bug happens with this setting disabled too.

@d2phap
Copy link
Owner

d2phap commented Dec 12, 2023

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 to true, and save the igconfig.json file
  • Run IG 9 again, press Ctrl+Shift+I to open WebView2 DevTool
  • Go to "Console" tab of DevTool, capture it

image

@Tomoko1
Copy link
Author

Tomoko1 commented Dec 12, 2023

Hello.
Here's a screen of the console (I zoomed in twice with the mouse wheel and then tried to zoom out once)
zoom1
Here's also a screen of the console when I zoom out with the buttons in the toolbar.
zoom2

@VOOM108
Copy link

VOOM108 commented Jan 2, 2024

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.

@DanRotaru
Copy link

Same issue for long time🫥

@Koushakur
Copy link

Koushakur commented Feb 20, 2024

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

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

@triget
Copy link

triget commented Jun 13, 2024

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.

image

@triget
Copy link

triget commented Jun 28, 2024

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.

@d2phap
Copy link
Owner

d2phap commented Jun 28, 2024

@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.

image

@triget
Copy link

triget commented Jun 29, 2024

@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.

test.zip

Unfortunately, there are now issues with some elements. Look at how the letter S appears compared to the T next to it.

problem

@d2phap
Copy link
Owner

d2phap commented Jun 29, 2024

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:

Recording.2024-06-29.203828.mp4

@d2phap
Copy link
Owner

d2phap commented Jun 29, 2024

@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)

  1. Open your SVG file with ImageGlass
  2. Scroll down your mouse 3 times (or 3 scrolls)
  3. Close the app, go to IG_SVG_Debug and copy the log file, attach here

Scenario 2: Mouse Scroll Up (Slow)

  1. Open your SVG file with ImageGlass
  2. Scroll up your mouse 3 times (or 3 scrolls)
  3. Close the app, go to IG_SVG_Debug and copy the log file, attach here

Scenario 3: Mouse Scroll Down (Fast)

  1. Open your SVG file with ImageGlass
  2. Make long Scroll down your mouse multiple times
  3. Close the app, go to IG_SVG_Debug and copy the log file, attach here

Scenario 4: Mouse Scroll Up (Fast)

  1. Open your SVG file with ImageGlass
  2. Make long Scroll up your mouse multiple times
  3. Close the app, go to IG_SVG_Debug and copy the log file, attach here

Scenario 5: Mouse Scroll Down + Up

  1. Open your SVG file with ImageGlass
  2. Scroll your mouse in any direction multiple times
  3. Close the app, go to IG_SVG_Debug and copy the log file, attach here

Scenario 6: Use Trackpad

  1. Open your SVG file with ImageGlass
  2. Slowly move 2 fingers down on the trackpad
  3. Slowly move 2 fingers up on the trackpad
  4. 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!

@triget
Copy link

triget commented Jun 30, 2024

@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.

scenario.zip

I have attached a video recorded on your test build @d2phap

bug.mp4

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 :)

@d2phap
Copy link
Owner

d2phap commented Jun 30, 2024

@triget Thanks a lot!
I have been on a trip so I will try to check & get back to you when I have time.

@d2phap
Copy link
Owner

d2phap commented Jun 30, 2024

OK, I managed to reproduce it. This issue happens when your Decimal symbol is not .

image

@triget
Copy link

triget commented Jul 1, 2024

@d2phap Can you manage to fix this? Not everywhere can the decimal symbol be used as a dot.

@d2phap d2phap added this to the v9.1.8 milestone Jul 1, 2024
@d2phap d2phap removed the help wanted label Jul 1, 2024
@d2phap
Copy link
Owner

d2phap commented Jul 1, 2024

@Tomoko1
Copy link
Author

Tomoko1 commented Jul 2, 2024

I can confirm that the issue has been fixed for me in that build 😇💖

@d2phap d2phap pinned this issue Jul 9, 2024
@d2phap
Copy link
Owner

d2phap commented Jul 22, 2024

Fixed in ImageGlass 9.1.8.723

@d2phap d2phap closed this as completed Jul 22, 2024
@d2phap d2phap unpinned this issue Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants