Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let _this: LengthOrStringAttributeAnimator = function (value?: AnyLength | string | null, tween?: Tween): Length | string | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
if (typeof value === "string") {
try {
value = Length.parse(value, _this._view._node);
} catch (swallow) {
// string value
}
} else {
value = Length.fromAny(value, _this._view._node);
}
}
_this.setState(value, tween);
return _this._view;
}
} as LengthOrStringAttributeAnimator;
(_this as any).__proto__ = this;
let _this: LengthOrStringStyleAnimator = function (value?: AnyLength | string | null, tween?: Tween, priority?: string | null): Length | string | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
if (typeof value === "string") {
try {
value = Length.parse(value, _this._view._node);
} catch (swallow) {
// string value
}
} else {
value = Length.fromAny(value, _this._view._node);
}
}
_this.setState(value, tween, priority);
return _this._view;
}
} as LengthOrStringStyleAnimator;
(_this as any).__proto__ = this;
let _this: LengthOrStringStyleAnimator = function (value?: AnyLength | string | null, tween?: Tween, priority?: string | null): Length | string | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
if (typeof value === "string") {
try {
value = Length.parse(value, _this._view._node);
} catch (swallow) {
// string value
}
} else {
value = Length.fromAny(value, _this._view._node);
}
}
_this.setState(value, tween, priority);
return _this._view;
}
} as LengthOrStringStyleAnimator;
(_this as any).__proto__ = this;
get: function (this: LengthAttributeAnimator): Length | null | undefined {
let value = this._value;
if (value === void 0) {
const attributeValue = this.attributeValue;
if (attributeValue) {
try {
value = Length.parse(attributeValue, this._view._node);
} catch (swallow) {
// nop
}
}
}
return value;
},
enumerable: true,
let _this: LengthOrStringAttributeAnimator = function (value?: AnyLength | string | null, tween?: Tween): Length | string | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
if (typeof value === "string") {
try {
value = Length.parse(value, _this._view._node);
} catch (swallow) {
// string value
}
} else {
value = Length.fromAny(value, _this._view._node);
}
}
_this.setState(value, tween);
return _this._view;
}
} as LengthOrStringAttributeAnimator;
(_this as any).__proto__ = this;
get: function (this: LengthStyleAnimator): Length | null | undefined {
let value = this._value;
if (value === void 0) {
const propertyValue = this.propertyValue;
if (propertyValue) {
try {
value = Length.parse(propertyValue, this._view._node);
} catch (swallow) {
// nop
}
}
}
return value;
},
enumerable: true,
static from(innerRadius: AnyLength = Length.zero(),
outerRadius: AnyLength = Length.zero(),
startAngle: AnyAngle = Angle.zero(),
sweepAngle: AnyAngle = Angle.zero(),
padAngle: AnyAngle = Angle.zero(),
padRadius: AnyLength | null = null,
cornerRadius: AnyLength = Length.zero(),
fill?: AnyColor | null,
stroke?: AnyColor | null,
strokeWidth?: AnyLength | null): ArcView {
innerRadius = Length.fromAny(innerRadius);
outerRadius = Length.fromAny(outerRadius);
startAngle = Angle.fromAny(startAngle);
sweepAngle = Angle.fromAny(sweepAngle);
padAngle = Angle.fromAny(padAngle);
padRadius = padRadius !== null ? Length.fromAny(padRadius) : null;
cornerRadius = Length.fromAny(cornerRadius);
const view = new ArcView(innerRadius, outerRadius, startAngle, sweepAngle,
padAngle, padRadius, cornerRadius);
if (fill !== void 0) {
view.fill(fill);
}
if (stroke !== void 0) {
view.stroke(stroke);
}
if (strokeWidth !== void 0) {
view.strokeWidth(strokeWidth);
let _this: LengthMemberAnimator = function (value?: AnyLength | null, tween?: Tween): Length | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
value = Length.fromAny(value);
}
_this.setState(value, tween);
return _this._view;
}
} as LengthMemberAnimator;
(_this as any).__proto__ = this;
let _this: LengthStyleAnimator = function (value?: AnyLength | null, tween?: Tween, priority?: string | null): Length | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
value = Length.fromAny(value, view._node);
}
_this.setState(value, tween, priority);
return _this._view;
}
} as LengthStyleAnimator;
(_this as any).__proto__ = this;
let _this: LengthAttributeAnimator = function (value?: AnyLength | null, tween?: Tween): Length | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
value = Length.fromAny(value, _this._view._node);
}
_this.setState(value, tween);
return _this._view;
}
} as LengthAttributeAnimator;
(_this as any).__proto__ = this;