From b01291dedacacfe877371c87006ba4021e438258 Mon Sep 17 00:00:00 2001 From: Roman Ruiz-Esparza Date: Sat, 23 Mar 2019 11:35:48 -0400 Subject: [PATCH] use initialPosition on init --- lib/ios/Interactable/InteractableView.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ios/Interactable/InteractableView.m b/lib/ios/Interactable/InteractableView.m index d413a5da..082e5604 100644 --- a/lib/ios/Interactable/InteractableView.m +++ b/lib/ios/Interactable/InteractableView.m @@ -156,7 +156,11 @@ - (void)setCenter:(CGPoint)center center = CGPointMake(self.origin.x - self.reactRelayoutCenterDeltaFromOrigin.x, self.origin.y - self.reactRelayoutCenterDeltaFromOrigin.y); } - if (self.originSet) + if (!self.initialPositionSet) + { + center = CGPointMake(self.origin.x + self.initialPosition.x, self.origin.y + self.initialPosition.y); + } + else if (self.originSet) { if (self.horizontalOnly) center.y = self.origin.y; if (self.verticalOnly) center.x = self.origin.x;