UNPKG

igniteui-react-core

Version:
64 lines (63 loc) 2.5 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 { UIElementPropertyAccessor } from "./UIElementPropertyAccessor"; import { markType } from "./type"; import { CornerRadius } from "./CornerRadius"; import { stringReplace } from "./string"; import { isNaN_ } from "./number"; /** * @hidden */ export let CssCornerRadiusPropertyAccessor = /*@__PURE__*/ (() => { class CssCornerRadiusPropertyAccessor extends UIElementPropertyAccessor { constructor(a) { super(); this.f = null; this.g = null; this.e = null; this.d = null; this.h = null; this.h = a; this.f = "top-left-border-radius"; this.g = "top-right-border-radius"; this.e = "bottom-right-border-radius"; this.d = "bottom-left-border-radius"; } b(a) { let b = a; let c = b.getStyleProperty(this.f); let d = b.getStyleProperty(this.g); let e = b.getStyleProperty(this.e); let f = b.getStyleProperty(this.d); let g = parseFloat(stringReplace(c, "px", "")); let h = parseFloat(stringReplace(d, "px", "")); let i = parseFloat(stringReplace(e, "px", "")); let j = parseFloat(stringReplace(f, "px", "")); if (isNaN_(g)) { g = 0; } if (isNaN_(h)) { h = 0; } if (isNaN_(i)) { i = 0; } if (isNaN_(j)) { j = 0; } return new CornerRadius(1, g, h, i, j); } c(a, b) { let c = a; let d = b; let e = d.d + "px " + d.e + "px " + d.c + "px " + d.b + "px"; c.setStyleProperty(this.h, e); } } CssCornerRadiusPropertyAccessor.$t = /*@__PURE__*/ markType(CssCornerRadiusPropertyAccessor, 'CssCornerRadiusPropertyAccessor', UIElementPropertyAccessor.$); return CssCornerRadiusPropertyAccessor; })();