How pangyongsheng/canvas-arc-draw works
drag-arc is a browser-side, canvas-based draggable arc progress component. A consumer constructs it with a DOM element and options; it initializes drawing and input handling, renders the current value, and reports changes through callbacks. Pointer movement is converted to a progress value and redraws the arc. The graph reflects the sampled runtime source; the README documents configuration and callbacks, but no separate implementations beyond the two source files appear in the tree.
Main entry points: main.js DragArc instance · index.js Public export
Components 8
Other components
- Component consumer
- Public export
src/index.js - DragArc instance
src/main.js - DOM element
- Pointer input
- Canvas API
- Value and geometry
src/main.js - Consumer callbacks
Connections 9
- Component consumer → Public export: imports and constructs
- Public export → DragArc instance: exports
- DragArc instance → DOM element: initializes and binds
- DragArc instance → Canvas API: creates and draws
- DOM element → Pointer input: dispatches events
- DragArc instance → Value and geometry: converts coordinates
- Value and geometry → DragArc instance: returns progress
- DragArc instance → Canvas API: requests redraw
- DragArc instance → Consumer callbacks: invokes change and release