office-ui-fabric-react
Version:
Reusable React components for building experiences for Microsoft 365.
84 lines • 4.12 kB
JavaScript
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* The possible methods that can be used to fit the image.
* {@docCategory Image}
*/
var ImageFit;
(function (ImageFit) {
/**
* The image is not scaled. The image is centered and cropped within the content box.
*/
ImageFit[ImageFit["center"] = 0] = "center";
/**
* The image is scaled to maintain its aspect ratio while being fully contained within the frame. The image will
* be centered horizontally and vertically within the frame. The space in the top and bottom or in the sides of
* the frame will be empty depending on the difference in aspect ratio between the image and the frame.
*/
ImageFit[ImageFit["contain"] = 1] = "contain";
/**
* The image is scaled to maintain its aspect ratio while filling the frame. Portions of the image will be cropped
* from the top and bottom, or the sides, depending on the difference in aspect ratio between the image and the frame.
*/
ImageFit[ImageFit["cover"] = 2] = "cover";
/**
* Neither the image nor the frame are scaled. If their sizes do not match, the image will either be cropped or the
* frame will have empty space.
*/
ImageFit[ImageFit["none"] = 3] = "none";
/**
* The image will be centered horizontally and vertically within the frame and maintains its aspect ratio. It will
* behave as ImageFit.center if the image's natural height or width is less than the Image frame's height or width,
* but if both natural height and width are larger than the frame it will behave as ImageFit.cover.
*/
ImageFit[ImageFit["centerCover"] = 4] = "centerCover";
/**
* The image will be centered horizontally and vertically within the frame and maintains its aspect ratio. It will
* behave as ImageFit.center if the image's natural height and width is less than the Image frame's height and width,
* but if either natural height or width are larger than the frame it will behave as ImageFit.contain.
*/
ImageFit[ImageFit["centerContain"] = 5] = "centerContain";
})(ImageFit = exports.ImageFit || (exports.ImageFit = {}));
/**
* The cover style to be used on the image
* {@docCategory Image}
*/
var ImageCoverStyle;
(function (ImageCoverStyle) {
/**
* The image will be shown at 100% height of container and the width will be scaled accordingly
*/
ImageCoverStyle[ImageCoverStyle["landscape"] = 0] = "landscape";
/**
* The image will be shown at 100% width of container and the height will be scaled accordingly
*/
ImageCoverStyle[ImageCoverStyle["portrait"] = 1] = "portrait";
})(ImageCoverStyle = exports.ImageCoverStyle || (exports.ImageCoverStyle = {}));
/**
* {@docCategory Image}
*/
var ImageLoadState;
(function (ImageLoadState) {
/**
* The image has not yet been loaded, and there is no error yet.
*/
ImageLoadState[ImageLoadState["notLoaded"] = 0] = "notLoaded";
/**
* The image has been loaded successfully.
*/
ImageLoadState[ImageLoadState["loaded"] = 1] = "loaded";
/**
* An error has been encountered while loading the image.
*/
ImageLoadState[ImageLoadState["error"] = 2] = "error";
/**
* Deprecated at v1.3.6, to replace the src in case of errors, use `onLoadingStateChange` instead
* and rerender the Image with a difference src.
* @deprecated Use `onLoadingStateChange` instead
* and rerender the Image with a difference src.
*/
ImageLoadState[ImageLoadState["errorLoaded"] = 3] = "errorLoaded";
})(ImageLoadState = exports.ImageLoadState || (exports.ImageLoadState = {}));
});
//# sourceMappingURL=Image.types.js.map