pedroabreu / ion-gallery

Ionic gallery directive
MIT License
124 stars 61 forks source link

gallery on ionicModal #8

Closed crmolinaz closed 9 years ago

crmolinaz commented 9 years ago

Hi, i found a problem when i tried to put the gallery into an ionicModal. The problem is that gallery don't show the pictures because no can estimated the height for the parent row.

pedroabreu commented 9 years ago

My first guess would be that it's not able to calculate element[0].offsetWidth because the element is not yet on the DOM. But I'll give it a go and see if I can make it work on a modal

crmolinaz commented 9 years ago

i understand. But i observed that only happens at the second time. When i open the modal just once, all going ok.

pedroabreu commented 9 years ago

Could be that the destroy of the modal you're creating. It would them make sense for it to fail. Do you have any test project I can play with ?

pedroabreu commented 9 years ago

Fixed

CarsonChen1129 commented 8 years ago

Hi, I have the same problem as OP. The height for row and the image is 0px in the Modal. How can I fix it? Thank you very much in advance.

pedroabreu commented 8 years ago

Can you inspect and check if the image is being loaded ? Are you trying to load the gallery inside a modal ?

CarsonChen1129 commented 8 years ago

Hello Pedro, thank you very much for the quick response. Yes, I am trying to load the gallery inside a modal, the images are being loaded without problems but just very tiny, I tried to change the css but nothing happens. So right now it looks like this.

screen shot 2016-03-31 at 2 44 23 pm