facebook

Dynamic Image Src and Aspect Ratio for SlideShow

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #337284 Reply

    Brandon
    Member

    I am working on a slide show for my samples and ran into the problem of the image widget not keeping the aspect ratio when dynamically loaded.

    Here is the sampe some images from a Horror convention I am putting together: http://cincyplanet.com/mobione/imagetest/

    You will see the second image is stretched it should be a vertical image.

    I know this was addressed before so I was not sure if it was fix and is a new bug, or an ongoing problem.

    #337311

    Brandon
    Member

    Just a note, I also tried it without the animation and it still does not resize.
    I have also tried calling a preprocess and even a resize call, it does go to the correct size if the device is rotated though…

    #337318

    sixtosantos
    Participant

    Hey there,

    You can try setting the css height property to ‘auto’ e.g.:

    
    
    $("#m1-SlideShow-image1").css("height","auto");
    
    

    That should allow each photo to maintain a constant width, and only vary the height.

    Regards,
    Sixto

    #337326

    Brandon
    Member

    Thanks. It kind of works, but when I use that it no longer centers the image in the screen, so its all the way to the left and looks odd.

    #337379

    Brandon
    Member

    Sixto,

    That did work. I was getting a famous test center error. I stopped working on it until last night and when I restarted MobiOne it was working.

    I have updated the demo to show the working project. Click on the right of the image for the next slide, the left for the previous slide.

    #345156

    fcodonlucas
    Participant

    Hi Cincyplanet… only one question…. do you think the slide show you have in your code list… it can make with out button and make chance image automatic with every 3 seconds or 5… please help me with this… thanks for your help…

    and again sorry my english.

    #345164

    Brandon
    Member

    Yes, just use a timer and call the change function.

    http://www.w3schools.com/js/js_timing.asp

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Dynamic Image Src and Aspect Ratio for SlideShow

You must be logged in to post in the forum log in