handler: bug fix (regarding enableHandler function )
authorWonseop Kim <wonseop.kim@samsung.com>
Mon, 28 Jan 2013 07:27:02 +0000 (16:27 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Mon, 28 Jan 2013 12:58:10 +0000 (21:58 +0900)
Handler was fixed a bug that sometimes appeared when it enabled by enableHandler function.

Change-Id: If46dd062ad48755fbe1e80ecfdf12d844f7b2bd9

src/themes/tizen/common/jquery.mobile.tizen.scrollview.handler.less
src/widgets/handler/js/jquery.tizen.scrollview.handler.js

index e0ff36a..bdcb4d4 100644 (file)
@@ -5,6 +5,11 @@
 .ui-handler {
        position : absolute;
        overflow : hidden;
+       opacity: 0;
+}
+
+.ui-handler-visible {
+  opacity: 1;
 }
 
 .ui-handler-direction-y {
index 84afd6e..1f47734 100644 (file)
                                        moveTimer = undefined;
                                }
 
-                               handlerThumb.addClass( "ui-handler-visible" )
-                                                       .stop( true, true )
-                                                       .fadeIn( 'fast' );
+                               handler.addClass( "ui-handler-visible" );
+                               handlerThumb.stop( true, true )
+                                                       .fadeIn();
                        }).bind( "scrollupdate", function ( event, data ) {
                                if ( !scrollview.enableHandler() || viewLength < 0 || clipLength < handlerHeight ) {
                                        return;
                                }
                                scrollview._handlerTimer = setTimeout( function () {
                                        if ( scrollview._timerID === 0 && $view.moveData === null ) {
-                                               handlerThumb.removeClass( "ui-handler-visible" )
-                                                                       .stop( true, true )
+                                               handlerThumb.stop( true, true )
                                                                        .css( "opacity", 1.0 )
-                                                                       .fadeOut( 'fast' );
+                                                                       .fadeOut( function () {
+                                                                               handler.removeClass( "ui-handler-visible" );
+                                                                       });
                                                scrollview._handlerTimer = 0;
                                        }
                                }, 1000 );
                        }).bind( "mousewheel", function ( event ) {
-                               handlerThumb.removeClass( "ui-handler-visible" ).hide();
+                               handler.removeClass( "ui-handler-visible" );
                                setHanderPostion( scrollview.getScrollPosition() );
                        });
                };
                                $view.find( ".ui-scrollbar" ).hide();
                                $view.find( ".ui-handler" ).show();
                        } else {
-                               $view.find( ".ui-handler" ).hide();
+                               $view.find( ".ui-handler" ).removeClass( "ui-handler-visible" ).hide();
                                $view.find( ".ui-scrollbar" ).show();
                        }
                },