@@ -49,7 +49,6 @@ export function horizontalStackLayout(modeConfig: ILayoutConfig = {}) {
4949 rotateZDeg = 30 ,
5050 } = modeConfig ;
5151
52- const transform : TransformsStyle [ "transform" ] = [ ] ;
5352 const { validLength, value, inputRange } = getCommonVariables ( {
5453 showLength : showLength ! ,
5554 value : _value ,
@@ -62,12 +61,6 @@ export function horizontalStackLayout(modeConfig: ILayoutConfig = {}) {
6261 snapDirection,
6362 } ) ;
6463
65- const styles : ViewStyle = {
66- transform,
67- zIndex,
68- opacity,
69- } ;
70-
7164 let translateX : number ;
7265 let scale : number ;
7366 let rotateZ : string ;
@@ -102,7 +95,7 @@ export function horizontalStackLayout(modeConfig: ILayoutConfig = {}) {
10295 rotateZ = `${ interpolate ( value , inputRange , [ 0 , 0 , rotateZDeg ] , Extrapolation . CLAMP ) } deg` ;
10396 }
10497
105- transform . push (
98+ const transform : TransformsStyle [ "transform" ] = [
10699 {
107100 translateX : translateX ! ,
108101 } ,
@@ -111,8 +104,14 @@ export function horizontalStackLayout(modeConfig: ILayoutConfig = {}) {
111104 } ,
112105 {
113106 rotateZ : rotateZ ! ,
114- }
115- ) ;
107+ } ,
108+ ] ;
109+
110+ const styles : ViewStyle = {
111+ transform,
112+ zIndex,
113+ opacity,
114+ } ;
116115
117116 return styles ;
118117 } ;
@@ -150,7 +149,7 @@ export function verticalStackLayout(modeConfig: ILayoutConfig = {}) {
150149 opacityInterval = 0.1 ,
151150 rotateZDeg = 30 ,
152151 } = modeConfig ;
153- const transform : TransformsStyle [ "transform" ] = [ ] ;
152+
154153 const { validLength, value, inputRange } = getCommonVariables ( {
155154 showLength : showLength ! ,
156155 value : _value ,
@@ -163,12 +162,6 @@ export function verticalStackLayout(modeConfig: ILayoutConfig = {}) {
163162 snapDirection,
164163 } ) ;
165164
166- const styles : ViewStyle = {
167- transform,
168- zIndex,
169- opacity,
170- } ;
171-
172165 let translateX : number ;
173166 let scale : number ;
174167 let rotateZ : string ;
@@ -206,7 +199,7 @@ export function verticalStackLayout(modeConfig: ILayoutConfig = {}) {
206199 ) ;
207200 }
208201
209- transform . push (
202+ const transform : TransformsStyle [ "transform" ] = [
210203 {
211204 translateX : translateX ! ,
212205 } ,
@@ -218,8 +211,14 @@ export function verticalStackLayout(modeConfig: ILayoutConfig = {}) {
218211 } ,
219212 {
220213 translateY : translateY ! ,
221- }
222- ) ;
214+ } ,
215+ ] ;
216+
217+ const styles : ViewStyle = {
218+ transform,
219+ zIndex,
220+ opacity,
221+ } ;
223222
224223 return styles ;
225224 } ;
0 commit comments