File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -169,25 +169,27 @@ class ViewWithElevationAndRipple extends View {
169
169
return result ;
170
170
}
171
171
172
- [ elevationProperty . getDefault ] ( ) : number {
173
- return this . getDefaultElevation ( ) ;
174
- }
172
+ // [elevationProperty.getDefault](): number {
173
+ // return this.getDefaultElevation();
174
+ // }
175
175
[ elevationProperty . setNative ] ( value : number ) {
176
176
if ( isPostLollipop ( ) ) {
177
177
createStateListAnimator ( this , this . nativeViewProtected ) ;
178
178
} else {
179
- this . nativeViewProtected . setElevation ( value ) ;
179
+ const newValue = Length . toDevicePixels ( typeof value === 'string' ? Length . parse ( value ) : value , 0 ) ;
180
+ this . nativeViewProtected . setElevation ( newValue ) ;
180
181
}
181
182
}
182
- [ dynamicElevationOffsetProperty . getDefault ] ( ) : number {
183
- return this . getDefaultDynamicElevationOffset ( ) ;
184
- }
183
+ // [dynamicElevationOffsetProperty.getDefault](): number {
184
+ // return this.getDefaultDynamicElevationOffset();
185
+ // }
185
186
[ dynamicElevationOffsetProperty . setNative ] ( value : number ) {
186
187
this . nativeViewProtected . setClickable ( this . isUserInteractionEnabled ) ;
187
188
if ( isPostLollipop ( ) ) {
188
189
createStateListAnimator ( this , this . nativeViewProtected ) ;
189
190
} else {
190
- this . nativeViewProtected . setTranslationZ ( value ) ;
191
+ const newValue = Length . toDevicePixels ( typeof value === 'string' ? Length . parse ( value ) : value , 0 ) ;
192
+ this . nativeViewProtected . setTranslationZ ( newValue ) ;
191
193
}
192
194
}
193
195
[ androidElevationProperty . setNative ] ( value : number ) {
You can’t perform that action at this time.
0 commit comments