2013-02-07 52 views
1

当使用触摸设备时,用手指滚动页面是必要的,它捕获所有触摸事件以防止滚动。有一个黑客得到这个与highstock工作就像没有用于highcharts Highcharts Touch Hackhighstock艰难滚动

+0

在下一版本中,highcharts将更加人性化的触摸屏设备。 –

回答

0

可以扩展指针是这样的捏法:

Highcharts.wrap(Highcharts.Pointer.prototype, 'pinch', function pinch(proceed, e) { 
if (e.touches.length === 1 && e.type === 'touchmove') { 
    this.chart.pan(e, this.chart.options.panning) 
} else { 
    proceed.call(this, e) 
    if (e.type === 'touchstart') { 
    this.chart.mouseDownX = this.pinchDown[0].chartX 
    this.chart.mouseDownY = this.pinchDown[0].chartY 
    } 
} 
})