From 46899ad251d56a465b59854c4ebe808d31d91715 Mon Sep 17 00:00:00 2001 From: Benjamin Besse Date: Mon, 25 Nov 2013 11:02:19 +0100 Subject: [PATCH] + elem.data() return all data if no params were bounds --- src/svg.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/svg.js b/src/svg.js index aaab05a..54bcd49 100644 --- a/src/svg.js +++ b/src/svg.js @@ -2241,6 +2241,10 @@ function arrayFirstValue(arr) { \*/ elproto.data = function (key, value) { var data = eldata[this.id] = eldata[this.id] || {}; + if (arguments.length == 0){ + eve("snap.data.get." + this.id, this, data, null); + return data; + } if (arguments.length == 1) { if (Snap.is(key, "object")) { for (var i in key) if (key[has](i)) {