Skip to content

Commit

Permalink
Merge branch 'test'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Aug 17, 2011
2 parents ae4306e + 00d8bf7 commit b7fb05a
Show file tree
Hide file tree
Showing 46 changed files with 1,499 additions and 3,457 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "lib/uglify-js"]
path = lib/uglify-js
url = git://github.com/mishoo/UglifyJS.git
2 changes: 1 addition & 1 deletion Makefile
@@ -1,5 +1,5 @@
JS_COMPILER = \ JS_COMPILER = \
./lib/uglifyjs/bin/uglifyjs ./lib/uglify-js/bin/uglifyjs


all: \ all: \
d3.js \ d3.js \
Expand Down
2 changes: 1 addition & 1 deletion d3.geom.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 10 additions & 13 deletions d3.js
@@ -1,4 +1,4 @@
(function(){d3 = {version: "1.29.4"}; // semver (function(){d3 = {version: "1.29.5"}; // semver
if (!Date.now) Date.now = function() { if (!Date.now) Date.now = function() {
return +new Date; return +new Date;
}; };
Expand Down Expand Up @@ -525,7 +525,7 @@ var d3_format_types = {
f: function(x, p) { return x.toFixed(p); }, f: function(x, p) { return x.toFixed(p); },
r: function(x, p) { r: function(x, p) {
var n = 1 + Math.floor(1e-15 + Math.log(x) / Math.LN10); var n = 1 + Math.floor(1e-15 + Math.log(x) / Math.LN10);
return d3.round(x, p - n).toFixed(Math.max(0, p - n)); return d3.round(x, p - n).toFixed(Math.max(0, Math.min(20, p - n)));
} }
}; };


Expand Down Expand Up @@ -1963,7 +1963,7 @@ function d3_transition(groups) {
delay[++k] = delayMin; delay[++k] = delayMin;
}); });
} }
d3_timer(step, delayMin); d3.timer(step, delayMin);
return transition; return transition;
}; };


Expand Down Expand Up @@ -2083,17 +2083,14 @@ var d3_timer_queue = null,
d3_timer_timeout; // is a timeout active? d3_timer_timeout; // is a timeout active?


// The timer will continue to fire until callback returns true. // The timer will continue to fire until callback returns true.
d3.timer = function(callback) { d3.timer = function(callback, delay) {
d3_timer(callback, 0);
};

function d3_timer(callback, delay) {
var now = Date.now(), var now = Date.now(),
found = false, found = false,
t0, t0,
t1 = d3_timer_queue; t1 = d3_timer_queue;


if (!isFinite(delay)) return; if (arguments.length < 2) delay = 0;
else if (!isFinite(delay)) return;


// See if the callback's already in the queue. // See if the callback's already in the queue.
while (t1) { while (t1) {
Expand Down Expand Up @@ -2130,7 +2127,7 @@ function d3_timer_step() {


while (t1) { while (t1) {
elapsed = now - t1.then; elapsed = now - t1.then;
if (elapsed > t1.delay) t1.flush = t1.callback(elapsed); if (elapsed >= t1.delay) t1.flush = t1.callback(elapsed);
t1 = t1.next; t1 = t1.next;
} }


Expand Down Expand Up @@ -2653,8 +2650,8 @@ d3.scale.quantize = function() {


scale.domain = function(x) { scale.domain = function(x) {
if (!arguments.length) return [x0, x1]; if (!arguments.length) return [x0, x1];
x0 = x[0]; x0 = +x[0];
x1 = x[1]; x1 = +x[x.length - 1];
kx = range.length / (x1 - x0); kx = range.length / (x1 - x0);
return scale; return scale;
}; };
Expand All @@ -2681,7 +2678,7 @@ d3.svg.arc = function() {
r1 = outerRadius.apply(this, arguments), r1 = outerRadius.apply(this, arguments),
a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset, a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset,
a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset, a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset,
da = a1 - a0, da = (a1 < a0 && (da = a0, a0 = a1, a1 = da), a1 - a0),
df = da < Math.PI ? "0" : "1", df = da < Math.PI ? "0" : "1",
c0 = Math.cos(a0), c0 = Math.cos(a0),
s0 = Math.sin(a0), s0 = Math.sin(a0),
Expand Down
4 changes: 2 additions & 2 deletions d3.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions examples/data/sample.csv
@@ -0,0 +1,2 @@
Hello,World
42,"""fish"""
5 changes: 5 additions & 0 deletions examples/data/sample.html
@@ -0,0 +1,5 @@
<!DOCTYPE html>
<html>
<body>
<h1>Hello &amp; world!</h1>
</html>
1 change: 1 addition & 0 deletions examples/data/sample.json
@@ -0,0 +1 @@
[{"Hello":42,"World":"\"fish\""}]
1 change: 1 addition & 0 deletions examples/data/sample.txt
@@ -0,0 +1 @@
Hello, world!
4 changes: 4 additions & 0 deletions examples/data/sample.xml
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<hello>
<world name="Earth"/>
</hello>
1 change: 1 addition & 0 deletions lib/uglify-js
Submodule uglify-js added at b6575e
28 changes: 0 additions & 28 deletions lib/uglifyjs/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion lib/uglifyjs/README.md

This file was deleted.

0 comments on commit b7fb05a

Please sign in to comment.