Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions widget/lib/jquery.ui.rcarousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,19 @@
self._loadElements( _page, "prev" );

// calculate the distance
_dist = options.width * _page.length + ( options.margin * _page.length );
// _dist = options.width * _page.length + ( options.margin * _page.length ); //fix by progmax

if (options.orientation === "horizontal") {
// calculate the distance
_dist = options.width * _page.length + ( options.margin * _page.length);//fix by progmax
_animOpts = {scrollLeft: 0};
$root.scrollLeft( _dist );
$root.scrollLeft( _dist);
} else {
// calculate the distance
_dist = options.height * _page.length + ( options.margin * _page.length);//fix by progmax

_animOpts = {scrollTop: 0};
$root.scrollTop( _dist );
$root.scrollTop( _dist);
}

$root
Expand Down Expand Up @@ -593,11 +598,16 @@
this._loadElements( _page, "next" );

// calculate the distance
_dist = options.width * _page.length + ( options.margin * _page.length );
// _dist = options.width * _page.length + ( options.margin * _page.length ); //fix by progmax

if ( options.orientation === "horizontal" ) {
if ( options.orientation === "horizontal") {
// calculate the distance
_dist = options.width * _page.length + ( options.margin * _page.length); //fix by progmax
_animOpts = {scrollLeft: "+=" + _dist};

} else {
// calculate the distance
_dist = options.height * _page.length + ( options.margin * _page.length); //fix by progmax
_animOpts = {scrollTop: "+=" + _dist};
}

Expand Down