in client/src/components/translation-selector/word-scroll-list.ts [134:155]
startDrag(x: number, y: number) {
if(this.snapInterval) {
clearInterval(this.snapInterval);
this.snapInterval = null;
}
if (this.dragInfo && this.dragInfo.interval) {
clearInterval(this.dragInfo.interval);
}
const positionX = this.getScrollPosition();
const properties = { position: positionX, time: WordScrollListComponent.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()
};
}