Skip to content
Open
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions src/managers/continuous/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ class ContinuousViewManager extends DefaultViewManager {
this.scrollTo(0, prevTop - bounds.height, true);
} else {
if(this.settings.direction === 'rtl') {
if (!this.settings.fullsize) {
this.scrollTo(prevLeft, 0, true);
} else {
if (this.settings.rtlScrollType === "negative") {
this.scrollTo(prevLeft + Math.floor(bounds.width), 0, true);
} else {
this.scrollTo(prevLeft, 0, true);
}
} else {
this.scrollTo(prevLeft - Math.floor(bounds.width), 0, true);
Expand Down
8 changes: 4 additions & 4 deletions src/managers/default/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,14 @@ class DefaultViewManager {
distY = this.container.scrollHeight - this.layout.delta;
}
}
if(this.settings.direction === 'rtl'){
if(this.settings.direction === 'rtl' && this.settings.rtlScrollType === 'negative'){
/***
the `floor` function above (L343) is on positive values, so we should add one `layout.delta`
to distX or use `Math.ceil` function, or multiply offset.left by -1
before `Math.floor`
*/
distX = distX + this.layout.delta
distX = distX - width
distX = distX + this.layout.delta;
distX = distX - width;
}
this.scrollTo(distX, distY, true);
}
Expand Down Expand Up @@ -476,7 +476,7 @@ class DefaultViewManager {
next = this.views.last().section.next();
}
} else {
left = this.container.scrollLeft + ( this.layout.delta * -1 );
left = this.container.scrollLeft - this.container.offsetWidth;

if (left > this.container.scrollWidth * -1){
this.scrollBy(this.layout.delta, 0, true);
Expand Down