Document _getCanonicalTransitions
This commit is contained in:
parent
e9719b1766
commit
3b8b2cf500
1 changed files with 5 additions and 12 deletions
|
@ -119,18 +119,11 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Canonicalise an array of transitions into an array of transitions and how many times
|
* Canonicalise an array of transitions such that some pairs of transitions become
|
||||||
* they are repeated consecutively.
|
* single transitions. For example an input ['joined','left'] would result in an output
|
||||||
*
|
* ['joined_and_left'].
|
||||||
* An array of 123 "joined_and_left" transitions, would result in:
|
* @param {string[]} transitions an array of transitions.
|
||||||
* ```
|
* @returns {string[]} an array of transitions.
|
||||||
* [{
|
|
||||||
* transitionType: "joined_and_left"
|
|
||||||
* repeats: 123
|
|
||||||
* }, ... ]
|
|
||||||
* ```
|
|
||||||
* @param {string[]} transitions the array of transitions to transform.
|
|
||||||
* @returns {object[]} an array of truncated transitions.
|
|
||||||
*/
|
*/
|
||||||
_getCanonicalTransitions: function(transitions) {
|
_getCanonicalTransitions: function(transitions) {
|
||||||
let modMap = {
|
let modMap = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue