()
| 1246 | return touches; |
| 1247 | } |
| 1248 | function started() { |
| 1249 | var now = Date.now(), touches = relocate(); |
| 1250 | if (touches.length === 1) { |
| 1251 | if (now - touchtime < 500) { |
| 1252 | var p = touches[0], l = locations0[p.identifier]; |
| 1253 | scaleTo(scale * 2); |
| 1254 | translateTo(p, l); |
| 1255 | d3_eventPreventDefault(); |
| 1256 | dispatch(event_); |
| 1257 | } |
| 1258 | touchtime = now; |
| 1259 | } else if (touches.length > 1) { |
| 1260 | var p = touches[0], q = touches[1], dx = p[0] - q[0], dy = p[1] - q[1]; |
| 1261 | distance0 = dx * dx + dy * dy; |
| 1262 | } |
| 1263 | } |
| 1264 | function moved() { |
| 1265 | var touches = d3.touches(target), p0 = touches[0], l0 = locations0[p0.identifier]; |
| 1266 | if (p1 = touches[1]) { |
no test coverage detected