Closed wmadam closed 5 years ago
Select does not work (yet) for version 3. Anyway, why are you using 3.0.2 when there is 3.0.12 available? Additionally you kinda use it wrong but thats not your fault because the docs are not up to date. Visit the issue tracker for more info or join the chat at gitter or see examples at twitter
Could you elaborate more? Either link to the "issue tracker" or suggest a workaround. Is there another "issue tracker" besides the Github Issues? If there's related issue or PR or Project, I cannot find it.
Edit: Issues #948 and #954 have useful documentation for transitioning from 2.x to 3.x. To replace .select(...)
, try .find(...)
.
Today I finally updated the docs were the new ways to reference svg elements is shown. Basically you have the following possibilities:
var el = SVG(selector) // get an elemenet by css selector
var list = SVG.find(selector) // get all elements matched by the selector
var el = group.findOne(selector) // like SVG but inside the group
var list = group.find(selector) // like SVG.find but inside the group
Bug report
Using SVG.js v 3.0.2 now (2.7 before)
I have an SVG inline in my code like
Based on this I am creating a SVG.Element by using
When afterwards creating a circle in that SVG via
It works fine.
But when I try to select an element within the SVG (there is a in the svg) via:
SVG.js tell me `svgRootObj.select is not a function``
What am I doing wrong? When using SVG.js 2.x it worked fine.