CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-better-scroll--mouse-wheel

A TypeScript plugin for BetterScroll that provides enhanced mouse wheel scrolling capabilities with configurable speed, direction, easing, and boundary damping on PC platforms.

Overall
score

98%

Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This evaluation assesses how effectively the engineer uses better-scroll's scroll lifecycle event system to implement the ScrollTracker module. The focus is on proper instantiation of BScroll, correct event registration using the 'on' method, and accurate handling of the four key lifecycle events.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "BScroll instantiation",
      "description": "Correctly creates a BScroll instance using 'new BScroll()' or 'BScroll.createInstance()' with the provided HTMLElement, and stores a reference to it for event registration and cleanup",
      "max_score": 20
    },
    {
      "name": "beforeScrollStart event",
      "description": "Registers a listener for the 'beforeScrollStart' event using the BScroll instance's 'on' method, and captures this event when the user touches/clicks before scrolling begins",
      "max_score": 15
    },
    {
      "name": "scrollStart event",
      "description": "Registers a listener for the 'scrollStart' event using the BScroll instance's 'on' method, and captures this event when actual scroll motion starts",
      "max_score": 15
    },
    {
      "name": "scroll event",
      "description": "Registers a listener for the 'scroll' event using the BScroll instance's 'on' method, and captures continuous position updates during scrolling. May configure 'probeType' option to control event frequency",
      "max_score": 20
    },
    {
      "name": "scrollEnd event",
      "description": "Registers a listener for the 'scrollEnd' event using the BScroll instance's 'on' method, and captures this event when scroll animation completes",
      "max_score": 15
    },
    {
      "name": "Position data extraction",
      "description": "Correctly extracts scroll position data from the BScroll instance during scroll events, accessing the 'x' and 'y' properties of the scroller instance or event object",
      "max_score": 10
    },
    {
      "name": "Cleanup and destroy",
      "description": "Properly cleans up by calling the 'destroy()' method on the BScroll instance to remove event listeners and free resources",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-better-scroll--mouse-wheel

tile.json