MCPcopy
hub / github.com/dolphin-wood/smooth-scrollbar / constructor

Method constructor

src/track/index.ts:14–29  ·  view source on GitHub ↗
(
    private _scrollbar: I.Scrollbar,
  )

Source from the content-addressed store, hash-verified

12 readonly yAxis: ScrollbarTrack;
13
14 constructor(
15 private _scrollbar: I.Scrollbar,
16 ) {
17 const thumbMinSize = _scrollbar.options.thumbMinSize;
18
19 this.xAxis = new ScrollbarTrack(TrackDirection.X, thumbMinSize);
20 this.yAxis = new ScrollbarTrack(TrackDirection.Y, thumbMinSize);
21
22 this.xAxis.attachTo(_scrollbar.containerEl);
23 this.yAxis.attachTo(_scrollbar.containerEl);
24
25 if (_scrollbar.options.alwaysShowTracks) {
26 this.xAxis.show();
27 this.yAxis.show();
28 }
29 }
30
31 /**
32 * Updates track appearance

Callers

nothing calls this directly

Calls 2

attachToMethod · 0.65
showMethod · 0.65

Tested by

no test coverage detected