* get a usable string, used as event postfix * @param {Const} state * @returns {String} state
(state)
| 93682 | * @param {Const} state |
| 93683 | * @returns {String} state |
| 93684 | */ function stateStr(state) { |
| 93685 | if (state & STATE_CANCELLED) return "cancel"; |
| 93686 | else if (state & STATE_ENDED) return "end"; |
| 93687 | else if (state & STATE_CHANGED) return "move"; |
| 93688 | else if (state & STATE_BEGAN) return "start"; |
| 93689 | return ""; |
| 93690 | } |
| 93691 | /** |
| 93692 | * direction cons to string |
| 93693 | * @param {Const} direction |