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-7940] Fixed the issue with image view's not showing up if loading... #1615

Merged
merged 1 commit into from
Mar 9, 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
6 changes: 6 additions & 0 deletions mobileweb/titanium/Ti/UI/ImageView.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ define(["Ti/_/declare", "Ti/_/lang", "Ti/_/style", "Ti/_/UI/Widget", "Ti/UI"],
},

_doLayout: function(params) {
// We have to remove the old style to get the image to scale to its default size,
// otherwise we are just reading in whatever we set in the last doLayout(), which is
// 0 if the image was not loaded...thus always clamping it to 0.
this.domNode.style.width = "";
this.domNode.style.height = "";

var imageRatio = this.domNode.width / this.domNode.height,
boundingHeight = params.boundingSize.height,
boundingWidth = params.boundingSize.width,
Expand Down