Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[iOS] Don't rescale corner-radius because some animation may animate … #2112

Merged
merged 1 commit into from
Feb 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ios/sdk/WeexSDK/Sources/Display/WXRoundedRect.mm
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,17 @@ - (instancetype)initWithRect:(CGRect)rect
if (self = [super init]) {
_rect = rect;
_radii = [[WXRadii alloc] initWithTopLeft:topLeft topRight:topRight bottomLeft:bottomLeft bottomRight:bottomRight];
[_radii scale:[self radiiConstraintScaleFactor]];
//[_radii scale:[self radiiConstraintScaleFactor]];
}

return self;
}

/*
We don't do this scaling because of this demo: http://dotwe.org/vue/594d43b10d8fb9847d8122bbd429f48b
The width of the animating object is zero and radiiConstraintScaleFactor generated 0 factor
which causes that no corner-radius is showing.

- (float)radiiConstraintScaleFactor
{
// Constrain corner radii using CSS3 rules:
Expand Down Expand Up @@ -116,5 +121,6 @@ - (float)radiiConstraintScaleFactor
WXAssert(factor <= 1, @"Wrong factor for radii constraint scale:%f", factor);
return factor;
}
*/

@end