svgedit icon indicating copy to clipboard operation
svgedit copied to clipboard

Displayed border width is incorrect during resize when zoom is not 100%

Open klesun opened this issue 4 years ago • 0 comments

Describe the bug When you resize an element with a non 100% zoom, stroke width changes until you release the mouse.

To Reproduce Steps to reproduce the behavior:

  1. Open 5.1.0 version of editor or later
  2. Set zoom to something different from 100%, for example 150%
  3. Draw a rectangle
  4. Set border size big enough to notice the effect, for example 55px
  5. Start resizing the rectangle. While mouse is down, you'll see that border becomes 150% thinner than it should be - you can clearly conclude that by the space between editor outline of the element and element actual border.

Expected behavior The border width must not change during resize in any zoom value, not just 100%

SVG-Edit environment (IMPORTANT)

  • File for SVG-Edit: svg-editor.html
  • Version: Tried on 5.1.0 and ea58adbab1b58648771abda096dc32fb43efb42f - both had the issue
  • Protocol: tried http on my local machine and https in https://unpkg.com/[email protected]/editor/svg-editor.html

Desktop (please complete the following information):

  • OS: Windows 10 (also happened on Linux Mint 19.3 and on Mac)
  • Browser Chrome
  • Version 80.0.3987.149

Screenshots

  • Idle state image
  • During resize when mouse is down image

Additional context Looks like border width during resize state rendering ignores zoom value for some reason

klesun avatar Apr 02 '20 19:04 klesun