scroll.scrollToPoint(point, animate, animationOptions)

Scroll to a specific point, optionally animating.
译:滚动到一个特定的点,任选动画。

Arguments(参数)
    1. point— An object with x and y properties. 译:具有X和Y属性的对象。
  1. animate — A boolean, set to true by default. (Optional) 译:一个布尔值,默认设置为。(可选)
  2. animationOptions — An object with curve, time, delay and repeat properties. (Optional) 译:具有曲线、时间、延迟和重复特性的对象。(可选)
scroll = new ScrollComponent


# Scroll content to x: 200, y: 100 
scroll.scrollToPoint(
    x: 200, y: 100
    true
    curve: "ease"
)

# Scroll very slowly 
scroll.scrollToPoint(
    x: 200, y: 100
    true
    curve: "ease", time: 10
    )

results matching ""

    No results matching ""