UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

91 lines (90 loc) 3.37 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { CanvasCellPresenterBase } from "./CanvasCellPresenterBase"; import { CellModel } from "./CellModel"; import { ImageCellModel } from "./ImageCellModel"; import { markType } from "igniteui-react-core"; import { stringStartsWith } from "igniteui-react-core"; /** * @hidden */ export let CanvasImageCellPresenter = /*@__PURE__*/ (() => { class CanvasImageCellPresenter extends CanvasCellPresenterBase { constructor(a) { super(a); } get d() { return this.a; } b(a) { super.b(a); let b = a; if (a.a3) { if (a.a8(CellModel.fa) || a.a8(CellModel.hc)) { let c = Math.min(1, Math.max(0, a.ct)); let d = a.cj * (1 - c); this.d.dd = d; } if (b.a8(ImageCellModel.mj) || b.a8(ImageCellModel.mk)) { this.e(b.mn, b.mg); } if (b.a8(ImageCellModel.ml) || b.a8(ImageCellModel.fw) || b.a8(ImageCellModel.hb)) { this.f(b.mi, b.g, b.i); } if (b.a8(ImageCellModel.g6)) { if (a.u == 1) { this.d.dg(); } else if (a.u == 2) { this.e(b.mn, b.mg); } } } } f(a, b, c) { } e(a, b) { let c = a.toLowerCase(); if (b == 0) { b = 4; } if (stringStartsWith(c, "http") || b == 4) { this.d.di(a, 4); } if (stringStartsWith(c, "asset") || b == 2) { let d = a; if (stringStartsWith(c, "asset")) { d = a.substr(8); } this.d.di(d, 2); } if (stringStartsWith(c, "drawable") || b == 1) { let e = a; if (stringStartsWith(c, "drawable")) { e = a.substr(11); } this.d.di(e, 1); } if (stringStartsWith(c, "nativeresource") || b == 1) { let f = a; if (stringStartsWith(c, "nativeresource")) { f = a.substr(17); } this.d.di(f, 1); } if (stringStartsWith(c, "embeddedresource") || b == 3) { let g = a; if (stringStartsWith(c, "embeddedresource")) { g = a.substr(19); } this.d.di(g, 3); } } } CanvasImageCellPresenter.$t = /*@__PURE__*/ markType(CanvasImageCellPresenter, 'CanvasImageCellPresenter', CanvasCellPresenterBase.$); return CanvasImageCellPresenter; })();