d3.svg.*: namespaces are optional as of v2.6.0.

This commit is contained in:
Jason Davies 2011-11-23 22:54:09 +00:00
Родитель 5a87998694
Коммит 12711f2e49
5 изменённых файлов: 20 добавлений и 20 удалений

18
d3.js поставляемый
Просмотреть файл

@ -3646,7 +3646,7 @@ function d3_svg_mousePoint(container, e) {
var point = (container.ownerSVGElement || container).createSVGPoint();
if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) {
var svg = d3.select(document.body)
.append("svg:svg")
.append("svg")
.style("position", "absolute")
.style("top", 0)
.style("left", 0);
@ -3807,13 +3807,13 @@ d3.svg.axis = function() {
// Minor ticks.
var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide),
subtick = g.selectAll(".minor").data(subticks, String),
subtickEnter = subtick.enter().insert("svg:line", "g").attr("class", "tick minor").style("opacity", 1e-6),
subtickEnter = subtick.enter().insert("line", "g").attr("class", "tick minor").style("opacity", 1e-6),
subtickExit = transition(subtick.exit()).style("opacity", 1e-6).remove(),
subtickUpdate = transition(subtick).style("opacity", 1);
// Major ticks.
var tick = g.selectAll("g").data(ticks, String),
tickEnter = tick.enter().insert("svg:g", "path").style("opacity", 1e-6),
tickEnter = tick.enter().insert("g", "path").style("opacity", 1e-6),
tickExit = transition(tick.exit()).style("opacity", 1e-6).remove(),
tickUpdate = transition(tick).style("opacity", 1),
tickTransform;
@ -3821,7 +3821,7 @@ d3.svg.axis = function() {
// Domain.
var range = d3_scaleRange(scale),
path = g.selectAll(".domain").data([0]),
pathEnter = path.enter().append("svg:path").attr("class", "domain"),
pathEnter = path.enter().append("path").attr("class", "domain"),
pathUpdate = transition(path);
// Stash a snapshot of the new scale, and retrieve the old snapshot.
@ -3829,8 +3829,8 @@ d3.svg.axis = function() {
scale0 = this.__chart__ || scale1;
this.__chart__ = scale1;
tickEnter.append("svg:line").attr("class", "tick");
tickEnter.append("svg:text");
tickEnter.append("line").attr("class", "tick");
tickEnter.append("text");
tickUpdate.select("text").text(tickFormat);
switch (orient) {
@ -3991,19 +3991,19 @@ d3.svg.brush = function() {
e;
// An invisible, mouseable area for starting a new brush.
bg.enter().append("svg:rect")
bg.enter().append("rect")
.attr("class", "background")
.style("visibility", "hidden")
.style("pointer-events", "all")
.style("cursor", "crosshair");
// The visible brush extent; style this as you like!
fg.enter().append("svg:rect")
fg.enter().append("rect")
.attr("class", "extent")
.style("cursor", "move");
// More invisible rects for resizing the extent.
tz.enter().append("svg:rect")
tz.enter().append("rect")
.attr("class", function(d) { return "resize " + d; })
.attr("width", 6)
.attr("height", 6)

4
d3.min.js поставляемый

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -34,13 +34,13 @@ d3.svg.axis = function() {
// Minor ticks.
var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide),
subtick = g.selectAll(".minor").data(subticks, String),
subtickEnter = subtick.enter().insert("svg:line", "g").attr("class", "tick minor").style("opacity", 1e-6),
subtickEnter = subtick.enter().insert("line", "g").attr("class", "tick minor").style("opacity", 1e-6),
subtickExit = transition(subtick.exit()).style("opacity", 1e-6).remove(),
subtickUpdate = transition(subtick).style("opacity", 1);
// Major ticks.
var tick = g.selectAll("g").data(ticks, String),
tickEnter = tick.enter().insert("svg:g", "path").style("opacity", 1e-6),
tickEnter = tick.enter().insert("g", "path").style("opacity", 1e-6),
tickExit = transition(tick.exit()).style("opacity", 1e-6).remove(),
tickUpdate = transition(tick).style("opacity", 1),
tickTransform;
@ -48,7 +48,7 @@ d3.svg.axis = function() {
// Domain.
var range = d3_scaleRange(scale),
path = g.selectAll(".domain").data([0]),
pathEnter = path.enter().append("svg:path").attr("class", "domain"),
pathEnter = path.enter().append("path").attr("class", "domain"),
pathUpdate = transition(path);
// Stash a snapshot of the new scale, and retrieve the old snapshot.
@ -56,8 +56,8 @@ d3.svg.axis = function() {
scale0 = this.__chart__ || scale1;
this.__chart__ = scale1;
tickEnter.append("svg:line").attr("class", "tick");
tickEnter.append("svg:text");
tickEnter.append("line").attr("class", "tick");
tickEnter.append("text");
tickUpdate.select("text").text(tickFormat);
switch (orient) {

Просмотреть файл

@ -18,19 +18,19 @@ d3.svg.brush = function() {
e;
// An invisible, mouseable area for starting a new brush.
bg.enter().append("svg:rect")
bg.enter().append("rect")
.attr("class", "background")
.style("visibility", "hidden")
.style("pointer-events", "all")
.style("cursor", "crosshair");
// The visible brush extent; style this as you like!
fg.enter().append("svg:rect")
fg.enter().append("rect")
.attr("class", "extent")
.style("cursor", "move");
// More invisible rects for resizing the extent.
tz.enter().append("svg:rect")
tz.enter().append("rect")
.attr("class", function(d) { return "resize " + d; })
.attr("width", 6)
.attr("height", 6)

Просмотреть файл

@ -9,7 +9,7 @@ function d3_svg_mousePoint(container, e) {
var point = (container.ownerSVGElement || container).createSVGPoint();
if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) {
var svg = d3.select(document.body)
.append("svg:svg")
.append("svg")
.style("position", "absolute")
.style("top", 0)
.style("left", 0);