From d7e1f819bb7b33686937704a5f309201cadf6101 Mon Sep 17 00:00:00 2001 From: Dmitry Baranovskiy Date: Thu, 15 May 2014 17:04:05 +1000 Subject: [PATCH] =?UTF-8?q?Prepend=20accepts=20set=20=F0=9F=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix for #244 --- src/svg.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/svg.js b/src/svg.js index c25f1e9..395a471 100644 --- a/src/svg.js +++ b/src/svg.js @@ -1448,6 +1448,13 @@ function arrayFirstValue(arr) { \*/ elproto.prepend = function (el) { if (el) { + if (el.type == "set") { + var it = this; + el.forEach(function (el) { + it.prepend(el); + }); + return this; + } el = wrap(el); var parent = el.parent(); this.node.insertBefore(el.node, this.node.firstChild);