()
| 1194 | dispatch(event.of(this, arguments)); |
| 1195 | } |
| 1196 | function touchstart() { |
| 1197 | var touches = d3.touches(this), now = Date.now(); |
| 1198 | scale0 = scale; |
| 1199 | translate0 = {}; |
| 1200 | touches.forEach(function(t) { |
| 1201 | translate0[t.identifier] = location(t); |
| 1202 | }); |
| 1203 | d3_eventCancel(); |
| 1204 | if (touches.length === 1) { |
| 1205 | if (now - touchtime < 500) { |
| 1206 | var p = touches[0], l = location(touches[0]); |
| 1207 | scaleTo(scale * 2); |
| 1208 | translateTo(p, l); |
| 1209 | dispatch(event.of(this, arguments)); |
| 1210 | } |
| 1211 | touchtime = now; |
| 1212 | } |
| 1213 | } |
| 1214 | function touchmove() { |
| 1215 | var touches = d3.touches(this), p0 = touches[0], l0 = translate0[p0.identifier]; |
| 1216 | if (p1 = touches[1]) { |
nothing calls this directly
no test coverage detected