From a0ba49ea5dbd5d7226c897ade5ed57cc88e5fcb1 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Tue, 17 May 2016 02:56:25 +0200 Subject: [PATCH] Use reviver also for background and overlay image in svg export (#2975) * Use reviver also for background and overlay image --- src/static_canvas.class.js | 8 ++++---- test/unit/path.js | 2 +- test/unit/path_group.js | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/static_canvas.class.js b/src/static_canvas.class.js index 4c9d1da3b9f..4a23a2fb40b 100644 --- a/src/static_canvas.class.js +++ b/src/static_canvas.class.js @@ -1219,12 +1219,12 @@ this._setSVGHeader(markup, options); this._setSVGBgOverlayColor(markup, 'backgroundColor'); - this._setSVGBgOverlayImage(markup, 'backgroundImage'); + this._setSVGBgOverlayImage(markup, 'backgroundImage', reviver); this._setSVGObjects(markup, reviver); this._setSVGBgOverlayColor(markup, 'overlayColor'); - this._setSVGBgOverlayImage(markup, 'overlayImage'); + this._setSVGBgOverlayImage(markup, 'overlayImage', reviver); markup.push(''); @@ -1309,9 +1309,9 @@ /** * @private */ - _setSVGBgOverlayImage: function(markup, property) { + _setSVGBgOverlayImage: function(markup, property, reviver) { if (this[property] && this[property].toSVG) { - markup.push(this[property].toSVG()); + markup.push(this[property].toSVG(reviver)); } }, diff --git a/test/unit/path.js b/test/unit/path.js index 688026bf2f7..1422e92ffcc 100644 --- a/test/unit/path.js +++ b/test/unit/path.js @@ -105,7 +105,7 @@ asyncTest('toSVG', function() { makePathObject(function(path) { ok(typeof path.toObject == 'function'); - deepEqual(path.toSVG(), '\n'); + deepEqual(path.toSVG(), '\n'); start(); }); }); diff --git a/test/unit/path_group.js b/test/unit/path_group.js index 03ff3afd7df..f934a457a41 100644 --- a/test/unit/path_group.js +++ b/test/unit/path_group.js @@ -34,13 +34,13 @@ }; var REFERENCE_PATH_GROUP_SVG = '\n' + - '\t\n' + - '\t\n' + + '\t\n' + + '\t\n' + '\n'; var REFERENCE_PATH_GROUP_SVG_WITH_MATRIX = '\n' + - '\t\n' + - '\t\n' + + '\t\n' + + '\t\n' + '\n'; function getPathElement(path) {