Fastscroll: popup position has been changed
authorhjnim.kim <hjnim.kim@samsung.com>
Sun, 20 Jan 2013 04:01:30 +0000 (13:01 +0900)
committerYoumin Ha <youmin.ha@samsung.com>
Tue, 22 Jan 2013 05:26:05 +0000 (14:26 +0900)
Fastscroll popup offset calculate method has been changed
( Pure javascript -> CSS + javascript )

Change-Id: If4468bb5aa56391f8308b81ccc94208d7363c8a9

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

index 1ef422a..94d15d1 100755 (executable)
@@ -84,6 +84,8 @@
        font-weight: bold;
        display:none;
        box-sizing:border-box;
+       left: 50%;
+       top: 50%;
 }
 
 li.ui-fastscroll-hover {
index f952307..45e82ea 100755 (executable)
@@ -90,8 +90,8 @@
                        this.shortcutsList = $( '<ul></ul>' );
 
                        // popup for the hovering character
-                       this.shortcutsContainer.append($( '<div class="ui-fastscroll-popup"></div>' ) );
-                       $popup = this.shortcutsContainer.find( '.ui-fastscroll-popup' );
+                       this.scrollview.append($( '<div class="ui-fastscroll-popup"></div>' ) );
+                       $popup = this.scrollview.find( '.ui-fastscroll-popup' );
 
                        this.shortcutsContainer.append( this.shortcutsList );
                        this.scrollview.append( this.shortcutsContainer );
                                dstOffset = self.scrollview.offset();
                                $popup
                                        .text( $( divider ).text() )
-                                       .offset( { left : dstOffset.left + ( self.scrollview.width()  - $popup.width() ) / 2,
-                                                               top  : dstOffset.top  + ( self.scrollview.height() - $popup.height() ) / 2 } )
+                                       .css( { marginLeft: -($popup.width() / 2),
+                                                       marginTop: -($popup.height() / 2) } )
                                        .show();
                        };