@@ -10,7 +10,7 @@ import Hammer from 'hammerjs';
10
10
import ZyngaScrollerVerticalRecognizer from 'yapp-scroll-view/utils/zynga-scroller-vertical-recognizer' ;
11
11
import { join , schedule } from '@ember/runloop' ;
12
12
import { translate } from 'ember-collection/utils/translate' ;
13
- import { timeout } from 'ember-concurrency' ;
13
+ import { timeout , waitForQueue } from 'ember-concurrency' ;
14
14
import { task } from 'ember-concurrency-decorators' ;
15
15
import ScrollViewApi from 'yapp-scroll-view/utils/scroll-view-api' ;
16
16
import { DEBUG } from '@glimmer/env' ;
@@ -106,8 +106,10 @@ class ScrollView extends Component {
106
106
_isAtTop ;
107
107
_needsContentSizeUpdate = true ;
108
108
_appliedClientWidth ;
109
- @tracked _appliedClientHeight ;
110
- @tracked _appliedContentHeight ;
109
+ _appliedClientHeight ;
110
+ _appliedContentHeight ;
111
+ @tracked scrollBarClientHeight ;
112
+ @tracked scrollBarContentHeight ;
111
113
_appliedScrollTop ;
112
114
_shouldMeasureContent = undefined ;
113
115
_isScrolling = false ;
@@ -473,12 +475,20 @@ class ScrollView extends Component {
473
475
this . _appliedClientHeight = clientHeight ;
474
476
this . _appliedContentHeight = contentHeight ;
475
477
this . contentElement . style . minHeight = `${ clientHeight } px` ;
478
+ this . updateScrollBarDimensionsTask . perform ( ) ;
476
479
this . updateScrollerDimensions ( ) ;
477
480
if ( this . args . clientSizeChange ) {
478
481
this . args . clientSizeChange ( clientWidth , clientHeight ) ;
479
482
}
480
483
}
481
484
485
+ @task
486
+ * updateScrollBarDimensionsTask ( ) {
487
+ yield waitForQueue ( 'afterRender' ) ;
488
+ this . scrollBarClientHeight = this . _appliedClientHeight ;
489
+ this . scrollBarContentHeight = this . _appliedContentHeight ;
490
+ }
491
+
482
492
get extraCssClasses ( ) {
483
493
// for overriding by LoadingScrollView
484
494
return null ;
0 commit comments