File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
( function ( scope ) {
2
- document . body . style . transform = 'translateZ(0)' ;
3
2
var dragging = false ;
4
3
var lastY = 0 ;
5
4
31
30
// the amount of overflow.
32
31
function updateThumbSize ( scrollable ) {
33
32
var thumb = scrollable . thumb ;
33
+ scrollable . perspectiveCtr . style . height = scrollable . scrollHeight + "px" ;
34
34
35
35
var viewport = scrollable . getBoundingClientRect ( ) ;
36
36
var scrollHeight = scrollable . scrollHeight ;
85
85
perspectiveCtr . style . perspectiveOrigin = "top right" ;
86
86
perspectiveCtr . style . transformStyle = "preserve-3d" ;
87
87
perspectiveCtr . style . width = "100%" ;
88
- perspectiveCtr . style . minHeight = "100%" ;
88
+ // TODO: Put content into perspective container so that it automatically
89
+ // gets the scrollable content height from its descendants, as right now it
90
+ // will not detect changes to content size.
91
+ perspectiveCtr . style . height = scrollable . scrollHeight + "px" ;
89
92
perspectiveCtr . style . position = 'absolute' ;
90
93
perspectiveCtr . style . pointerEvents = 'none' ;
91
94
perspectiveCtr . classList . add ( 'perspective-ctr' )
101
104
thumb . style . right = '0' ;
102
105
perspectiveCtr . insertBefore ( thumb , perspectiveCtr . firstChild ) ;
103
106
scrollable . thumb = thumb ;
107
+ scrollable . perspectiveCtr = perspectiveCtr ;
104
108
105
109
// We are on Safari, where we need to use the sticky trick!
106
110
if ( getComputedStyle ( thumb ) . position === '-webkit-sticky' ) {
You can’t perform that action at this time.
0 commit comments