igniteui-react-core
Version:
Ignite UI React Core.
46 lines (45 loc) • 1.79 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 { stringReplace } from "./string";
import { isNaN_ } from "./number";
/**
* @hidden
*/
var CssPixelsPropertyAccessor = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(CssPixelsPropertyAccessor, _super);
function CssPixelsPropertyAccessor(a) {
var _this = _super.call(this) || this;
_this.d = null;
_this.d = a;
return _this;
}
CssPixelsPropertyAccessor.prototype.b = function (a) {
var b = a;
var c = b.getStyleProperty(this.d);
var d = parseFloat(stringReplace(c, "px", ""));
if (isNaN_(d)) {
d = 0;
}
return d;
};
CssPixelsPropertyAccessor.prototype.c = function (a, b) {
var c = a;
var d = b;
if (isNaN_(d)) {
c.setStyleProperty(this.d, null);
return;
}
var e = d + "px";
c.setStyleProperty(this.d, e);
};
CssPixelsPropertyAccessor.$t = markType(CssPixelsPropertyAccessor, 'CssPixelsPropertyAccessor', UIElementPropertyAccessor.$);
return CssPixelsPropertyAccessor;
}(UIElementPropertyAccessor));
export { CssPixelsPropertyAccessor };