Skip to content

Commit c6507cb

Browse files
committed
Add docstrings
1 parent 2db0724 commit c6507cb

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

packages/widgets/src/tabbar.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,12 +801,15 @@ export class TabBar<T> extends Widget {
801801
}
802802

803803
/**
804-
* Handle the `'dblclick'` event for the tab bar.
804+
* Handle the `'scroll'` event for the tab bar.
805805
*/
806806
private _evtScroll(event: Event): void {
807807
this.updateScrollingHints(this._scrollState);
808808
}
809809

810+
/**
811+
* Handle the `'wheel'` event for the tab bar.
812+
*/
810813
private _evtWheel(event: WheelEvent): void {
811814
this.scrollBy(event.deltaY);
812815
}
@@ -888,6 +891,9 @@ export class TabBar<T> extends Widget {
888891
}
889892
}
890893

894+
/**
895+
* Scroll by a fixed number of pixels (sign defines direction).
896+
*/
891897
protected scrollBy(change: number) {
892898
const orientation = this.orientation;
893899
const contentNode = this.contentNode;
@@ -903,6 +909,9 @@ export class TabBar<T> extends Widget {
903909
}
904910
}
905911

912+
/**
913+
* Begin scrolling in given direction.
914+
*/
906915
protected beginScrolling(direction: '-' | '+') {
907916
// How many pixels should be scrolled per second initially?
908917
const initialRate = 150;
@@ -955,6 +964,9 @@ export class TabBar<T> extends Widget {
955964
}
956965
}
957966

967+
/**
968+
* Stop scrolling which was started with `beginScrolling` method.
969+
*/
958970
protected stopScrolling() {
959971
if (!this._scrollData) {
960972
return;

0 commit comments

Comments
 (0)