Closed izimuth closed 2 years ago
The Img(...).cover utility function does not actually produce the CSS cover effect.
See here - https://github.com/rdkcentral/Lightning-SDK/blob/3f46a19d2f2ccbd5c7c6443b98dd5db0d1b8f675/src/Img/index.js#L42
and here - https://github.com/rdkcentral/Lightning-SDK/blob/3f46a19d2f2ccbd5c7c6443b98dd5db0d1b8f675/src/Img/index.js#L84
What happens is the make() function doesn't see the type of 'cover' as valid, and reverts it to 'contain'
This can probably be fixed by using this instead:
if (options.type != 'cover') { if (options.type === 'crop') options.type = 'cover' else options.type = 'contain' }
Hi @iandeansmith, this should be fixed in PR #316 (which has been merged into dev and will be released soon).
This issue is fixed at #316 and is released in version 5.0.0 of SDK
The Img(...).cover utility function does not actually produce the CSS cover effect.
See here - https://github.com/rdkcentral/Lightning-SDK/blob/3f46a19d2f2ccbd5c7c6443b98dd5db0d1b8f675/src/Img/index.js#L42
and here - https://github.com/rdkcentral/Lightning-SDK/blob/3f46a19d2f2ccbd5c7c6443b98dd5db0d1b8f675/src/Img/index.js#L84
What happens is the make() function doesn't see the type of 'cover' as valid, and reverts it to 'contain'
This can probably be fixed by using this instead: