Skip to content

Commit

Permalink
Revert "shadowOffset and shadowRadius in PTs"
Browse files Browse the repository at this point in the history
This reverts commit f77032b.
  • Loading branch information
berardo committed Dec 18, 2017
1 parent 7fd7197 commit 60fc2c2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/angular/ng-shadow.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,21 +197,19 @@ export class NativeShadowDirective implements OnInit, OnChanges {
const elevation = parseFloat(
((this.elevation as number) * scale).toFixed(2),
);
const shadowOffset = parseFloat(this.shadowOffset as string) * scale;
const shadowRadius = parseFloat(this.shadowRadius as string);
nativeView.layer.maskToBounds = false;
nativeView.layer.shadowColor = new Color(this.shadowColor).ios.CGColor;
nativeView.layer.shadowOffset =
this.shadowOffset ?
CGSizeMake(0, shadowOffset) :
CGSizeMake(0, parseFloat(this.shadowOffset as string)) :
CGSizeMake(0, 0.18 * elevation - 0.14);
nativeView.layer.shadowOpacity =
this.shadowOpacity ?
parseFloat(this.shadowOpacity as string) :
0.002 * elevation + 0.25;
nativeView.layer.shadowRadius =
this.shadowRadius ?
shadowRadius :
parseFloat(this.shadowRadius as string) :
0.22 * elevation - 0.5;
}

Expand Down

0 comments on commit 60fc2c2

Please sign in to comment.