@@ -34,16 +34,22 @@ keyReverse.go = function() {
34
34
var newKeyIndex = thisProperty . addKey ( newKeyTime ) ;
35
35
36
36
//getting spatial and temporal ease values
37
- var newKeyInSpatialTangent = thisProperty . keyInSpatialTangent ( keys [ keys . length - k - 1 ] ) ;
38
- var newKeyOutSpatialTangent = thisProperty . keyOutSpatialTangent ( keys [ keys . length - k - 1 ] ) ;
39
-
40
- var newKeyInTemporalEase = thisProperty . keyInTemporalEase ( keys [ keys . length - k - 1 ] ) ;
41
- var newKeyOutTemporalEase = thisProperty . keyOutTemporalEase ( keys [ keys . length - k - 1 ] ) ;
37
+ if ( ( thisProperty . propertyValueType == PropertyValueType . TwoD_SPATIAL )
38
+ || ( thisProperty . propertyValueType == PropertyValueType . ThreeD_SPATIAL ) ) {
39
+ var newKeyInSpatialTangent = thisProperty . keyInSpatialTangent ( keys [ keys . length - k - 1 ] ) ;
40
+ var newKeyOutSpatialTangent = thisProperty . keyOutSpatialTangent ( keys [ keys . length - k - 1 ] ) ;
41
+ //setting both value and tangents / easing
42
+ thisProperty . setValueAtKey ( newKeyIndex , thisProperty . keyValue ( keys [ keys . length - k - 1 ] ) ) ;
43
+ thisProperty . setSpatialTangentsAtKey ( newKeyIndex , newKeyOutSpatialTangent , newKeyInSpatialTangent )
44
+ }
45
+ else {
46
+ var newKeyInTemporalEase = thisProperty . keyInTemporalEase ( keys [ keys . length - k - 1 ] ) ;
47
+ var newKeyOutTemporalEase = thisProperty . keyOutTemporalEase ( keys [ keys . length - k - 1 ] ) ;
42
48
43
- //setting both value and tangents / easing
44
- thisProperty . setValueAtKey ( newKeyIndex , thisProperty . keyValue ( keys [ keys . length - k - 1 ] ) ) ;
45
- thisProperty . setSpatialTangentsAtKey ( newKeyIndex , newKeyOutSpatialTangent , newKeyInSpatialTangent )
46
- thisProperty . setTemporalEaseAtKey ( newKeyIndex , newKeyOutTemporalEase , newKeyInTemporalEase )
49
+ //setting both value and tangents / easing
50
+ thisProperty . setValueAtKey ( newKeyIndex , thisProperty . keyValue ( keys [ keys . length - k - 1 ] ) ) ;
51
+ thisProperty . setTemporalEaseAtKey ( newKeyIndex , newKeyOutTemporalEase , newKeyInTemporalEase )
52
+ }
47
53
48
54
//updating time
49
55
if ( k < keys . length - 1 ) {
0 commit comments