|
@@ -369,12 +369,24 @@ Diagram.prototype={
|
|
},
|
|
},
|
|
|
|
|
|
getX:function(d){
|
|
getX:function(d){
|
|
|
|
+ if(d<this.xMin){
|
|
|
|
+ d=this.xMin;
|
|
|
|
+ }
|
|
|
|
+ else if(d>this.xMax){
|
|
|
|
+ d=this.xMax;
|
|
|
|
+ }
|
|
return this.origin.x+(d-this.xMin)*this.xratio;
|
|
return this.origin.x+(d-this.xMin)*this.xratio;
|
|
//window.console.log("x:"+ret);
|
|
//window.console.log("x:"+ret);
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
getY:function(d){
|
|
getY:function(d){
|
|
|
|
+ if(d<this.yMin){
|
|
|
|
+ d=this.yMin;
|
|
|
|
+ }
|
|
|
|
+ else if(d>this.yMax){
|
|
|
|
+ d=this.yMax;
|
|
|
|
+ }
|
|
return this.origin.y-(d-this.yMin)*this.yratio;
|
|
return this.origin.y-(d-this.yMin)*this.yratio;
|
|
//window.console.log("y:"+ret);
|
|
//window.console.log("y:"+ret);
|
|
|
|
|