rem: if (g == SmallPerfGraph || autoExpand) g.expandTimeRange(ds.firstTime, ds.lastTime); 
add: if (g == SmallPerfGraph || autoExpand) { g.expandTimeRange(Math.max(ds.firstTime, gCurrentLoadRange ? gCurrentLoadRange[0] : ds.firstTime), Math.min(ds.lastTime, gCurrentLoadRange ? gCurrentLoadRange[1] : ds.lastTime)); }  
context: function onGraphLoadRemainder(baselineDataSet) {    for each (var graphModule in GraphFormModules) {        log ("onGraphLoadRemainder: ", graphModule.id, graphModule.testId, "color:", graphModule.color);        // this would have been loaded earlier        if (graphModule.baseline)            continue;        var autoExpand = true;        if (SmallPerfGraph.selectionType == "range" &&            SmallPerfGraph.selectionStartTime &&            SmallPerfGraph.selectionEndTime)        {            BigPerfGraph.setTimeRange (SmallPerfGraph.selectionStartTime, SmallPerfGraph.selectionEndTime);            autoExpand = false;        }        // we need a new closure here so that we can get the right value        // of graphModule in our closure        var makeCallback = function (module) {            return function (testid, ds) {                try {                    ds.color = module.color;                    if (baselineDataSet)                        ds = ds.createRelativeTo(baselineDataSet);                    log ("got ds:", ds.firstTime, ds.lastTime, ds.data.length);                    var avgds = null;                    if (baselineDataSet == null &&                        graphModule.average)                    {                        avgds = ds.createAverage(gAverageInterval);                    }                    if (avgds)                        log ("got avgds:", avgds.firstTime, avgds.lastTime, avgds.data.length);                    for each (g in [BigPerfGraph, SmallPerfGraph]) {                        g.addDataSet(ds);                        if (avgds)                            g.addDataSet(avgds);                        if (g == SmallPerfGraph || autoExpand)                            g.expandTimeRange(ds.firstTime, ds.lastTime);                        g.autoScale();                        g.redraw();                        gReadyForRedraw = true;                    }                    updateLinkToThis();                } catch(e) { log(e); }            };        };        Tinderbox.requestDataSetFor (graphModule.testId, makeCallback(graphModule));    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/7a438970296c1626fbfcb633ed5273b4f408c6a9/graph.js/buggy/webtools/new-graph/js/graph.js