Swipe: event name error has been fixed
authorhjnim.kim <hjnim.kim@samsung.com>
Wed, 16 Jan 2013 04:32:51 +0000 (13:32 +0900)
committerYoumin Ha <youmin.ha@samsung.com>
Thu, 17 Jan 2013 08:48:33 +0000 (17:48 +0900)
Swipe animation event name error has been fixed ( animationstart, end )

Change-Id: Ie58248f9b5dfb9374dc54d19819ec79cb787b1c3

demos/tizen-winsets/widgets/list/list-swipe.html
src/widgets/swipe/js/jquery.mobile.tizen.swipe.js

index afb0f20..cd51ab3 100755 (executable)
@@ -1,13 +1,21 @@
 <div data-role="page" id="genlist-swipe" data-add-back-btn="true">
        <script type="text/javascript">
-               var openSwipe = function()
-               {
+               var openSwipe = function() {
                        $("#sw").swipe("open");
                }
-               var closeSwipe = function()
-               {
+               var closeSwipe = function() {
                        $("#sw").swipe("close");
                }
+
+               $("#covertest").bind("animationstart", function (ev) {
+                       console.log("Swipe cover's animation is start.");
+               });
+
+               $("#covertest").bind("animationend", function (ev) {
+                       console.log("Swipe cover's animation is complete.");
+               });
+
+
        </script>
        <div data-role="header" data-position="fixed">
                <h1>Swipe lists</h1>
                                        </div>
                                </li>
                                <li data-role="swipe" id="sw">
-                                       <div data-role="swipe-item-cover">
+                                       <div data-role="swipe-item-cover" id="covertest">
                                                Test API - Swipe2
                                        </div>
-                                       <div data-role="swipe-item">
+                                       <div data-role="swipe-item" >
                                                <div data-role="button" data-inline="true">Twitter</div>
                                                <div data-role="button" data-inline="true">Facebook</div>
                                        </div>
index 62ce7cd..58cb40d 100644 (file)
                                        duration: 'normal',
                                        queue: true,
                                        complete: function () {
-                                               cover.trigger('animationComplete');
+                                               cover.trigger('animationend');
                                        }
                                };
 
 
                        cover.stop();
                        cover.clearQueue();
-                       cover.trigger('animationStart');
+                       cover.trigger('animationstart');
                        cover.animate( { left: leftPercentage + '%' }, animationOptions );
                        if ( leftPercentage == 0 ) {
                                item.animate({ opacity: 0 }, "slow");