fix(animations): register both style's "name" and "cssName" (#3810)

This commit is contained in:
Stanimira Vlaeva
2017-03-16 15:20:08 +02:00
committed by GitHub
parent 4e6952526b
commit 3ea7365871

View File

@@ -570,7 +570,11 @@ export class CssAnimationProperty<T extends Style, U> {
const propertyName = options.name;
this.name = propertyName;
CssAnimationProperty.properties[options.cssName || propertyName] = this;
CssAnimationProperty.properties[propertyName] = this;
if (options.cssName && options.cssName !== propertyName) {
CssAnimationProperty.properties[options.cssName] = this;
}
this._valueConverter = options.valueConverter;
const cssName = "css:" + (options.cssName || propertyName);