Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ public void setScaleY(T view, float scaleY) {
@Deprecated
@ReactProp(name = PROP_TRANSLATE_X, defaultFloat = 1f)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this was copy-paste kind of an issue from setScale. Also defaultFloat should be 0f here instead of 1f. Do you mind updating defaultFloat here (and in translateY) too to completely fix translate property related regression introduced by refactoring? Once it's done I'll be happy to merge your patch

public void setTranslateX(T view, float translateX) {
view.setTranslationX(translateX);
view.setTranslationX(PixelUtil.toPixelFromDIP(translateX));
}

@Deprecated
@ReactProp(name = PROP_TRANSLATE_Y, defaultFloat = 1f)
public void setTranslateY(T view, float translateY) {
view.setTranslationY(translateY);
view.setTranslationY(PixelUtil.toPixelFromDIP(translateY));
}

@ReactProp(name = PROP_ACCESSIBILITY_LIVE_REGION)
Expand Down