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
Its all good and onscreen. Then I attempt to resize it using: ltk.find("#baserect").attr("width", width)
But no go for reasons below.
However it can be done by using the regular dom: ltk.window.document.querySelector("#baserect").setAttribute('width', width)
Jquery has uneven support for SVG. (There is an svg extension for jquery though which make some overrides. Not sure if its in Jquery 3 by default).
I note that when attempting to modify (say) the width of an svg rectangle (using its id), you get:
an object of type = SVGAnimatedLength with roughly this structure:
Clearly using this could be good because we could animate with it.
I'm not sure if ALL browsers return the same thing but can the ltk take advantage if it does ??
Halfway down this page is some discussion on this class and Jquery3
I was trying to change the width of an svg rect I'd made.:
Made it like:
Its all good and onscreen. Then I attempt to resize it using:
ltk.find("#baserect").attr("width", width)
But no go for reasons below.
However it can be done by using the regular dom:
ltk.window.document.querySelector("#baserect").setAttribute('width', width)
Jquery has uneven support for SVG. (There is an svg extension for jquery though which make some overrides. Not sure if its in Jquery 3 by default).
I note that when attempting to modify (say) the width of an svg rectangle (using its id), you get:
an object of type =
SVGAnimatedLength
with roughly this structure:Clearly using this could be good because we could animate with it.
I'm not sure if ALL browsers return the same thing but can the ltk take advantage if it does ??
Halfway down this page is some discussion on this class and Jquery3
The text was updated successfully, but these errors were encountered: