igniteui-react-core
Version:
Ignite UI React Core.
52 lines (51 loc) • 2.15 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 { Number_$type, markType } from "./type";
import { DoubleCollection } from "./DoubleCollection";
import { stringReplace, stringJoin1 } from "./string";
import { isNaN_ } from "./number";
/**
* @hidden
*/
var CssLengthArrayPropertyAccessor = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(CssLengthArrayPropertyAccessor, _super);
function CssLengthArrayPropertyAccessor(a) {
var _this = _super.call(this) || this;
_this.d = null;
_this.d = a;
return _this;
}
CssLengthArrayPropertyAccessor.prototype.b = function (a) {
var b = new DoubleCollection();
var c = a;
var d = c.getStyleProperty(this.d);
var e = d.split(' ');
for (var f = 0; f < e.length; f++) {
var g = parseFloat(stringReplace(e[f], "px", ""));
if (isNaN_(g)) {
g = 0;
}
b.add(g);
}
return b;
};
CssLengthArrayPropertyAccessor.prototype.c = function (a, b) {
var c = a;
var d = b;
var e = new Array(d.count);
for (var f = 0; f < d.count; f++) {
e[f] = d._inner[f].toString();
}
var g = stringJoin1(Number_$type, " ", d);
c.setStyleProperty(this.d, g);
};
CssLengthArrayPropertyAccessor.$t = markType(CssLengthArrayPropertyAccessor, 'CssLengthArrayPropertyAccessor', UIElementPropertyAccessor.$);
return CssLengthArrayPropertyAccessor;
}(UIElementPropertyAccessor));
export { CssLengthArrayPropertyAccessor };