(upEvent: PointerEvent)
| 145 | } |
| 146 | |
| 147 | function onPointerUp(upEvent: PointerEvent) { |
| 148 | if (upEvent.pointerId !== downEvent.pointerId) { |
| 149 | return; |
| 150 | } |
| 151 | |
| 152 | destroy(); |
| 153 | |
| 154 | options.up?.(upEvent, downEvent); |
| 155 | |
| 156 | if (dragging) { |
| 157 | options.dragEnd?.(upEvent, downEvent); |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | return () => cancel(true); |
| 162 | } |