Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove defunct d3_interpolateByName.

  • Loading branch information...
commit 6fe70a81d4bc394ac32a48f77d8010d4e4b7f2e7 1 parent 306d504
@mbostock mbostock authored
Showing with 6 additions and 20 deletions.
  1. +2 −9 d3.js
  2. +2 −2 d3.min.js
  3. +2 −9 src/core/interpolate.js
View
11 d3.js
@@ -933,7 +933,7 @@ d3.interpolateObject = function(a, b) {
k;
for (k in a) {
if (k in b) {
- i[k] = d3_interpolateByName(k)(a[k], b[k]);
+ i[k] = d3.interpolate(a[k], b[k]);
} else {
c[k] = a[k];
}
@@ -949,14 +949,7 @@ d3.interpolateObject = function(a, b) {
};
}
-var d3_interpolate_number = /[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g,
- d3_interpolate_rgb = {background: 1, fill: 1, stroke: 1};
-
-function d3_interpolateByName(n) {
- return n in d3_interpolate_rgb || /\bcolor\b/.test(n)
- ? d3.interpolateRgb
- : d3.interpolate;
-}
+var d3_interpolate_number = /[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g;
d3.interpolators = [
d3.interpolateObject,
View
4 d3.min.js
2 additions, 2 deletions not shown
View
11 src/core/interpolate.js
@@ -146,7 +146,7 @@ d3.interpolateObject = function(a, b) {
k;
for (k in a) {
if (k in b) {
- i[k] = d3_interpolateByName(k)(a[k], b[k]);
+ i[k] = d3.interpolate(a[k], b[k]);
} else {
c[k] = a[k];
}
@@ -162,14 +162,7 @@ d3.interpolateObject = function(a, b) {
};
}
-var d3_interpolate_number = /[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g,
- d3_interpolate_rgb = {background: 1, fill: 1, stroke: 1};
-
-function d3_interpolateByName(n) {
- return n in d3_interpolate_rgb || /\bcolor\b/.test(n)
- ? d3.interpolateRgb
- : d3.interpolate;
-}
+var d3_interpolate_number = /[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g;
d3.interpolators = [
d3.interpolateObject,
Please sign in to comment.
Something went wrong with that request. Please try again.