createHandler = function ( target ) {
var $view = target,
prefix = "<div class=\"ui-handler ui-handler-direction-",
- suffix = "\"><div class=\"ui-handler-track\"><div class=\"ui-handler-thumb\"></div></div></div>",
+ suffix = "\"><div class=\"ui-handler-track\"><div class=\"ui-handler-handle\"><div class=\"ui-handler-thumb\"></div></div></div></div>",
scrollview = $view.data( "scrollview" ),
options = scrollview.options,
direction = options.direction,
_$clip = scrollview._$clip,
scrollbar = $view.find( ".ui-scrollbar" ),
handler = null,
- handlerThumb = null,
+ handlerHandle = null,
viewLength = 0,
clipLength = 0,
handlerHeight = 0,
},
setHanderPostion = function ( scrollPos ) {
var handlerPos = Math.round( ( isHorizontal ? scrollPos.x : scrollPos.y ) / viewLength * trackLength );
- handlerThumb[0].style[ ( isHorizontal ? "left" : "top" ) ] = handlerPos + "px";
+ handlerHandle[0].style[ ( isHorizontal ? "left" : "top" ) ] = handlerPos + "px";
},
stopHandlerScroll = function () {
$( document ).unbind( ".handler" );
_$view.trigger( "scrollstop" );
};
- if ( $view.find( ".ui-handler-thumb" ).length !== 0 || typeof direction !== "string" ) {
+ if ( $view.find( ".ui-handler-handle" ).length !== 0 || typeof direction !== "string" ) {
return;
}
handler = $( [ prefix, direction, suffix ].join( "" ) ).appendTo( $view.addClass( " ui-handler-" + theme ) );
- handlerThumb = $view.find( ".ui-handler-thumb" ).attr( {
+ handlerHandle = $view.find( ".ui-handler-handle" ).attr( {
"tabindex" : "0",
"aria-label" : ( isHorizontal ? "Horizontal handler, double tap and move to scroll" : "Verticalhandler, double tap and move to scroll" )
}).hide();
- handlerHeight = ( isHorizontal ? handlerThumb.width() : handlerThumb.height() );
+ handlerHeight = ( isHorizontal ? handlerHandle.width() : handlerHandle.height() );
handlerMargin = ( isHorizontal ? parseInt( handler.css( "right" ), 10 ) : parseInt( handler.css( "bottom" ), 10 ) );
$.extend( $view, {
});
// handler drag
- handlerThumb.bind( dragStartEvt, {
- e : handlerThumb[0]
+ handlerHandle.bind( dragStartEvt, {
+ e : handlerHandle[0]
}, function ( event ) {
scrollview._stopMScroll();
}
handler.addClass( "ui-handler-visible" );
- handlerThumb.stop( true, true )
+ handlerHandle.stop( true, true )
.fadeIn();
}).bind( "scrollupdate", function ( event, data ) {
if ( !scrollview.enableHandler() || viewLength < 0 || clipLength < handlerHeight ) {
}
scrollview._handlerTimer = setTimeout( function () {
if ( scrollview._timerID === 0 && $view.moveData === null ) {
- handlerThumb.stop( true, true )
+ handlerHandle.stop( true, true )
.css( "opacity", 1.0 )
.fadeOut( function () {
handler.removeClass( "ui-handler-visible" );
}
.ui-handler-visible {
- opacity: 1;
+ opacity: 1;
}
.ui-handler-direction-y {
top : 10 * @unit_base_handler;
- right : 10 * @unit_base_handler;
+ right : 0 * @unit_base_handler;
bottom : 10 * @unit_base_handler;
- width : 48 * @unit_base_handler;
+ width : 36 * @unit_base_handler;
}
.ui-handler-direction-x {
right : 10 * @unit_base_handler;
- bottom : 10 * @unit_base_handler;
+ bottom : 0 * @unit_base_handler;
left : 10 * @unit_base_handler;
- height : 48 * @unit_base_handler;
+ height : 36 * @unit_base_handler;
}
.ui-handler-track {
height : 100%;
}
-.ui-handler-thumb {
+.ui-handler-handle {
position : absolute;
top : 0;
left : 0;
+}
+
+.ui-handler-direction-x .ui-handler-handle {
+ width : 234 * @unit_base_handler;
+ height : 36 * @unit_base_handler;
+}
+
+.ui-handler-direction-y .ui-handler-handle {
+ width : 36 * @unit_base_handler;
+ height : 234 * @unit_base_handler;
+}
+
+.ui-handler-thumb {
background-position : center;
background-repeat : no-repeat;
- .LESSborder-radius-all(5 * @unit_base_handler);
+ .LESSborder-radius-all(11 * @unit_base_handler);
}
.ui-handler-direction-y .ui-handler-thumb {
- width : 48 * @unit_base_handler;
- height : 214 * @unit_base_handler;
- background-size : 48 * @unit_base_handler 40 * @unit_base_handler;
+ width : 23 * @unit_base_handler;
+ height : 229 * @unit_base_handler;
+ background-size : 23 * @unit_base_handler 37 * @unit_base_handler;
}
.ui-handler-direction-x .ui-handler-thumb {
/***************************************************************************
Handler
***************************************************************************/
-@color_scrollview_handler_bg : rgba(150, 150, 150, 0.5);
+@color_scrollview_handler_bg : rgba(198, 196, 190, 1);
+@color_scrollview_handler_shadow : rgb(0, 0, 0, 0.5);
/***************************************************************************
/***************************************************************************
Handler
***************************************************************************/
-@color_scrollview_handler_bg : rgba(150, 150, 150, 0.5);
+@color_scrollview_handler_bg : rgba(198, 196, 190, 1);
+@color_scrollview_handler_shadow : rgb(0, 0, 0, 0.5);
/***************************************************************************