Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
MemberAnimator.prototype.update = function (this: MemberAnimator,
newValue: T, oldValue: T): void {
if (!Objects.equal(oldValue, newValue)) {
this.setDirty(true);
}
};
AttributeAnimator.prototype.update = function (this: AttributeAnimator,
newValue: T, oldValue: T): void {
if (!Objects.equal(oldValue, newValue)) {
this.willUpdate(newValue, oldValue);
this._view.setAttribute(this._name, newValue);
this.didUpdate(newValue, oldValue);
}
};
StyleAnimator.prototype.update = function (this: StyleAnimator,
newValue: T, oldValue: T): void {
if (!Objects.equal(oldValue, newValue)) {
this.willUpdate(newValue, oldValue);
const names = this._names;
if (typeof names === "string") {
this._view.setStyle(names, newValue, this.priority);
} else {
for (let i = 0, n = names.length; i < n; i += 1) {
this._view.setStyle(names[i], newValue, this.priority);
}
}
this.didUpdate(newValue, oldValue);
}
};
AttributeAnimator.prototype.update = function (this: AttributeAnimator,
newValue: T, oldValue: T): void {
if (!Objects.equal(oldValue, newValue)) {
this.willUpdate(newValue, oldValue);
this._view.setAttribute(this._name, newValue);
this.didUpdate(newValue, oldValue);
}
};
StyleAnimator.prototype.update = function (this: StyleAnimator,
newValue: T, oldValue: T): void {
if (!Objects.equal(oldValue, newValue)) {
this.willUpdate(newValue, oldValue);
const names = this._names;
if (typeof names === "string") {
this._view.setStyle(names, newValue, this.priority);
} else {
for (let i = 0, n = names.length; i < n; i += 1) {
this._view.setStyle(names[i], newValue, this.priority);
}
}
this.didUpdate(newValue, oldValue);
}
};