@@ -10,8 +10,6 @@ export const unsetValue: any = new Object();
10
10
let symbolPropertyMap = { } ;
11
11
let cssSymbolPropertyMap = { } ;
12
12
13
- let cssSymbolResetMap = { } ;
14
-
15
13
let inheritableProperties = new Array < InheritedProperty < any , any > > ( ) ;
16
14
let inheritableCssProperties = new Array < InheritedCssProperty < any , any > > ( ) ;
17
15
@@ -559,9 +557,10 @@ export class CssAnimationProperty<T extends Style, U> {
559
557
const { valueConverter, equalityComparer, valueChanged, defaultValue } = options ;
560
558
const propertyName = options . name ;
561
559
this . name = propertyName ;
562
- this . cssName = ( options . cssName || propertyName ) ;
563
560
564
561
const cssName = "css:" + ( options . cssName || propertyName ) ;
562
+ this . cssName = cssName ;
563
+
565
564
const keyframeName = "keyframe:" + propertyName ;
566
565
this . keyframe = keyframeName ;
567
566
const defaultName = "default:" + propertyName ;
@@ -623,10 +622,8 @@ export class CssAnimationProperty<T extends Style, U> {
623
622
const stylePropertyDescriptor = descriptor ( styleValue , ValueSource . Local , true , true , true ) ;
624
623
const keyframePropertyDescriptor = descriptor ( keyframeValue , ValueSource . Keyframe , false , false , false ) ;
625
624
626
- cssSymbolResetMap [ cssValue ] = cssName ;
627
- cssSymbolResetMap [ keyframeValue ] = keyframeName ;
628
-
629
625
symbolPropertyMap [ computedValue ] = this ;
626
+ cssSymbolPropertyMap [ computedValue ] = this ;
630
627
631
628
this . register = ( cls : { prototype : T } ) => {
632
629
cls . prototype [ defaultValueKey ] = options . defaultValue ;
@@ -640,6 +637,9 @@ export class CssAnimationProperty<T extends Style, U> {
640
637
Object . defineProperty ( cls . prototype , defaultName , defaultPropertyDescriptor ) ;
641
638
Object . defineProperty ( cls . prototype , cssName , cssPropertyDescriptor ) ;
642
639
Object . defineProperty ( cls . prototype , propertyName , stylePropertyDescriptor ) ;
640
+ if ( options . cssName && options . cssName != options . name ) {
641
+ Object . defineProperty ( cls . prototype , options . cssName , stylePropertyDescriptor ) ;
642
+ }
643
643
Object . defineProperty ( cls . prototype , keyframeName , keyframePropertyDescriptor ) ;
644
644
}
645
645
}
@@ -979,8 +979,9 @@ export function resetCSSProperties(style: Style): void {
979
979
let cssProperty ;
980
980
if ( cssProperty = cssSymbolPropertyMap [ symbol ] ) {
981
981
style [ cssProperty . cssName ] = unsetValue ;
982
- } else if ( cssProperty = cssSymbolResetMap [ symbol ] ) {
983
- style [ cssProperty ] = unsetValue ;
982
+ if ( cssProperty instanceof CssAnimationProperty ) {
983
+ style [ cssProperty . keyframe ] = unsetValue ;
4A31
984
+ }
984
985
}
985
986
}
986
987
}
0 commit comments