Odo Object Fit
Fits media elements (img, video). It polyfills CSS' object-fit: cover; If the browser supports object-fit, it will not run. The media element should have full width and height as well as the object-fit property.
Install
npm install @odopod/odo-object-fit --save
Quick Start
.my-element {
width: 100%;
height: 100%;
object-fit: cover;
}
import OdoObjectFit from '@odopod/odo-object-fit';
OdoObjectFit.cover(myElement);
OdoObjectFit.cover([myElement, thatOtherElement]);
Visit the Odo component directory for demos, code examples, and documentation.
Background Video [1.1.1], Dual-viewer [1.1.1], Expandable [0.1.1], Helpers [2.0.1], Hotspots [1.2.1], Module [1.2.1], Object-fit [1.1.1], On-swipe [1.1.1], Responsive Attributes [1.1.1], Responsive Classes [1.1.1], Reveal [2.0.1], Share [1.1.1], Tabs [2.0.1], Tap [1.1.1], Video [1.2.1], Viewport [1.1.1] - 2018-02-23
Changed