-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
bbox only returns 0 for path #127
Comments
First thing that comes to my mind is that you never attach the svg to the Dom. So put a Since it's an svg document anyway, Anything fixed by that? |
Thank you for the reply. No luck with adding the suggested lines. Not sure if the way I found formatting them for NodeRed to accept them without throwing an error is fully correct. I did see a little difference in the console output when running my document.getElementById('testPath') where without the last recommended I see "null" while with I see "[object object]" NodeRed 4.03 NOTE When I tested bbox with my same path in JSFiddle, I did get good bbox results. Is there anything more I can provide from my setup that might help shed light on the issue? This is the way I tested it:
|
If svgDOM is loading as an ESM module (I am not sure if it is or not with my limited understanding), a note I found from one of NodeRed's developers may be relevant:
taken from the very tail end of here: |
Please get in contact with me via mail (listed in my profile). I think this needs some more context |
I am hacking away at getting svgdom and svg.js to work within the Node-Red environment. The bbox() does not like to return any values besides zero. Same with center and anything else that looks at position. A simple rectangle does appear to work with bbox.
dx, dy, and others also do not function with these paths.
The paths tested were originally made in inkscape.
From inside the function node within Node-Red ide:
use the setup tab to import/require any external js
my troubled code
Thanks for the very impressive js projects! I look forward to seeing them crank through my workload after I figure out what I am probably doing wrong.
The text was updated successfully, but these errors were encountered: