Swipe: VI update and swipe speed has been changed
authorhjnim.kim <hjnim.kim@samsung.com>
Fri, 21 Dec 2012 07:03:33 +0000 (16:03 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Fri, 4 Jan 2013 11:19:31 +0000 (20:19 +0900)
VI has been added( Swipe-item opacity is changed, open(from 0 to 1), close(from 1 to 0) )
Swipe animation speed has been changed( "fast" -> "normal" )

Change-Id: I5bdf0772e88dfb7ec0a5a6b0d0338d1fb373aa9f
Signed-off: Hyunjung Kim <hjnim.kim@samsung.com>

src/themes/tizen/common/jquery.mobile.tizen.swipe.less
src/widgets/swipe/js/jquery.mobile.tizen.swipe.js

index 39f5c68..2172be8 100755 (executable)
@@ -13,7 +13,7 @@
        -moz-user-select: none;
        -webkit-user-select: none;
        -user-select: none;
-
+       opacity: 0;
        text-align : center;
 
        .ui-btn {
index 776667d..62ce7cd 100644 (file)
                        item = this.element.find(':jqmData(role="swipe-item")');
 
                        this._covers = covers;
+                       this._item = item;
                        item.addClass('ui-swipe-item');
                        coverTheme = defaultCoverTheme;
                        itemHasThemeClass = item.parent().attr('class')
 
                                if ( !( cover.data('animateRight') && cover.data('animateLeft') ) ) {
                                        cover.data('animateRight', function () {
-                                               self._animateCover( cover, 110 );
+                                               self._animateCover( cover, 110, item );
                                        });
 
                                        cover.data('animateLeft', function () {
-                                               self._animateCover( cover, 0 );
+                                               self._animateCover( cover, 0, item );
                                        });
                                }
 
                //
                // once the cover animation is done, the cover emits an
                // animationComplete event
-               _animateCover: function ( cover, leftPercentage ) {
+               _animateCover: function ( cover, leftPercentage, item ) {
                        var self = this,
                                animationOptions = {
                                        easing: 'linear',
-                                       duration: 'fast',
+                                       duration: 'normal',
                                        queue: true,
                                        complete: function () {
                                                cover.trigger('animationComplete');
                        cover.stop();
                        cover.clearQueue();
                        cover.trigger('animationStart');
-                       cover.animate( {left: leftPercentage + '%'}, animationOptions );
+                       cover.animate( { left: leftPercentage + '%' }, animationOptions );
+                       if ( leftPercentage == 0 ) {
+                               item.animate({ opacity: 0 }, "slow");
+                       } else {
+                               item.animate({ opacity: 1 }, "slow");
+                       }
+
                },
 
                destroy: function () {
 
                        $( self._covers ).each( function () {
                                var cover = $( this );
-                               self._animateCover( cover, 110 );
+                               self._animateCover( cover, 110, self._item);
                        } );
                },
 
 
                        $( self._covers ).each( function () {
                                var cover = $( this );
-                               self._animateCover( cover, 0 );
+                               self._animateCover( cover, 0, self._item);
                        } );
                }