Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getSvgMainImage(id, useRendition, imgPath, title, alt, width, height, zoom, position, top, bottom, left, right) {
- if (imgPath !== '' && useRendition === 'false') {
- let component = utils.image().getImage(imgPath);
- let fullId = 'noRenditionImage-' + id;
- let full = '#noRenditionImage-' + id;
- $(component).attr('id', fullId);
- $(component).css('position', position);
- $(component).css('top', top);
- $(component).css('bottom', bottom);
- $(component).css('left', left);
- $(component).css('right', right);
- $(component).css('max-width', '100%');
- $(component).width(width);
- $(component).height(height);
- $(component).attr('preserveAspectRatio', 'xMidYMid slice');
- if( isParentHeroBanner('noRenditionImage-' + id) ){
- console.log('rodou');
- console.log(this);
- $(this).addClass('testando');
- $(this).removeAttr('preserveAspectRatio');
- }
- if (isParentPromoTileComponent('imageNoRendition-' + id)) {
- $('#imageNoRendition-' + id).css('width', '100%');
- $(component).css('width', '100%');
- $(component).css('max-height', '100%');
- }
- if (zoom === 'true') {
- $(component).addClass('segmentation__image');
- }
- $('#imageNoRendition-' + id).prepend(component);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement