Closed GoogleCodeExporter closed 8 years ago
If you say it's not defined in svgcanvas class then it's probably not meant for
public consumption? It sure looks deliberately overwritten (return old
function).
What is your usecase? You can use svgCanvas.runExtensions() to broadcast events
from within your extension, and you can already listen to events so I'm not
sure why you need to bind?
Original comment by asyazwan
on 3 Apr 2012 at 1:12
My use case is loading an SVG image via the 'url' query parameter, and have an
extension notified when it arrives to parse it and do something.
I've now switched to doing this via the standard extension mechanism listening
to 'elementChanged' and checking if '#svgcontent" is among the changed
elements. That works. Thanks for the hint.
I don't know if a 'loaded' event would make sense. Also, I suspect that it
works for me because of the network latency of getting the SVG file, but there
is no guarantee that the extensions are loaded before the file.
Original comment by mor...@wissenba.ch
on 3 Apr 2012 at 2:27
That's a valid concern, but I do believe svg-editor.js make use of .ready() to
load from URL and extensions may run even before that. See the comments on
svg-editor.js:4850
// Note that we don't want this on Editor.ready since some extensions
// may want to run before then (like server_opensave).
Original comment by asyazwan
on 4 Apr 2012 at 5:31
Looks like it. That renders this issue resolved as far as I'm concerned. Thanks
for the help!
Original comment by mor...@wissenba.ch
on 4 Apr 2012 at 11:30
Original comment by asyazwan
on 4 Apr 2012 at 1:39
Original issue reported on code.google.com by
mor...@wissenba.ch
on 2 Apr 2012 at 4:35