| 1 | define([ |
| 2 | "dojo/_base/Deferred", |
| 3 | "dojo/_base/config" |
| 4 | ], function(Deferred, config){ |
| 5 | /*===== |
| 6 | return { |
| 7 | // summary: |
| 8 | // This is the wrapper module which loads |
| 9 | // dojox/css3/transit conditionally. If mblCSS3Transition |
| 10 | // is set to 'dojox/css3/transit', it will be loaded as |
| 11 | // the module to conduct view transitions, otherwise this module returns null. |
| 12 | }; |
| 13 | =====*/ |
| 14 | if(config.mblCSS3Transition){ |
| 15 | //require dojox/css3/transit and resolve it as the result of transitDeferred. |
| 16 | var transitDeferred = new Deferred(); |
| 17 | require([config.mblCSS3Transition], function(transit){ |
| 18 | transitDeferred.resolve(transit); |
| 19 | }); |
| 20 | return transitDeferred; |
| 21 | } |
| 22 | return null; |
| 23 | }); |