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-4.1.13 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.12 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.11 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.10 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.9 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.8 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.7 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.6 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.5 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.4 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.3 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.2 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.1 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.1.0 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.0.8 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.0.7 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.0.6 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.0.5 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.0.4 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.0.3 app/assets/javascripts/promethee/preview-srcset.js