From 5653f6ff0911b63a07edae792172b14eafbff292 Mon Sep 17 00:00:00 2001 From: jlukic Date: Wed, 4 Feb 2015 18:06:59 -0500 Subject: [PATCH] #1754, Fixes namespace being called out of order in transition init --- RELEASE-NOTES.md | 1 + src/definitions/modules/transition.js | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 95802da97..773f641ec 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -14,6 +14,7 @@ - **All Modules** - Fixed bug where element `destroy` could remove third party events when re-initialized - **Transition** - Transitions with direction now use word order dependency to prevent conflict with component directions, for example `bottom left popup slide down in transition` - **Dropdown** - Upward dropdown now has upward arrow icon +- **Transition** - Fixes bug where `moduleNamespace` was being omitted ### Version 1.8.1 - January 26, 2015 diff --git a/src/definitions/modules/transition.js b/src/definitions/modules/transition.js index 186af5d01..7e3c77cd8 100644 --- a/src/definitions/modules/transition.js +++ b/src/definitions/modules/transition.js @@ -62,23 +62,28 @@ $.fn.transition = function() { initialize: function() { // get full settings - moduleNamespace = 'module-' + namespace; settings = module.get.settings.apply(element, moduleArguments); + + // shorthand className = settings.className; + error = settings.error; metadata = settings.metadata; - animationStart = module.get.animationStartEvent(); - animationEnd = module.get.animationEndEvent(); - animationName = module.get.animationName(); - error = settings.error; - namespace = settings.namespace; + // define namespace eventNamespace = '.' + settings.namespace; instance = $module.data(moduleNamespace) || module; + moduleNamespace = 'module-' + settings.namespace; + + // get vendor specific events + animationEnd = module.get.animationEndEvent(); + animationName = module.get.animationName(); + animationStart = module.get.animationStartEvent(); if(methodInvoked) { methodInvoked = module.invoke(query); } - // no internal method was found matching query or query not made + + // method not invoked, lets run an animation if(methodInvoked === false) { module.verbose('Converted arguments into settings object', settings); module.animate();