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

use element position error #974

Open
w8w8w8 opened this issue Jun 2, 2024 · 5 comments
Open

use element position error #974

w8w8w8 opened this issue Jun 2, 2024 · 5 comments

Comments

@w8w8w8
Copy link
Contributor

w8w8w8 commented Jun 2, 2024

Load the svg file ,and click some element , the select element postion error

the svg file :
243

@w8w8w8
Copy link
Contributor Author

w8w8w8 commented Jun 2, 2024

1717338068594.mp4

@jfhenon
Copy link
Collaborator

jfhenon commented Jun 2, 2024

I think it is an issue with the "symbol" tag. Can you make a very simple SVG in which the problem occurs?

@jfhenon
Copy link
Collaborator

jfhenon commented Jun 2, 2024

such as this one:

<svg width="512" height="512" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 <!-- Created with SVG-edit - https://github.com/SVG-Edit/svgedit-->
 <defs>
  <symbol id="svg243_76" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
   <rect fill="#FF0000" height="500" id="svg_1" stroke-width="5" width="500" x="0" y="0"/>
  </symbol>
 </defs>
 <g class="layer">
  <title>Layer 1</title>
  <use id="svg243_77" transform="rotate(-90 200 200) matrix(0.1 0 0 0.1 0 0)" x="200" xlink:href="#svg243_76" y="200"/>
 </g>
</svg>

@jfhenon
Copy link
Collaborator

jfhenon commented Jun 13, 2024

I could find a quite simple shape on which the bug occurs. I also tested that this bug unfortunately is also with older version of svgedit (I tested with 5.1 and 3.2).

<svg width="512" height="512" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<!-- Created with SVG-edit - https://github.com/SVG-Edit/svgedit-->
<g class="layer">
<title>Layer 1</title>
<rect fill="#FF0000" height="50" id="svg_2" stroke-width="5" transform="rotate(-45) matrix(0.1 0 0 1 0 0)" width="50" x="100" y="100"/>
</g>
</svg>

I believe this is an issue in svgcanvas in the function recalculateDimensions() of recalculate.js

May not be very easy to fix...all PRs on this subject are very welcome..

@SVG-Edit SVG-Edit deleted a comment from w8w8w8 Jun 13, 2024
jfhenon added a commit that referenced this issue Sep 15, 2024
jfhenon added a commit that referenced this issue Sep 16, 2024
* fix deprecated apple-mobile -web-app-capable
* fix issue #974
* update dependencies
* fix a trailing space for points
* fix issue with tspan recalculation
@jfhenon
Copy link
Collaborator

jfhenon commented Sep 16, 2024

still some issues with this slide. still need work

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

2 participants