|
|
@ -63,7 +63,7 @@ class Scroller { |
|
|
|
|
|
|
|
|
|
|
|
scrollTo(x, y) { |
|
|
|
scrollTo(x, y) { |
|
|
|
let behavior = this.smooth ? 'smooth' : 'auto'; |
|
|
|
let behavior = this.smooth ? 'smooth' : 'auto'; |
|
|
|
window.scrollTo({ |
|
|
|
this.element.scrollTo({ |
|
|
|
left: x, |
|
|
|
left: x, |
|
|
|
top: y, |
|
|
|
top: y, |
|
|
|
behavior: behavior, |
|
|
|
behavior: behavior, |
|
|
@ -76,7 +76,7 @@ class Scroller { |
|
|
|
|
|
|
|
|
|
|
|
scrollBy(x, y) { |
|
|
|
scrollBy(x, y) { |
|
|
|
let behavior = this.smooth ? 'smooth' : 'auto'; |
|
|
|
let behavior = this.smooth ? 'smooth' : 'auto'; |
|
|
|
window.scrollBy({ |
|
|
|
this.element.scrollBy({ |
|
|
|
left: x, |
|
|
|
left: x, |
|
|
|
top: y, |
|
|
|
top: y, |
|
|
|
behavior: behavior, |
|
|
|
behavior: behavior, |
|
|
|