Merge branch 'master' into scale-clone
This commit is contained in:
Коммит
434b9eedb9
|
@ -1,4 +1,4 @@
|
|||
(function(){d3 = {version: "1.29.5"}; // semver
|
||||
(function(){d3 = {version: "1.29.6"}; // semver
|
||||
if (!Date.now) Date.now = function() {
|
||||
return +new Date;
|
||||
};
|
||||
|
|
10
d3.layout.js
10
d3.layout.js
|
@ -529,11 +529,9 @@ function d3_layout_forceDragUp() {
|
|||
if (d3_layout_forceDragMoved) {
|
||||
d3_layout_forceStopClick = true;
|
||||
d3_layout_forceCancel();
|
||||
}
|
||||
|
||||
// Don't trigger this for touchend.
|
||||
if (d3.event.type === "mouseup") {
|
||||
d3_layout_forceDragMove();
|
||||
// Don't trigger mousemove for touchend.
|
||||
if (d3.event.type === "mouseup") d3_layout_forceDragMove();
|
||||
}
|
||||
|
||||
d3_layout_forceDragNode.fixed = false;
|
||||
|
@ -1486,8 +1484,8 @@ d3.layout.tree = function() {
|
|||
function firstWalk(node, previousSibling) {
|
||||
var children = node.children,
|
||||
layout = node._tree;
|
||||
if (children) {
|
||||
var n = children.length,
|
||||
if (children && (n = children.length)) {
|
||||
var n,
|
||||
firstChild = children[0],
|
||||
previousChild,
|
||||
ancestor = firstChild,
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1 +1 @@
|
|||
d3 = {version: "1.29.5"}; // semver
|
||||
d3 = {version: "1.29.6"}; // semver
|
||||
|
|
|
@ -323,11 +323,9 @@ function d3_layout_forceDragUp() {
|
|||
if (d3_layout_forceDragMoved) {
|
||||
d3_layout_forceStopClick = true;
|
||||
d3_layout_forceCancel();
|
||||
}
|
||||
|
||||
// Don't trigger this for touchend.
|
||||
if (d3.event.type === "mouseup") {
|
||||
d3_layout_forceDragMove();
|
||||
// Don't trigger mousemove for touchend.
|
||||
if (d3.event.type === "mouseup") d3_layout_forceDragMove();
|
||||
}
|
||||
|
||||
d3_layout_forceDragNode.fixed = false;
|
||||
|
|
|
@ -11,8 +11,8 @@ d3.layout.tree = function() {
|
|||
function firstWalk(node, previousSibling) {
|
||||
var children = node.children,
|
||||
layout = node._tree;
|
||||
if (children) {
|
||||
var n = children.length,
|
||||
if (children && (n = children.length)) {
|
||||
var n,
|
||||
firstChild = children[0],
|
||||
previousChild,
|
||||
ancestor = firstChild,
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
require("../env");
|
||||
require("../../d3");
|
||||
require("../../d3.layout");
|
||||
|
||||
var vows = require("vows"),
|
||||
assert = require("assert");
|
||||
|
||||
var suite = vows.describe("d3.layout.tree");
|
||||
|
||||
suite.addBatch({
|
||||
"tree": {
|
||||
topic: d3.layout.tree,
|
||||
"can handle an empty children array": function(tree) {
|
||||
assert.deepEqual(tree.nodes({children: []}), [
|
||||
{children: [], depth: 0, x: 0.5, y: 0}
|
||||
]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
suite.export(module);
|
Загрузка…
Ссылка в новой задаче