startDrag()

in client/src/components/scroll-list/scroll-list.ts [198:219]


  startDrag(x: number, y: number) {
    if(this.animationInterval) {
      clearInterval(this.animationInterval);
      this.animationInterval = null;
    }
    if (this.dragInfo && this.dragInfo.interval) {
      clearInterval(this.dragInfo.interval);
    }
    const positionX = this.getScrollPosition();
    const properties = { position: positionX, time: ScrollListComponent.getTime() };
    this.dragInfo = {
      velocityX: 0,
      offsetX: positionX - x,
      interval: setInterval(() => this.updateScrollVelocity(properties), this.config.animationInterval),
      startScrollPosition: positionX,
      minScrollPosition: positionX,
      maxScrollPosition: positionX,
      lastClientX: x,
      lastClientY: y,
      startTime: Date.now()
    };
  }