|
1182 | 1182 | svg.remove(); |
1183 | 1183 | } |
1184 | 1184 | } |
1185 | | - if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY; else point.x = e.clientX, |
| 1185 | + if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY; else point.x = e.clientX, |
1186 | 1186 | point.y = e.clientY; |
1187 | 1187 | point = point.matrixTransform(container.getScreenCTM().inverse()); |
1188 | 1188 | return [ point.x, point.y ]; |
|
1557 | 1557 | } |
1558 | 1558 | function mousewheeled() { |
1559 | 1559 | var dispatch = event.of(this, arguments); |
1560 | | - if (mousewheelTimer) clearTimeout(mousewheelTimer); else d3_selection_interrupt.call(this), |
| 1560 | + if (mousewheelTimer) clearTimeout(mousewheelTimer); else d3_selection_interrupt.call(this), |
1561 | 1561 | translate0 = location(center0 = center || d3.mouse(this)), zoomstarted(dispatch); |
1562 | 1562 | mousewheelTimer = setTimeout(function() { |
1563 | 1563 | mousewheelTimer = null; |
|
1926 | 1926 | d3.xhr = d3_xhrType(d3_identity); |
1927 | 1927 | function d3_xhrType(response) { |
1928 | 1928 | return function(url, mimeType, callback) { |
1929 | | - if (arguments.length === 2 && typeof mimeType === "function") callback = mimeType, |
| 1929 | + if (arguments.length === 2 && typeof mimeType === "function") callback = mimeType, |
1930 | 1930 | mimeType = null; |
1931 | 1931 | return d3_xhr(url, mimeType, response, callback); |
1932 | 1932 | }; |
1933 | 1933 | } |
1934 | 1934 | function d3_xhr(url, mimeType, response, callback) { |
1935 | 1935 | var xhr = {}, dispatch = d3.dispatch("beforesend", "progress", "load", "error"), headers = {}, request = new XMLHttpRequest(), responseType = null; |
1936 | | - if (this.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest(); |
| 1936 | + if (self.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest(); |
1937 | 1937 | "onload" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() { |
1938 | 1938 | request.readyState > 3 && respond(); |
1939 | 1939 | }; |
|
2772 | 2772 | return n ? (date.y = d3_time_expandYear(+n[0]), i + n[0].length) : -1; |
2773 | 2773 | } |
2774 | 2774 | function d3_time_parseZone(date, string, i) { |
2775 | | - return /^[+-]\d{4}$/.test(string = string.slice(i, i + 5)) ? (date.Z = -string, |
| 2775 | + return /^[+-]\d{4}$/.test(string = string.slice(i, i + 5)) ? (date.Z = -string, |
2776 | 2776 | i + 5) : -1; |
2777 | 2777 | } |
2778 | 2778 | function d3_time_expandYear(d) { |
|
2965 | 2965 | var λ00, φ00, λ0, cosφ0, sinφ0; |
2966 | 2966 | d3_geo_area.point = function(λ, φ) { |
2967 | 2967 | d3_geo_area.point = nextPoint; |
2968 | | - λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + π / 4), |
| 2968 | + λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + π / 4), |
2969 | 2969 | sinφ0 = Math.sin(φ); |
2970 | 2970 | }; |
2971 | 2971 | function nextPoint(λ, φ) { |
|
4794 | 4794 | return _ ? center([ -_[1], _[0] ]) : (_ = center(), [ _[1], -_[0] ]); |
4795 | 4795 | }; |
4796 | 4796 | projection.rotate = function(_) { |
4797 | | - return _ ? rotate([ _[0], _[1], _.length > 2 ? _[2] + 90 : 90 ]) : (_ = rotate(), |
| 4797 | + return _ ? rotate([ _[0], _[1], _.length > 2 ? _[2] + 90 : 90 ]) : (_ = rotate(), |
4798 | 4798 | [ _[0], _[1], _[2] - 90 ]); |
4799 | 4799 | }; |
4800 | 4800 | return rotate([ 0, 0, 90 ]); |
|
5648 | 5648 | }; |
5649 | 5649 | quadtree.extent = function(_) { |
5650 | 5650 | if (!arguments.length) return x1 == null ? null : [ [ x1, y1 ], [ x2, y2 ] ]; |
5651 | | - if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = +_[0][0], y1 = +_[0][1], x2 = +_[1][0], |
| 5651 | + if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = +_[0][0], y1 = +_[0][1], x2 = +_[1][0], |
5652 | 5652 | y2 = +_[1][1]; |
5653 | 5653 | return quadtree; |
5654 | 5654 | }; |
|
7373 | 7373 | return d3_layout_treemapPad(node, x); |
7374 | 7374 | } |
7375 | 7375 | var type; |
7376 | | - pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === "function" ? padFunction : type === "number" ? (x = [ x, x, x, x ], |
| 7376 | + pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === "function" ? padFunction : type === "number" ? (x = [ x, x, x, x ], |
7377 | 7377 | padConstant) : padConstant; |
7378 | 7378 | return treemap; |
7379 | 7379 | }; |
|
7776 | 7776 | }; |
7777 | 7777 | scale.rangePoints = function(x, padding) { |
7778 | 7778 | if (arguments.length < 2) padding = 0; |
7779 | | - var start = x[0], stop = x[1], step = domain.length < 2 ? (start = (start + stop) / 2, |
| 7779 | + var start = x[0], stop = x[1], step = domain.length < 2 ? (start = (start + stop) / 2, |
7780 | 7780 | 0) : (stop - start) / (domain.length - 1 + padding); |
7781 | 7781 | range = steps(start + step * padding / 2, step); |
7782 | 7782 | rangeBand = 0; |
|
7788 | 7788 | }; |
7789 | 7789 | scale.rangeRoundPoints = function(x, padding) { |
7790 | 7790 | if (arguments.length < 2) padding = 0; |
7791 | | - var start = x[0], stop = x[1], step = domain.length < 2 ? (start = stop = Math.round((start + stop) / 2), |
| 7791 | + var start = x[0], stop = x[1], step = domain.length < 2 ? (start = stop = Math.round((start + stop) / 2), |
7792 | 7792 | 0) : (stop - start) / (domain.length - 1 + padding) | 0; |
7793 | 7793 | range = steps(start + Math.round(step * padding / 2 + (stop - start - (domain.length - 1 + padding) * step) / 2), step); |
7794 | 7794 | rangeBand = 0; |
|
8216 | 8216 | return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, -1), d3_svg_lineCardinalTangents(points, tension)); |
8217 | 8217 | } |
8218 | 8218 | function d3_svg_lineCardinalClosed(points, tension) { |
8219 | | - return points.length < 3 ? d3_svg_lineLinearClosed(points) : points[0] + d3_svg_lineHermite((points.push(points[0]), |
| 8219 | + return points.length < 3 ? d3_svg_lineLinearClosed(points) : points[0] + d3_svg_lineHermite((points.push(points[0]), |
8220 | 8220 | points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension)); |
8221 | 8221 | } |
8222 | 8222 | function d3_svg_lineCardinal(points, tension) { |
|
8989 | 8989 | var g = d3.select(this); |
8990 | 8990 | var scale0 = this.__chart__ || scale, scale1 = this.__chart__ = scale.copy(); |
8991 | 8991 | var ticks = tickValues == null ? scale1.ticks ? scale1.ticks.apply(scale1, tickArguments_) : scale1.domain() : tickValues, tickFormat = tickFormat_ == null ? scale1.tickFormat ? scale1.tickFormat.apply(scale1, tickArguments_) : d3_identity : tickFormat_, tick = g.selectAll(".tick").data(ticks, scale1), tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick").style("opacity", ε), tickExit = d3.transition(tick.exit()).style("opacity", ε).remove(), tickUpdate = d3.transition(tick.order()).style("opacity", 1), tickSpacing = Math.max(innerTickSize, 0) + tickPadding, tickTransform; |
8992 | | - var range = d3_scaleRange(scale1), path = g.selectAll(".domain").data([ 0 ]), pathUpdate = (path.enter().append("path").attr("class", "domain"), |
| 8992 | + var range = d3_scaleRange(scale1), path = g.selectAll(".domain").data([ 0 ]), pathUpdate = (path.enter().append("path").attr("class", "domain"), |
8993 | 8993 | d3.transition(path)); |
8994 | 8994 | tickEnter.append("line"); |
8995 | 8995 | tickEnter.append("text"); |
|
0 commit comments