File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
addon/components/collection-scroll-view Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 6
6
@key ={{ @key }}
7
7
@auxiliaryComponent ={{ if @auxiliaryComponent
8
8
(component @auxiliaryComponent
9
- cell-layout =this.cellLayout
10
- items = @items
11
- estimated-width = @estimated-width
12
- estimated-height = @estimated-height
13
- client-width =this.clientWidth
14
- client-height =this.clientHeight
15
- scroll-top =this.scrollTop
9
+ cellLayout =this.cellLayout
10
+ items = @items
11
+ clientSize =this.collectionClientSize
12
+ scrollTop =this.collectionScrollTop
13
+ verticalOffset =this.visibleHeaderHeight
16
14
)
17
15
}}
18
16
@clientSizeChange ={{ this.clientSizeChange }}
50
48
51
49
{{ #if @revealService }}
52
50
{{ emitter-action
53
- emitter = @revealService
54
- eventName =" revealItemById"
55
- action = (fn this.scrollToItem scrollViewApi )
51
+ emitter = @revealService
52
+ eventName =" revealItemById"
53
+ action = (fn this.scrollToItem scrollViewApi )
56
54
}}
57
55
{{ /if }}
58
56
</ScrollView >
Original file line number Diff line number Diff line change @@ -72,6 +72,11 @@ export default class CollectionScrollView extends Component {
72
72
return Math . max ( 0 , scrollTop - headerHeight ) ;
73
73
}
74
74
75
+ get visibleHeaderHeight ( ) {
76
+ let { headerHeight, scrollTop } = this ;
77
+ return Math . max ( 0 , headerHeight - scrollTop ) ;
78
+ }
79
+
75
80
@action updateHeaderDimensions ( scrollViewApi , entry ) {
76
81
let isFirstMeasure = ! this . headerDimensions ;
77
82
this . headerDimensions = { width : entry . contentRect . width , height : entry . contentRect . height } ;
You can’t perform that action at this time.
0 commit comments