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-14395-if height or width not defined, set those keeping aspect rat... #4738

Merged
merged 2 commits into from Oct 13, 2013

Conversation

salachi
Copy link
Contributor

@salachi salachi commented Sep 26, 2013

The test case is working correctly. If both width and height is defined, the image will scale to fill the area without maintaining the aspect ration. The documentation is not correct.

The test case in the comment should make the image scale keeping the aspect ratio intact and keeping the width.
Code change fix this issue

https://jira.appcelerator.org/browse/TIMOB-14395

// so that it doesn't get the content height/width
if (!viewWidthDefined || !viewHeightDefined) {
Drawable d = imageView.getDrawable();
float aspectRaio = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

aspectRatio*

@hieupham007
Copy link
Contributor

You said the documentation is incorrect, are you going to fix it in this PR?

@hieupham007
Copy link
Contributor

Code reviewed and functionally tested. Looks good, just a couple minor comments

@salachi
Copy link
Contributor Author

salachi commented Oct 11, 2013

The documentation is at http://docs.appcelerator.com/titanium/latest/#!/guide/Images_and_ImageView_APIs
I don't know how to modify this, doesn't look like generated from the apidoc and

@hieupham007
Copy link
Contributor

That is the guides, and I don't think its in our repo. Will talk to Ben on Monday. Merging this

hieupham007 added a commit that referenced this pull request Oct 13, 2013
TIMOB-14395-if height or width not defined, set those keeping aspect rat...
@hieupham007 hieupham007 merged commit 88f6c0f into tidev:master Oct 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants