Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Craig100 1069 posts 2335 karma points c-trib
    Mar 02, 2015 @ 16:58
    Craig100
    0

    Unhide responsive image fails

    Umb 7.2.2/ Slimsy 0.4.1 (both loaded via NuGet)

    Interesting, but unwanted effect. I have a colour swapper working on a product page. On page load it loads up two sliders (one for each sku actually) then hides all but the first one. That's fine.  

    If I use @pic.Url for the images, if I then click on on the colour swapper, the images appear to change seemlessly. If I use @pic.GetResponsiveCropUrl("myCrop"), when the swap is complete you just see empty image placeholders.

    But it gets weirder....

    If you then open Chrome or FF Console, the images suddenly appear. If you reload the page and do the same again with the console open, the second set aren't there on swap, but if you change the console window at all (i.e. it's docking or size) then the second set appear.

    I'm guessing that I need to fire some sort of reflow in the dom when I do the swap over, but not sure how or if that's correct. The previous version of Slimsy didn't behave like this, hence the question being posed here and not SO.

    Any thoughts?

    Craig

  • Jeavon Leopold 3005 posts 13196 karma points MVP 7x admin c-trib
    Mar 02, 2015 @ 17:05
    Jeavon Leopold
    0

    Hi Craig,

    You can call the checkResponsiveImages method, see the Slimmage documentation here for more info.

    Jeavon

Please Sign in or register to post replies

Write your reply to:

Draft