| 134087 | ], object); |
| 134088 | } |
| 134089 | function fitWidth(projection, width, object) { |
| 134090 | return fit(projection, function(b) { |
| 134091 | var w = +width, k = w / (b[1][0] - b[0][0]), x = (w - k * (b[1][0] + b[0][0])) / 2, y = -k * b[0][1]; |
| 134092 | projection.scale(150 * k).translate([ |
| 134093 | x, |
| 134094 | y |
| 134095 | ]); |
| 134096 | }, object); |
| 134097 | } |
| 134098 | function fitHeight(projection, height, object) { |
| 134099 | return fit(projection, function(b) { |
| 134100 | var h = +height, k = h / (b[1][1] - b[0][1]), x = -k * b[0][0], y = (h - k * (b[1][1] + b[0][1])) / 2; |