UNPKG

igniteui-react-core

Version:
82 lines (81 loc) 2.98 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 { __extends } from "tslib"; import { UIElementPropertyAccessor } from "./UIElementPropertyAccessor"; import { typeCast, markType } from "./type"; import { MatrixTransform } from "./MatrixTransform"; import { Matrix } from "./Matrix"; import { TransformMatrixHelpler } from "./TransformMatrixHelpler"; import { stringReplace } from "./string"; /** * @hidden */ var CssTransformPropertyAccessor = /** @class */ /*@__PURE__*/ (function (_super) { __extends(CssTransformPropertyAccessor, _super); function CssTransformPropertyAccessor(a) { var _this = _super.call(this) || this; _this.d = null; _this.d = a; return _this; } CssTransformPropertyAccessor.prototype.b = function (a) { var b = a; var c = b.getStyleProperty(this.d); if (c == null || c.length == 0) { return null; } c = stringReplace(stringReplace(c, "matrix(", ""), ")", ""); var d = c.split(','); if (d.length != 6) { var e = new Matrix(); e.k = 0; e.j = 1; e.l = 0; e.m = 1; e.n = 0; e.o = 0; return e; } var f = parseFloat(d[0].trim()); var g = parseFloat(d[1].trim()); var h = parseFloat(d[2].trim()); var i = parseFloat(d[3].trim()); var j = parseFloat(d[4].trim()); var k = parseFloat(d[5].trim()); var l = new MatrixTransform(); var m = new Matrix(); m.j = f; m.k = g; m.l = h; m.m = i; m.n = j; m.o = k; l.j = m; return l; }; CssTransformPropertyAccessor.prototype.c = function (a, b) { var c = null; if (typeCast(MatrixTransform.$, b) !== null) { c = b; } else { c = new MatrixTransform(); c.j = TransformMatrixHelpler.f(b); } var d = a; if (c == null || c.j == null) { d.setStyleProperty(this.d, ""); return; } var e = c.j; var f = "matrix(" + e.j + ", " + e.k + ", " + e.l + ", " + e.m + ", " + e.n + ", " + e.o + ")"; d.setStyleProperty(this.d, f); }; CssTransformPropertyAccessor.$t = markType(CssTransformPropertyAccessor, 'CssTransformPropertyAccessor', UIElementPropertyAccessor.$); return CssTransformPropertyAccessor; }(UIElementPropertyAccessor)); export { CssTransformPropertyAccessor };