From 61a11b4e16b955a231391273e91ffc6ced32fa67 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Fri, 2 Aug 2013 12:03:28 +0200 Subject: [PATCH] Bug fix: Removing item from DocumentNodeElement data caused removing all data - DocumentNodeElement.append was removing wrong attribute but due to bug in DocumentNodeElement.data it went undetected --- modules/documentCanvas/canvas/documentElement.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/documentCanvas/canvas/documentElement.js b/modules/documentCanvas/canvas/documentElement.js index c6c9f22..c38008b 100644 --- a/modules/documentCanvas/canvas/documentElement.js +++ b/modules/documentCanvas/canvas/documentElement.js @@ -154,7 +154,7 @@ $.extend(DocumentNodeElement.prototype, { var dom = this.dom(), args = Array.prototype.slice.call(arguments, 0); if(args.length === 2 && args[1] === undefined) - return dom.removeData(args[1]); + return dom.removeData(args[0]); return dom.data.apply(dom, arguments); }, toXML: function(level) { @@ -227,7 +227,7 @@ $.extend(DocumentNodeElement.prototype, { }, append: function(params) { if(params.tag !== 'span') - this.data('orig-ends', undefined); + this.data('orig-end', undefined); return manipulate(this, params, 'append'); }, before: function(params) { -- 2.20.1