Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIMOB-10065 Don't fix the "top" or "left" animation values if other valu... #2627

Merged
merged 1 commit into from
Jul 23, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -305,30 +305,26 @@ public AnimationSet render(TiViewProxy viewProxy, View view, int x, int y, int w
// we know the values are expressed for certain in pixels.
if (top != null) {
optionTop = new TiDimension(String.valueOf(top), TiDimension.TYPE_TOP);
} else {
} else if (bottom == null && centerY == null) {
// Fix a top value since no other y-axis value is being set.
optionTop = new TiDimension(view.getTop(), TiDimension.TYPE_TOP);
optionTop.setUnits(TypedValue.COMPLEX_UNIT_PX);
}

if (bottom != null) {
optionBottom = new TiDimension(String.valueOf(bottom), TiDimension.TYPE_BOTTOM);
} else {
optionBottom = new TiDimension(view.getBottom(), TiDimension.TYPE_BOTTOM);
optionBottom.setUnits(TypedValue.COMPLEX_UNIT_PX);
}

if (left != null) {
optionLeft = new TiDimension(String.valueOf(left), TiDimension.TYPE_LEFT);
} else {
} else if (right == null && centerX == null) {
// Fix a left value since no other x-axis value is being set.
optionLeft = new TiDimension(view.getLeft(), TiDimension.TYPE_LEFT);
optionLeft.setUnits(TypedValue.COMPLEX_UNIT_PX);
}

if (right != null) {
optionRight = new TiDimension(String.valueOf(right), TiDimension.TYPE_RIGHT);
} else {
optionRight = new TiDimension(view.getRight(), TiDimension.TYPE_RIGHT);
optionRight.setUnits(TypedValue.COMPLEX_UNIT_PX);
}

if (centerX != null) {
Expand Down