File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -801,12 +801,15 @@ export class TabBar<T> extends Widget {
801
801
}
802
802
803
803
/**
804
- * Handle the `'dblclick '` event for the tab bar.
804
+ * Handle the `'scroll '` event for the tab bar.
805
805
*/
806
806
private _evtScroll ( event : Event ) : void {
807
807
this . updateScrollingHints ( this . _scrollState ) ;
808
808
}
809
809
810
+ /**
811
+ * Handle the `'wheel'` event for the tab bar.
812
+ */
810
813
private _evtWheel ( event : WheelEvent ) : void {
811
814
this . scrollBy ( event . deltaY ) ;
812
815
}
@@ -888,6 +891,9 @@ export class TabBar<T> extends Widget {
888
891
}
889
892
}
890
893
894
+ /**
895
+ * Scroll by a fixed number of pixels (sign defines direction).
896
+ */
891
897
protected scrollBy ( change : number ) {
892
898
const orientation = this . orientation ;
893
899
const contentNode = this . contentNode ;
@@ -903,6 +909,9 @@ export class TabBar<T> extends Widget {
903
909
}
904
910
}
905
911
912
+ /**
913
+ * Begin scrolling in given direction.
914
+ */
906
915
protected beginScrolling ( direction : '-' | '+' ) {
907
916
// How many pixels should be scrolled per second initially?
908
917
const initialRate = 150 ;
@@ -955,6 +964,9 @@ export class TabBar<T> extends Widget {
955
964
}
956
965
}
957
966
967
+ /**
968
+ * Stop scrolling which was started with `beginScrolling` method.
969
+ */
958
970
protected stopScrolling ( ) {
959
971
if ( ! this . _scrollData ) {
960
972
return ;
You can’t perform that action at this time.
0 commit comments