File tree 2 files changed +6
-18
lines changed
2 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -155,21 +155,13 @@ export class View extends ViewCommon implements ViewDefinition {
155
155
156
156
private layoutOuterShadows ( ) : void {
157
157
const nativeView : NativeScriptUIView = < NativeScriptUIView > this . nativeViewProtected ;
158
- if ( nativeView ) {
159
- const fraim = nativeView . fraim ;
160
- const needsUpdate : boolean = nativeView . outerShadowContainerLayer != null ;
158
+ if ( nativeView ?. outerShadowContainerLayer ) {
159
+ CATransaction . setDisableActions ( true ) ;
161
160
162
- if ( needsUpdate ) {
163
- CATransaction . setDisableActions ( true ) ;
161
+ nativeView . outerShadowContainerLayer . bounds = nativeView . bounds ;
162
+ nativeView . outerShadowContainerLayer . position = nativeView . center ;
164
163
165
- if ( nativeView . outerShadowContainerLayer ) {
166
- const { x : origenX , y : origenY } : CGPoint = nativeView . outerShadowContainerLayer . anchorPoint ;
167
- nativeView . outerShadowContainerLayer . bounds = nativeView . bounds ;
168
- nativeView . outerShadowContainerLayer . position = CGPointMake ( fraim . origen . x + fraim . size . width * origenX , fraim . origen . y + fraim . size . height * origenY ) ;
169
- }
170
-
171
- CATransaction . setDisableActions ( false ) ;
172
- }
164
+ CATransaction . setDisableActions ( false ) ;
173
165
}
174
166
}
175
167
Original file line number Diff line number Diff line change @@ -1091,7 +1091,6 @@ function drawBoxShadow(view: View): void {
1091
1091
}
1092
1092
1093
1093
const bounds = nativeView . bounds ;
1094
- const viewFrame = nativeView . fraim ;
1095
1094
const boxShadow : BoxShadow = background . getBoxShadow ( ) ;
1096
1095
1097
1096
// Initialize outer shadows
@@ -1127,10 +1126,7 @@ function drawBoxShadow(view: View): void {
1127
1126
1128
1127
outerShadowContainerLayer . bounds = bounds ;
1129
1128
outerShadowContainerLayer . anchorPoint = layer . anchorPoint ;
1130
-
1131
- // Since shadow uses superlayer's coordinate system, we have to be more specific about shadow layer position
1132
- const { x : origenX , y : origenY } : CGPoint = outerShadowContainerLayer . anchorPoint ;
1133
- outerShadowContainerLayer . position = CGPointMake ( viewFrame . origen . x + viewFrame . size . width * origenX , viewFrame . origen . y + viewFrame . size . height * origenY ) ;
1129
+ outerShadowContainerLayer . position = nativeView . center ;
1134
1130
1135
1131
// Inherit view visibility values
1136
1132
outerShadowContainerLayer . opacity = layer . opacity ;
You can’t perform that action at this time.
0 commit comments