UNPKG

630 BJavaScriptView Raw
1import { __decorate } from "tslib";
2import { singleton } from 'mana-syringe';
3import { CSSUnitValue } from '../cssom';
4import { parseNumberList } from '../parser';
5
6var CSSPropertyAnchor =
7/** @class */
8function () {
9 function CSSPropertyAnchor() {
10 this.parser = parseNumberList;
11 }
12
13 CSSPropertyAnchor.prototype.calculator = function (name, oldParsed, parsed, object) {
14 if (parsed.length === 2) {
15 return [parsed[0], parsed[1], new CSSUnitValue(0)];
16 }
17
18 return parsed;
19 };
20
21 CSSPropertyAnchor = __decorate([singleton()], CSSPropertyAnchor);
22 return CSSPropertyAnchor;
23}();
24
25export { CSSPropertyAnchor };
\No newline at end of file