mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-30 21:49:31 +00:00
@@ -76,14 +76,19 @@ class RectView extends RenderableView {
|
||||
double y = relativeOnHeight(mY);
|
||||
double w = relativeOnWidth(mW);
|
||||
double h = relativeOnHeight(mH);
|
||||
double rx = relativeOnWidth(mRx);
|
||||
double ry = relativeOnHeight(mRy);
|
||||
|
||||
if (rx != 0 || ry != 0) {
|
||||
if (rx == 0) {
|
||||
if (mRx != null || mRy != null) {
|
||||
double rx = 0d;
|
||||
double ry = 0d;
|
||||
if (mRx == null) {
|
||||
ry = relativeOnHeight(mRy);
|
||||
rx = ry;
|
||||
} else if (ry == 0) {
|
||||
} else if (mRy == null) {
|
||||
rx = relativeOnWidth(mRx);
|
||||
ry = rx;
|
||||
} else {
|
||||
rx = relativeOnWidth(mRx);
|
||||
ry = relativeOnHeight(mRy);
|
||||
}
|
||||
|
||||
if (rx > w / 2) {
|
||||
|
||||
+10
-5
@@ -72,14 +72,19 @@
|
||||
CGFloat y = [self relativeOnHeight:self.y];
|
||||
CGFloat width = [self relativeOnWidth:self.rectwidth];
|
||||
CGFloat height = [self relativeOnHeight:self.rectheight];
|
||||
CGFloat rx = [self relativeOnWidth:self.rx];
|
||||
CGFloat ry = [self relativeOnHeight:self.ry];
|
||||
|
||||
if (rx != 0 || ry != 0) {
|
||||
if (rx == 0) {
|
||||
if (self.rx != nil || self.ry != nil) {
|
||||
CGFloat rx = 0;
|
||||
CGFloat ry = 0;
|
||||
if (self.rx == nil) {
|
||||
ry = [self relativeOnHeight:self.ry];
|
||||
rx = ry;
|
||||
} else if (ry == 0) {
|
||||
} else if (self.ry == nil) {
|
||||
rx = [self relativeOnWidth:self.rx];
|
||||
ry = rx;
|
||||
} else {
|
||||
rx = [self relativeOnWidth:self.rx];
|
||||
ry = [self relativeOnHeight:self.ry];
|
||||
}
|
||||
|
||||
if (rx > width / 2) {
|
||||
|
||||
@@ -19,8 +19,6 @@ export default class Rect extends Shape<{
|
||||
y: 0,
|
||||
width: 0,
|
||||
height: 0,
|
||||
rx: 0,
|
||||
ry: 0,
|
||||
};
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user