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: ColorOrStringAttributeAnimator = function (value?: AnyColor | string | null, tween?: Tween): Color | string | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
if (typeof value === "string") {
try {
value = Color.parse(value);
} catch (swallow) {
// string value
}
} else {
value = Color.fromAny(value);
}
}
_this.setState(value, tween);
return _this._view;
}
} as ColorOrStringAttributeAnimator;
(_this as any).__proto__ = this;
let _this: ColorOrStringStyleAnimator = function (value?: AnyColor | string | null, tween?: Tween, priority?: string | null): Color | string | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
if (typeof value === "string") {
try {
value = Color.parse(value);
} catch (swallow) {
// string value
}
} else {
value = Color.fromAny(value);
}
}
_this.setState(value, tween, priority);
return _this._view;
}
} as ColorOrStringStyleAnimator;
(_this as any).__proto__ = this;
let _this: ColorAttributeAnimator = function (value?: AnyColor | null, tween?: Tween): Color | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
value = Color.fromAny(value);
}
_this.setState(value, tween);
return _this._view;
}
} as ColorAttributeAnimator;
(_this as any).__proto__ = this;
constructor(id?: Value, mode: MirrorMode = MirrorMode.default) {
super();
if (id === void 0) {
id = Text.from(Data.random(6).toBase64());
}
this.onMouseDown = this.onMouseDown.bind(this);
this.onMouseMove = this.onMouseMove.bind(this);
this.onMouseUp = this.onMouseUp.bind(this);
this.onTouchStart = this.onTouchStart.bind(this);
this.onTouchMove = this.onTouchMove.bind(this);
this.onTouchCancel = this.onTouchCancel.bind(this);
this.onTouchEnd = this.onTouchEnd.bind(this);
this.id = id;
this.mode = mode;
this.color = Color.fromAny(MirrorView.colors[Math.floor(MirrorView.colors.length * Math.random())]);
this.captive = false;
this._touchCount = 0;
this._presses = {};
}
let _this: ColorMemberAnimator = function (value?: AnyColor | null, tween?: Tween): Color | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
value = Color.fromAny(value);
}
_this.setState(value, tween);
return _this._view;
}
} as ColorMemberAnimator;
(_this as any).__proto__ = this;
let _this: ColorStyleAnimator = function (value?: AnyColor | null, tween?: Tween, priority?: string | null): Color | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
value = Color.fromAny(value);
}
_this.setState(value, tween, priority);
return _this._view;
}
} as ColorStyleAnimator;
(_this as any).__proto__ = this;
this: ColorMemberAnimator, view: V, value?: AnyColor | null,
transition?: Transition | null, inherit?: string | null): ColorMemberAnimator {
let _this: ColorMemberAnimator = function (value?: AnyColor | null, tween?: Tween): Color | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
value = Color.fromAny(value);
}
_this.setState(value, tween);
return _this._view;
}
} as ColorMemberAnimator;
(_this as any).__proto__ = this;
if (value !== null && value !== void 0) {
value = Color.fromAny(value);
}
_this = _super.call(_this, view, value, transition, inherit) || _this;
return _this;
} as unknown as MemberAnimatorConstructor;
__extends(ColorMemberAnimator, _super);
let _this: ColorMemberAnimator = function (value?: AnyColor | null, tween?: Tween): Color | null | undefined | V {
if (value === void 0) {
return _this.value;
} else {
if (value !== null) {
value = Color.fromAny(value);
}
_this.setState(value, tween);
return _this._view;
}
} as ColorMemberAnimator;
(_this as any).__proto__ = this;