Skip to content

Commit 5fd964b

Browse files
committed
Merge branch 'fix-transition-inherit-time'
2 parents d49321d + 14307a0 commit 5fd964b

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

d3.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -939,8 +939,12 @@ d3 = function() {
939939
};
940940
}
941941
d3_selectionPrototype.transition = function() {
942-
var id = d3_transitionInheritId || ++d3_transitionId, subgroups = [], subgroup, node, transition = Object.create(d3_transitionInherit);
943-
transition.time = Date.now();
942+
var id = d3_transitionInheritId || ++d3_transitionId, subgroups = [], subgroup, node, transition = d3_transitionInherit || {
943+
time: Date.now(),
944+
ease: d3_ease_cubicInOut,
945+
delay: 0,
946+
duration: 250
947+
};
944948
for (var j = -1, m = this.length; ++j < m; ) {
945949
subgroups.push(subgroup = []);
946950
for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
@@ -7459,11 +7463,7 @@ d3 = function() {
74597463
groups.id = id;
74607464
return groups;
74617465
}
7462-
var d3_transitionPrototype = [], d3_transitionId = 0, d3_transitionInheritId, d3_transitionInherit = {
7463-
ease: d3_ease_cubicInOut,
7464-
delay: 0,
7465-
duration: 250
7466-
};
7466+
var d3_transitionPrototype = [], d3_transitionId = 0, d3_transitionInheritId, d3_transitionInherit;
74677467
d3_transitionPrototype.call = d3_selectionPrototype.call;
74687468
d3_transitionPrototype.empty = d3_selectionPrototype.empty;
74697469
d3_transitionPrototype.node = d3_selectionPrototype.node;

d3.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/selection/transition.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ d3_selectionPrototype.transition = function() {
55
subgroups = [],
66
subgroup,
77
node,
8-
transition = Object.create(d3_transitionInherit);
9-
10-
transition.time = Date.now();
8+
transition = d3_transitionInherit || {time: Date.now(), ease: d3_ease_cubicInOut, delay: 0, duration: 250};
119

1210
for (var j = -1, m = this.length; ++j < m;) {
1311
subgroups.push(subgroup = []);

src/transition/transition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function d3_transition(groups, id) {
1616
var d3_transitionPrototype = [],
1717
d3_transitionId = 0,
1818
d3_transitionInheritId,
19-
d3_transitionInherit = {ease: d3_ease_cubicInOut, delay: 0, duration: 250};
19+
d3_transitionInherit;
2020

2121
d3_transitionPrototype.call = d3_selectionPrototype.call;
2222
d3_transitionPrototype.empty = d3_selectionPrototype.empty;

0 commit comments

Comments
 (0)