394
* Zooming x and y -axis when using Safari webkit browser on a touchdevice.
396
WINDOW.prototype.PinchZoom = function(values) {
398
if(values.device == "iPhone")
400
var scale_min = 0.34;
403
if(values.device == "iPad"){
404
var scale_min = 0.26;
407
if(values.device != "undefined"){
409
if(values.scale > scale_max){ values.scale = scale_max;}
411
if(values.startX > values.marginsLeft) {
412
var xmin = this.graph.xmin;
413
var xmax = this.graph.xmax;
414
var xzoomedmin = values.startX;
415
if(values.scale > 1){
416
var xzoomedmax = adeiMathPreciseAdd(xzoomedmin,(xmax-xzoomedmin)/scale_max*(values.scale));
417
this.SetCustomWindow(xzoomedmin,xzoomedmax);
419
if(values.scale < 1){
420
this.CenterZoomOut();
427
for(var i = 0; i < values.y.length; i++){
428
this.YZoomOut(i, values.y[i]);
431
else if ( values.scale > 1){
432
for(var i = 0; i < values.y.length; i++){
433
this.YZoomIn(i, values.y[i]);
442
else{alert("Unknown touchdevice");}
446
* Moves graph axis a step to swiped direction
448
WINDOW.prototype.Swipe = function(direction){
394
466
WINDOW.prototype.Lock = function() {
395
467
if ((this.graph)&&(this.cfg.width >= 0)) {