rem: if (this.cursorSnapsToPoints && this.dataSets.length > 0) { 
add: var snapToPoints = (this.cursorType == "snap");  if (snapToPoints && this.dataSets.length > 0) { 
context:     cursorMouseMove: function (event) {        if (!this.valid)            return;        if (this.cursorType != "free")            return;        var pos = YAHOO.util.Dom.getXY(this.frontBuffer);        pos[0] = pos[0] + this.borderLeft;        pos[1] = pos[1] + this.borderTop;        var secondsPerPixel = (this.endTime - this.startTime + this.offsetTime) / this.frontBuffer.width;        var valuesPerPixel = 1.0 / this.yScale;        var pointTime = (event.pageX - pos[0]) * secondsPerPixel + this.startTime;        var pointValue = (this.frontBuffer.height - (event.pageY - pos[1])) * valuesPerPixel + this.yOffset;        if (this.cursorSnapsToPoints && this.dataSets.length > 0) {            // find the nearest point to (pointTime, pointValue) in all the datasets            var distanceSquared = -1;            var nearestDSIndex, nearestPointIndex;            for (var i = 0; i < this.dataSets.length; i++) {                for (var j = this.dataSetIndices[i][0];                     j <= this.dataSetIndices[i][1];                     j++)                {                    var t = this.dataSets[i].data[j*2];                    var v = this.dataSets[i].data[j*2+1];                    var d = (pointTime-t)*(pointTime-t)/secondsPerPixel;                    if (this.dataSets.length > 1) {                        // Use the value as well, if we have more than one dataset displayed                        d += (pointValue-v)*(pointValue-v)/valuesPerPixel;                    }                    if (distanceSquared == -1 ||                        d < distanceSquared)                    {                        nearestDSIndex = i;                        nearestPointIndex = j;                        distanceSquared = d;                    }                }            }            pointTime = this.dataSets[nearestDSIndex].data[nearestPointIndex*2] + this.offsetTime / 2.0;            pointValue = this.dataSets[nearestDSIndex].data[nearestPointIndex*2 + 1];        }        this.cursorTime = pointTime;        this.cursorValue = pointValue;        //for adding extra_data variable to the status line         var extra_data = "";        for (var i = 0; i < this.dataSets.length; i++) {          if (this.dataSets[i].rawdata) {            if (Math.floor(this.cursorTime)*2+1 < this.dataSets[i].rawdata.length) {              extra_data += this.dataSets[i].rawdata[Math.floor(this.cursorTime)*2+1] + " ";            }          }        }        this.onCursorMoved.fire(this.cursorTime, this.cursorValue, extra_data);        this.redrawOverlayOnly();    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/dc0efeeaf8c2ddf0eaac280fc3b09cdc8391dc03/GraphCanvas.js/clean/webtools/new-graph/js/GraphCanvas.js