(nextButtons, ev)
| 29087 | } |
| 29088 | |
| 29089 | function handleEvent (nextButtons, ev) { |
| 29090 | var nextX = mouse.x(ev) |
| 29091 | var nextY = mouse.y(ev) |
| 29092 | if ('buttons' in ev) { |
| 29093 | nextButtons = ev.buttons | 0 |
| 29094 | } |
| 29095 | if (nextButtons !== buttonState || |
| 29096 | nextX !== x || |
| 29097 | nextY !== y || |
| 29098 | updateMods(ev)) { |
| 29099 | buttonState = nextButtons | 0 |
| 29100 | x = nextX || 0 |
| 29101 | y = nextY || 0 |
| 29102 | callback && callback(buttonState, x, y, mods) |
| 29103 | } |
| 29104 | } |
| 29105 | |
| 29106 | function clearState (ev) { |
| 29107 | handleEvent(0, ev) |
no test coverage detected
searching dependent graphs…