From ee7b4d5abbf6fa801eb13b936ad25d8b3dcecdf3 Mon Sep 17 00:00:00 2001 From: Felix Gnass Date: Wed, 21 Mar 2012 15:42:37 +0100 Subject: [PATCH] Don't overwrite the prototype to preserve the constructor property. Instead of restoring the property (as suggested in the pull request) this patch uses the existing `merge` function in order to reduce the file size. Fixes #61 --- spin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spin.js b/spin.js index 9440da4..3e30613 100644 --- a/spin.js +++ b/spin.js @@ -144,7 +144,7 @@ }; Spinner.defaults = {}; - Spinner.prototype = { + merge(Spinner.prototype, { spin: function(target) { this.stop(); var self = this; @@ -227,7 +227,7 @@ opacity: function(el, i, val) { if (i < el.childNodes.length) el.childNodes[i].style.opacity = val; } - }; + }); ///////////////////////////////////////////////////////////////////////// // VML rendering for IE