From afc7e15fdb99e151abbf736f81660b4f31b42f5c Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Wed, 14 Aug 2013 20:59:05 +0200 Subject: [PATCH] Fixes issue #331 - "jquery.hammer.js can't used in requirejs" --- dist/hammer.js | 2 +- dist/jquery.hammer.js | 4 ++-- plugins/jquery.hammer.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/hammer.js b/dist/hammer.js index becb29a61..fc271a34f 100644 --- a/dist/hammer.js +++ b/dist/hammer.js @@ -1421,7 +1421,7 @@ Hammer.gestures.Release = { // some AMD build optimizers, like r.js, check for specific condition patterns like the following: if(typeof define == 'function' && typeof define.amd == 'object' && define.amd) { // define as an anonymous module - define(function() { + define('hammer', function() { return Hammer; }); } diff --git a/dist/jquery.hammer.js b/dist/jquery.hammer.js index f4b36b637..ac565bf60 100644 --- a/dist/jquery.hammer.js +++ b/dist/jquery.hammer.js @@ -1421,7 +1421,7 @@ Hammer.gestures.Release = { // some AMD build optimizers, like r.js, check for specific condition patterns like the following: if(typeof define == 'function' && typeof define.amd == 'object' && define.amd) { // define as an anonymous module - define(function() { + define('hammer', function() { return Hammer; }); } @@ -1547,7 +1547,7 @@ else { if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) { - define(["hammer", "jquery"], init); + define('hammer-jquery', ['hammer', 'jquery'], init); } else { init(window.Hammer, window.jQuery || window.Zepto); } diff --git a/plugins/jquery.hammer.js b/plugins/jquery.hammer.js index 17a749b0c..1f504457c 100644 --- a/plugins/jquery.hammer.js +++ b/plugins/jquery.hammer.js @@ -110,7 +110,7 @@ if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) { - define(["hammer", "jquery"], init); + define('hammer-jquery', ['hammer', 'jquery'], init); } else { init(window.Hammer, window.jQuery || window.Zepto); }