igniteui-react-core
Version:
Ignite UI React Core.
66 lines (65 loc) • 2.61 kB
JavaScript
/*
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 { markType } from "./type";
import { CornerRadius } from "./CornerRadius";
import { stringReplace } from "./string";
import { isNaN_ } from "./number";
/**
* @hidden
*/
var CssCornerRadiusPropertyAccessor = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(CssCornerRadiusPropertyAccessor, _super);
function CssCornerRadiusPropertyAccessor(a) {
var _this = _super.call(this) || this;
_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";
return _this;
}
CssCornerRadiusPropertyAccessor.prototype.b = function (a) {
var b = a;
var c = b.getStyleProperty(this.f);
var d = b.getStyleProperty(this.g);
var e = b.getStyleProperty(this.e);
var f = b.getStyleProperty(this.d);
var g = parseFloat(stringReplace(c, "px", ""));
var h = parseFloat(stringReplace(d, "px", ""));
var i = parseFloat(stringReplace(e, "px", ""));
var 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);
};
CssCornerRadiusPropertyAccessor.prototype.c = function (a, b) {
var c = a;
var d = b;
var e = d.d + "px " + d.e + "px " + d.c + "px " + d.b + "px";
c.setStyleProperty(this.h, e);
};
CssCornerRadiusPropertyAccessor.$t = markType(CssCornerRadiusPropertyAccessor, 'CssCornerRadiusPropertyAccessor', UIElementPropertyAccessor.$);
return CssCornerRadiusPropertyAccessor;
}(UIElementPropertyAccessor));
export { CssCornerRadiusPropertyAccessor };