mbostock/d3 — pull request #1378 by tschaub (2013-07-09 23:41:45+00:00)
Title: Preserve user provided extent when resizing

Currently, if a brush is created or updated with a user provided extent, all extent values may be modified even if only a single drag handle is adjusted. This makes it difficult to use the returned brush extent when the initially set values are significant (e.g. if a brush is used as a time slider and the user adjusts the end time, we don't expect the start time to change).

Instead of clearing the entire cached extent any time one of the brush edges is moved, only the modified value should be cleared from the cached extent. Then when getting a new extent, only the required values should be recalculated.

This example demonstrates the issue: http://bl.ocks.org/tschaub/5962208