- var interactionModel = {
- mousedown: function(event, g, context) {
- context.initializeMouseDown(event, g, context);
- Dygraph.startPan(event, g, context);
- },
- mousemove: function(event, g, context) {
- if (context.isPanning) {
- Dygraph.movePan(event, g, context);
- }
- },
- mouseup: function(event, g, context) {
- if (context.isPanning) {
- Dygraph.endPan(event, g, context);
- }
+ onZoomHandleTouchEvent = function(e) {
+ e.preventDefault();
+ if (e.type == 'touchstart') {
+ onZoomStart(e.targetTouches[0]);
+ } else if (e.type == 'touchmove') {
+ onZoom(e.targetTouches[0]);
+ } else {
+ onZoomEnd(e);