- Fix (image export) Export in Chrome; fixes #282

This commit is contained in:
Brett Zamir
2018-09-13 18:23:53 +08:00
parent 0688b9af60
commit c0ea00d36b
3 changed files with 10 additions and 5 deletions

View File

@@ -2745,6 +2745,7 @@ function build (opts) {
};
svg.loadXmlDoc = function (ctx, dom) {
let res;
svg.init(ctx);
const mapXY = function (p) {
@@ -2888,7 +2889,7 @@ function build (opts) {
// render if needed
if (needUpdate) {
draw();
draw(res);
svg.Mouse.runEvents(); // run and clear our events
}
}, 1000 / svg.FRAMERATE);
@@ -2896,7 +2897,9 @@ function build (opts) {
if (svg.ImagesLoaded()) {
waitingForImages = false;
draw(resolve);
return;
}
res = resolve;
});
};