You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where I expect the text to be centered in the green rectangle for the x axis. I couldn't get it to work with the latest release, but if I go back to a 3.0 release, I get a behavior more in line with what I expect. 3.1.2 fiddle 3.0.10 fiddle
Am I doing something wrong, or is this a bug?
The text was updated successfully, but these errors were encountered:
In order to position text by it supper left corner, svg.js does some number juggling internally. The older version used even more juggling to make percentage values somehow possible. However, we decided to not do that in 3.1.2. Instead, if you only want to set a literal value for x and y you can use amove which is the same as just setting the values via attr.
So just replace move with amove and you are good to go
I've been trying to align some text with percentage coordinates, but have run into some issues. I've done something like this
where I expect the text to be centered in the green rectangle for the x axis. I couldn't get it to work with the latest release, but if I go back to a 3.0 release, I get a behavior more in line with what I expect.
![Screenshot 2023-06-08 20 33 39](https://private-user-images.githubusercontent.com/20884523/244473726-caf77d32-6be6-4896-b76c-5e4f303aa3ee.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyNDUyNjcsIm5iZiI6MTcyMTI0NDk2NywicGF0aCI6Ii8yMDg4NDUyMy8yNDQ0NzM3MjYtY2FmNzdkMzItNmJlNi00ODk2LWI3NmMtNWU0ZjMwM2FhM2VlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE3VDE5MzYwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY5ZWExYjk2ZjkyYTE1OTg4ZGE5OTAyZmU5YmI1NTc1M2ZiYmZmOGVjZjFhNzU0MjVlYjFkMjBmZDlhODVkODgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.G-77mxN-jjtpLbjPKGftONB7vhR5Vl2R7MMHLv5EFnE)
![Screenshot 2023-06-08 20 40 47](https://private-user-images.githubusercontent.com/20884523/244474373-d1226107-cff6-493e-b1ef-97ae3e26a976.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyNDUyNjcsIm5iZiI6MTcyMTI0NDk2NywicGF0aCI6Ii8yMDg4NDUyMy8yNDQ0NzQzNzMtZDEyMjYxMDctY2ZmNi00OTNlLWIxZWYtOTdhZTNlMjZhOTc2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE3VDE5MzYwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ1MzI3NmQ0NmU1YmViYTU1ZTE3YjlkYTMzYTQ5NWJiNDVmNGIwODY3YzZiZWE3NjlkZTc1Mjg4M2U4YTRhMjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.kWdiwAYPk7AR688ZXsSRLCkPl_YxLrZS90qh4aKkZ1E)
3.1.2 fiddle
3.0.10 fiddle
Am I doing something wrong, or is this a bug?
The text was updated successfully, but these errors were encountered: