From 40d7e870fa29aaee871da66c40d53b0409aa0006 Mon Sep 17 00:00:00 2001 From: erikwett Date: Mon, 9 Oct 2017 08:31:20 +0200 Subject: [PATCH] Support snapshot and export Also avoid circular structures to make JSON.stringify work (needed for snapshot creation) --- d3-vis-library/d3-vis-library.js | 6 ++++-- d3-vis-library/js/senseUtils.js | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/d3-vis-library/d3-vis-library.js b/d3-vis-library/d3-vis-library.js index ee0e2c9..02528fd 100644 --- a/d3-vis-library/d3-vis-library.js +++ b/d3-vis-library/d3-vis-library.js @@ -61,8 +61,10 @@ define(["jquery", "./js/d3.min", "./js/senseD3utils", "./js/senseUtils", "./libr } } }, - snapshot: { - canTakeSnapshot: true + support: { + snapshot: true, + export: true, + exportData:true }, paint: function($element, layout) { var self = this; diff --git a/d3-vis-library/js/senseUtils.js b/d3-vis-library/js/senseUtils.js index 0ecc7ae..7fc9292 100644 --- a/d3-vis-library/js/senseUtils.js +++ b/d3-vis-library/js/senseUtils.js @@ -371,10 +371,10 @@ var senseUtils = { }; for (var i = 0; i