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

Ability to get reach the parent element #40

Closed
ctzurcanu opened this issue May 24, 2013 · 2 comments
Closed

Ability to get reach the parent element #40

ctzurcanu opened this issue May 24, 2013 · 2 comments
Labels

Comments

@ctzurcanu
Copy link

I am not sure if you can do that technically, but I would love to use it. maybe when:

draw_obj.parent
to create a svg js object with the DOM parent of the draw_obj element..
this is symmetric to your interface for iterating over children.

@wout
Copy link
Member

wout commented May 24, 2013

Do you mean this?

var draw = SVG('canvas')

console.log(draw.parent.id)
// => will return 'canvas'

@ctzurcanu
Copy link
Author

in fact you do have access to parent, was just missing from documentation or I missed it. in DOM it is called parentNode so.. this should be documented if not. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants