Sha256: 05d2f19f00840a171d0070aca5278894732e5d798e6fc96499f3c797e21e3fb1

Contents?: true

Size: 562 Bytes

Versions: 65

Compression:

Stored size: 562 Bytes

Contents

/*global $, document */
$(function () {
    'use strict';
    // NOTE: srcset is supposed to be clean, but when we resize the iframe the images inside aren't recalculate to switch to the proper src.
    // It takes the desktop image and reduce it.
    // To avoid this unwanted effect we just remove the srcset on preview, so we always use the base src image
    $('.promethee-previewmode').click(function () {
        $('.promethee-edit__preview-frame').contents().find('img').each(function () {
            $(this).removeAttr('srcset');
        });
    });
});

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
promethee-1.11.29 app/assets/javascripts/promethee/preview-srcset.js
promethee-1.11.28 app/assets/javascripts/promethee/preview-srcset.js
promethee-1.11.27 app/assets/javascripts/promethee/preview-srcset.js
promethee-1.11.26 app/assets/javascripts/promethee/preview-srcset.js
promethee-1.11.25 app/assets/javascripts/promethee/preview-srcset.js