@@ -34,16 +34,22 @@ keyReverse.go = function() {
3434 var newKeyIndex = thisProperty . addKey ( newKeyTime ) ;
3535
3636 //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 ] ) ;
4248
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+ }
4753
4854 //updating time
4955 if ( k < keys . length - 1 ) {
0 commit comments