@wordpress/block-library
Version:
Block library for the WordPress editor.
12 lines (11 loc) • 447 B
JavaScript
;
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
// packages/block-library/src/media-text/image-fill.js
function imageFillStyles(url, focalPoint) {
return url ? { objectPosition: focalPoint ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : `50% 50%` } : {};
}
exports.imageFillStyles = imageFillStyles;
//# sourceMappingURL=image-fill.cjs.map