File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,22 +12,22 @@ export function useParallax<T extends HTMLElement>(props: ParallaxProps) {
1212 useVerifyController ( controller ) ;
1313
1414 function _getElementOptions ( ) : CreateElementOptions {
15- const useSpeedProp = typeof props . speed !== 'undefined' ;
15+ const shouldUseSpeedProp = typeof props . speed !== 'undefined' ;
1616 const isHorizontal = controller ?. scrollAxis == 'horizontal' ;
1717 const isVertical = controller ?. scrollAxis == 'vertical' ;
1818
1919 let translateX = props . translateX ;
2020 let translateY = props . translateY ;
2121
2222 // TODO: move to parallax-controller
23- if ( useSpeedProp && isHorizontal ) {
23+ if ( shouldUseSpeedProp && isHorizontal ) {
2424 translateX = [
2525 `${ ( props . speed || 0 ) * 10 } px` ,
2626 `${ ( props . speed || 0 ) * - 10 } px` ,
2727 ] ;
2828 }
2929
30- if ( useSpeedProp && isVertical ) {
30+ if ( shouldUseSpeedProp && isVertical ) {
3131 translateY = [
3232 `${ ( props . speed || 0 ) * 10 } px` ,
3333 `${ ( props . speed || 0 ) * - 10 } px` ,
@@ -115,5 +115,5 @@ export function useParallax<T extends HTMLElement>(props: ParallaxProps) {
115115 props . targetElement ,
116116 ] ) ;
117117
118- return { ref } ;
118+ return { ref, controller , element } ;
119119}
You can’t perform that action at this time.
0 commit comments