* get a usable string, used as event postfix * @param {Const} state * @returns {String} state
(state)
| 52981 | */ |
| 52982 | |
| 52983 | function stateStr(state) { |
| 52984 | if (state & STATE_CANCELLED) { |
| 52985 | return 'cancel'; |
| 52986 | } else if (state & STATE_ENDED) { |
| 52987 | return 'end'; |
| 52988 | } else if (state & STATE_CHANGED) { |
| 52989 | return 'move'; |
| 52990 | } else if (state & STATE_BEGAN) { |
| 52991 | return 'start'; |
| 52992 | } |
| 52993 | |
| 52994 | return ''; |
| 52995 | } |
| 52996 | /** |
| 52997 | * direction cons to string |
| 52998 | * @param {Const} direction |