Closed Maximilianos closed 9 years ago
A pull request would be great. When doing it, can you please check if the visual tests still work as expected?
sure on it :+1:
Ok pushed in: https://github.com/anselmh/object-fit/pull/43 Can you bump the patch version so that the npm picks up the change, plz?
@Maximilianos Pushed 0.4.3 now. Cheers!
:tada: :smile: thanks!
https://github.com/anselmh/object-fit/blob/master/src/polyfill.object-fit.core.js#L134 and https://github.com/anselmh/object-fit/blob/master/src/polyfill.object-fit.core.js#L143 mean that any classes on the default image get replaced completely by the object-fit polyfill.
My issue is that I am using @aFarkas's https://github.com/aFarkas/lazysizes which works with the class
lazyload
to watch for images to lazy-load. When the object-fit polyfill is applied on the image as below, the image never loads because the classlazyload
on the element is replaced withx-object-fit-taller
.Shall I create a pull request? the change would be to change it to:
replacedElement.className += ' x-object-fit-taller';
for example.The code for reference. Webpack+Babel used to package modules.