UNPKG

@mikezimm/npmfunctions

Version:
115 lines 4.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.imageOptionsGroup = exports.ImageOptionsGroup = void 0; var Image_1 = require("office-ui-fabric-react/lib/Image"); var ImageOptionsGroup = /** @class */ (function () { function ImageOptionsGroup() { this.imgFitChoices = [ { index: 0, key: 'center', text: 'Center' }, { index: 1, key: 'contain', text: 'Contain' }, { index: 2, key: 'cover', text: 'Cover' }, { index: 3, key: 'none', text: 'None' }, { index: 4, key: 'centerCover', text: 'CenterCover' }, { index: 5, key: 'centerContain', text: 'CenterContain' }, ]; this.imgCoverChoices = [ { index: 0, key: 'landscape', text: "Landscape ^ stretch full height v" }, { index: 1, key: 'portrait', text: "Portrait < stretch full width >" }, ]; this.imgTargetChoices = [ { index: 0, key: 'top', text: "Full Body (_top)" }, { index: 1, key: 'blank', text: "New Window (_blank)" }, ]; this.imgTargetChoicesAll = [ { index: 0, key: 'top', text: "Full Body (_top)" }, { index: 1, key: 'blank', text: "New Window (_blank)" }, // These do not seem to work. { index: 2, key: 'self', text: "Same Frame (_self)" }, { index: 3, key: 'parent', text: "Parent Frameset (_parent)" }, ]; this.hoverZoomChoices = [ { index: 0, key: '1.1', text: "1.1 x" }, { index: 1, key: '1.2', text: "1.2 x" }, { index: 9, key: '1.0', text: "1.0 - no zoom animation" }, ]; this.hoverZoomChoicesAll = [ { index: 0, key: '1.1', text: "1.1 x" }, { index: 1, key: '1.2', text: "1.2 x" }, { index: 2, key: '1.5', text: "1.5 x" }, { index: 3, key: '2.0', text: "2.0 x" }, { index: 9, key: '1.0', text: "1.0 - no zoom animation" }, ]; } ImageOptionsGroup.prototype.getImgFit = function (findMe) { if (findMe === 'center') { return Image_1.ImageFit.center; } else if (findMe === 'contain') { return Image_1.ImageFit.contain; } else if (findMe === 'cover') { return Image_1.ImageFit.cover; } else if (findMe === 'none') { return Image_1.ImageFit.none; } else if (findMe === 'centerContain') { return Image_1.ImageFit.centerContain; } else if (findMe === 'centerCover') { return Image_1.ImageFit.centerCover; } else { return Image_1.ImageFit.centerCover; } }; ImageOptionsGroup.prototype.getImgCover = function (findMe) { if (findMe === 'landscape') { return Image_1.ImageCoverStyle.landscape; } else { return Image_1.ImageCoverStyle.portrait; } }; ImageOptionsGroup.prototype.getTarget = function (findMe) { if (findMe === 'blank') { return "_blank"; } else if (findMe === 'self') { return "_self"; } else if (findMe === 'parent') { return "_parent"; } else if (findMe === 'top') { return "_top"; } else { return "_top"; } }; ImageOptionsGroup.prototype.getHoverZoom = function (findMe) { if (findMe === '1.0') { return 1; } else if (findMe === '1.1') { return 1.1; } else if (findMe === '1.2') { return 1.2; } else if (findMe === '1.5') { return 1.2; } else if (findMe === '2.0') { return 1.2; } else { return 0; } }; return ImageOptionsGroup; }()); exports.ImageOptionsGroup = ImageOptionsGroup; exports.imageOptionsGroup = new ImageOptionsGroup(); //# sourceMappingURL=Options.js.map