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
I've got things working for several d3 generated svgs but it only works in Chrome. After some debugging I'm finding that the callbacks are not being fired in IE (11) or Firefox (43.0.4) on Windows. For example, I am calling download which calls toImg and passes in a callback function but that callback function never fires. This is true for all of the callbacks. I have attempted to set breakpoints in dev tools and also added some console.logs in the callbacks that confirmed this.
I will continue to do debug and if I come up with a fix I'll do what I can to implement it. Meantime, any thoughts here?
The text was updated successfully, but these errors were encountered:
Firefox required that I insert the anchor link into the dom before it would fire the download. Perhaps there's a more elegant solution but adding this to the download function before triggering the click event worked for me (not setting text ensures it isn't visible):
a.href = img.getAttribute('src');
// added this line
document.getElementById("idOfElement").appendChild(a);
a.click();
Thanks @brightrain. I've added support for this Firefox workaround in the latest code. I don't have an IE machine on hand to test, but will take a look when I do.
I've got things working for several d3 generated svgs but it only works in Chrome. After some debugging I'm finding that the callbacks are not being fired in IE (11) or Firefox (43.0.4) on Windows. For example, I am calling
download
which callstoImg
and passes in a callback function but that callback function never fires. This is true for all of the callbacks. I have attempted to set breakpoints in dev tools and also added some console.logs in the callbacks that confirmed this.I will continue to do debug and if I come up with a fix I'll do what I can to implement it. Meantime, any thoughts here?
The text was updated successfully, but these errors were encountered: