From bd92fe7fe7a708835dfd5af0037dc4df1ad89a83 Mon Sep 17 00:00:00 2001 From: Andrey Kuzmin Date: Sun, 19 Jan 2014 22:22:48 +0400 Subject: [PATCH] Wrap module in UMD wrapper #15 --- src/dragdealer.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/dragdealer.js b/src/dragdealer.js index 9e60fbf..d6f3dbb 100644 --- a/src/dragdealer.js +++ b/src/dragdealer.js @@ -6,6 +6,16 @@ * http://skidding.mit-license.org */ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory); + } else { + // Browser globals + root.Dragdealer = factory(); + } +}(this, function () { + var Dragdealer = function(wrapper, options) { /** * Drag-based component that works around two basic DOM elements. @@ -757,3 +767,7 @@ var Position = { return [curleft, curtop]; } }; + +return Dragdealer; + +}));