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

ion-img with ion-avatar in VirtualScroll #6983

Closed
ghenry22 opened this issue Jun 21, 2016 · 6 comments
Closed

ion-img with ion-avatar in VirtualScroll #6983

ghenry22 opened this issue Jun 21, 2016 · 6 comments
Assignees
Milestone

Comments

@ghenry22
Copy link

ghenry22 commented Jun 21, 2016

Short description of the problem:

Images are not displayed properly in a VirtualScroll list when using ion-img with type ion-avatar on an item. The image is stretched out really large.

Screenshots attached

What behavior are you expecting?

The image is presented as a standard avatar style

Steps to reproduce:

  1. Create a virtual scroll list. Use ion-img for the image in an ion-avatar on an item.
  2. Not reproducible in plunker/browser.
  3. Test on iOS simulator or an actual phone

Which Ionic Version? 1.x or 2.x
2.0 beta9

Cordova CLI: 6.2.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.9
Ionic CLI Version: 2.0.0-beta.30
Ionic App Lib Version: 2.0.0-beta.16
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v5.11.1
Xcode version: Xcode 7.3.1 Build version 7D1014

2016-06-21 09_33_49-os x 10 11 - vmware workstation
2016-06-21 09_37_32-

@mpaland
Copy link

mpaland commented Jun 21, 2016

I had a similar issue with ion-img
Problem are the "min-..." in app.ios.css

ion-img img {
  min-width: 100%;
  min-height: 100%;
}

So ion-img always fills out the entire space.
Is that really wanted?

@ghenry22
Copy link
Author

I imagine it is supposed to be bound by the surrounding element (ie the ion-avatar, ion-thumbnail etc) but due to a bug in this version it's not.

I have just dropped ion-img out of my code for now as it feels like it needs a bit of love before it's ready for primetime. I'll keep testing it out each version update if there is anything relevant in the change log until it's ready.

@Cameron637
Copy link

Is this fixed for anyone? I'm still seeing this on beta 11

@heikoholland
Copy link

heikoholland commented Aug 31, 2016

Still not fixed. It's ok in browser but images are still streched in iOS and Android.
Also the text next to the thumbnail is missing.

  <ion-list [virtualScroll]="highlights" *ngIf="highlights && highlights.length > 0">

    <ion-item class="item-text-wrap" *virtualItem="let item" (click)="openFile(item.file_location)">
      <ion-thumbnail item-left>
      <ion-img src="{{imgBaseUrl}}{{item.thumbnail_location}}"></ion-img>
      </ion-thumbnail>
      <h2 class="text-wrap">{{item.title}}</h2>

      <p>{{item.time_modified | androidDate}}</p>

      <p>{{item.file_mime_type | mimeType}}</p>
    </ion-item>

  </ion-list>

Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0-beta.37
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.8.6
ios-sim version: 3.1.1
OS: Mac OS X El Capitan
Node Version: v6.2.1
Xcode version: Xcode 7.3.1 Build version 7D1014

@jgw96 jgw96 removed the platform:ios label Sep 1, 2016
@iignatov
Copy link
Contributor

iignatov commented Sep 5, 2016

Here's a forum topic showing the same issue:
https://forum.ionicframework.com/t/ion-img-bug-under-ios/62609

@zakton5
Copy link
Contributor

zakton5 commented Oct 17, 2016

I'm having a similar issue, except that I am using AmCharts to build a gauge within each virtual item. After navigating to another back and then going back, the AmCharts are enlarged and no longer within their old bounds. Oddly enough, it only happens to the last item. This does not happen when the list is not using virtual scroll.

screen shot 2016-10-17 at 4 03 57 pm

@adamdbradley adamdbradley self-assigned this Nov 20, 2016
@adamdbradley adamdbradley added this to the 2.0.0-rc.4 milestone Nov 20, 2016
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants