Comparing version 3.0.2 to 3.0.3
{ | ||
"name": "d3", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"main": "./d3.js" | ||
} |
{ | ||
"name": "d3", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "A small, free JavaScript library for manipulating documents based on data.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -5,4 +5,4 @@ # Data-Driven Documents | ||
Want to learn more? [See the wiki.](/mbostock/d3/wiki) | ||
Want to learn more? [See the wiki.](https://github.com/mbostock/d3/wiki) | ||
For examples, [see the gallery](/mbostock/d3/wiki/Gallery) and [mbostock’s bl.ocks](http://bl.ocks.org/mbostock). | ||
For examples, [see the gallery](https://github.com/mbostock/d3/wiki/Gallery) and [mbostock’s bl.ocks](http://bl.ocks.org/mbostock). |
@@ -1,2 +0,2 @@ | ||
d3 = {version: "3.0.2"}; // semver | ||
d3 = {version: "3.0.3"}; // semver | ||
@@ -3,0 +3,0 @@ var π = Math.PI, |
@@ -23,6 +23,5 @@ d3_selectionPrototype.data = function(value, key) { | ||
n0 = Math.min(n, m), | ||
n1 = Math.max(n, m), | ||
updateNodes = [], | ||
enterNodes = [], | ||
exitNodes = [], | ||
updateNodes = new Array(m), | ||
enterNodes = new Array(m), | ||
exitNodes = new Array(n), | ||
node, | ||
@@ -33,5 +32,5 @@ nodeData; | ||
var nodeByKeyValue = new d3_Map, | ||
dataByKeyValue = new d3_Map, | ||
keyValues = [], | ||
keyValue, | ||
j = groupData.length; | ||
keyValue; | ||
@@ -41,3 +40,3 @@ for (i = -1; ++i < n;) { | ||
if (nodeByKeyValue.has(keyValue)) { | ||
exitNodes[j++] = node; // duplicate key | ||
exitNodes[i] = node; // duplicate selection key | ||
} else { | ||
@@ -50,11 +49,10 @@ nodeByKeyValue.set(keyValue, node); | ||
for (i = -1; ++i < m;) { | ||
keyValue = key.call(groupData, nodeData = groupData[i], i) | ||
if (nodeByKeyValue.has(keyValue)) { | ||
updateNodes[i] = node = nodeByKeyValue.get(keyValue); | ||
keyValue = key.call(groupData, nodeData = groupData[i], i); | ||
if (node = nodeByKeyValue.get(keyValue)) { | ||
updateNodes[i] = node; | ||
node.__data__ = nodeData; | ||
enterNodes[i] = exitNodes[i] = null; | ||
} else { | ||
} else if (!dataByKeyValue.has(keyValue)) { // no duplicate data key | ||
enterNodes[i] = d3_selection_dataNode(nodeData); | ||
updateNodes[i] = exitNodes[i] = null; | ||
} | ||
dataByKeyValue.set(keyValue, nodeData); | ||
nodeByKeyValue.remove(keyValue); | ||
@@ -75,6 +73,4 @@ } | ||
updateNodes[i] = node; | ||
enterNodes[i] = exitNodes[i] = null; | ||
} else { | ||
enterNodes[i] = d3_selection_dataNode(nodeData); | ||
updateNodes[i] = exitNodes[i] = null; | ||
} | ||
@@ -84,7 +80,5 @@ } | ||
enterNodes[i] = d3_selection_dataNode(groupData[i]); | ||
updateNodes[i] = exitNodes[i] = null; | ||
} | ||
for (; i < n1; ++i) { | ||
for (; i < n; ++i) { | ||
exitNodes[i] = group[i]; | ||
enterNodes[i] = updateNodes[i] = null; | ||
} | ||
@@ -91,0 +85,0 @@ } |
@@ -8,3 +8,3 @@ function d3_geo_compose(a, b) { | ||
if (a.invert && b.invert) compose.invert = function(x, y) { | ||
return x = b.invert(x, y), a.invert(x[0], x[1]); | ||
return x = b.invert(x, y), x && a.invert(x[0], x[1]); | ||
}; | ||
@@ -11,0 +11,0 @@ |
@@ -28,3 +28,3 @@ d3.geo.projection = d3_geo_projection; | ||
point = projectRotate.invert((point[0] - δx) / k, (δy - point[1]) / k); | ||
return [point[0] * d3_degrees, point[1] * d3_degrees]; | ||
return point && [point[0] * d3_degrees, point[1] * d3_degrees]; | ||
} | ||
@@ -31,0 +31,0 @@ |
@@ -6,3 +6,3 @@ var fs = require("fs"), | ||
valueRe = /;/g, | ||
quotedRe = /"([^"]+?)"/g, | ||
quotedRe = /"([^"]*?)"/g, | ||
data = []; | ||
@@ -9,0 +9,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
700727
215
17492
1