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.0.2 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.0.1 app/assets/javascripts/promethee/preview-srcset.js
promethee-4.0.0 app/assets/javascripts/promethee/preview-srcset.js
promethee-3.0.2 app/assets/javascripts/promethee/preview-srcset.js
promethee-3.0.1 app/assets/javascripts/promethee/preview-srcset.js
promethee-3.0.0 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.1.3 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.1.2 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.1.1 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.1.0 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.0.9 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.0.8 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.0.7 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.0.6 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.0.5 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.0.4 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.0.3 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.0.2 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.0.1 app/assets/javascripts/promethee/preview-srcset.js
promethee-2.0.0 app/assets/javascripts/promethee/preview-srcset.js