Skip to content

Commit

Permalink
Merge branch '3.5.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Nov 16, 2015
2 parents 45a2064 + 629d298 commit 7e92b73
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion component.json
Expand Up @@ -10,7 +10,7 @@
"animation",
"canvas"
],
"version": "3.5.8",
"version": "3.5.9",
"main": "d3.js",
"scripts": [
"d3.js"
Expand Down
26 changes: 13 additions & 13 deletions d3.js
@@ -1,6 +1,6 @@
!function() {
var d3 = {
version: "3.5.8"
version: "3.5.9"
};
var d3_arraySlice = [].slice, d3_array = function(list) {
return d3_arraySlice.call(list);
Expand Down Expand Up @@ -1232,7 +1232,7 @@
function ended() {
if (!position(parent, dragId)) return;
dragSubject.on(move + dragName, null).on(end + dragName, null);
dragRestore(dragged && d3.event.target === target);
dragRestore(dragged);
dispatch({
type: "dragend"
});
Expand Down Expand Up @@ -1470,7 +1470,7 @@
}), center0 = null;
}
function mousedowned() {
var that = this, target = d3.event.target, dispatch = event.of(that, arguments), dragged = 0, subject = d3.select(d3_window(that)).on(mousemove, moved).on(mouseup, ended), location0 = location(d3.mouse(that)), dragRestore = d3_event_dragSuppress(that);
var that = this, dispatch = event.of(that, arguments), dragged = 0, subject = d3.select(d3_window(that)).on(mousemove, moved).on(mouseup, ended), location0 = location(d3.mouse(that)), dragRestore = d3_event_dragSuppress(that);
d3_selection_interrupt.call(that);
zoomstarted(dispatch);
function moved() {
Expand All @@ -1480,7 +1480,7 @@
}
function ended() {
subject.on(mousemove, null).on(mouseup, null);
dragRestore(dragged && d3.event.target === target);
dragRestore(dragged);
zoomended(dispatch);
}
}
Expand Down Expand Up @@ -8927,6 +8927,14 @@
delete lock[cancelId];
}
}
timer.c = tick;
d3_timer(function() {
if (timer.c && tick(elapsed || 1)) {
timer.c = null;
timer.t = NaN;
}
return 1;
}, 0, time);
lock.active = id;
transition.event && transition.event.start.call(node, node.__data__, i);
tweens = [];
Expand All @@ -8937,14 +8945,6 @@
});
ease = transition.ease;
duration = transition.duration;
timer.c = tick;
d3_timer(function() {
if (timer.c && tick(elapsed || 1)) {
timer.c = null;
timer.t = NaN;
}
return 1;
}, 0, time);
}
function tick(elapsed) {
var t = elapsed / duration, e = ease(t), n = tweens.length;
Expand Down Expand Up @@ -9546,5 +9546,5 @@
d3.xml = d3_xhrType(function(request) {
return request.responseXML;
});
if (typeof define === "function" && define.amd) define(this.d3 = d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3;
if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3;
}();
10 changes: 5 additions & 5 deletions d3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.js
Expand Up @@ -3,7 +3,7 @@
Package.describe({
name: "d3js:d3", // http://atmospherejs.com/d3js/d3
summary: "D3 (official): A JavaScript visualization library for HTML and SVG.",
version: "3.5.8",
version: "3.5.9",
git: "https://github.com/mbostock/d3.git"
});

Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "d3",
"version": "3.5.8",
"version": "3.5.9",
"description": "A JavaScript visualization library for HTML and SVG.",
"keywords": [
"dom",
Expand Down Expand Up @@ -54,7 +54,7 @@
"jsdom": "3",
"seedrandom": "2",
"smash": "0.0",
"uglify-js": "2.4.16",
"uglify-js": "2.6.1",
"vows": "0.8"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/behavior/drag.js
Expand Up @@ -62,7 +62,7 @@ d3.behavior.drag = function() {
function ended() {
if (!position(parent, dragId)) return; // this touch didn’t end
dragSubject.on(move + dragName, null).on(end + dragName, null);
dragRestore(dragged && d3.event.target === target);
dragRestore(dragged);
dispatch({type: "dragend"});
}
};
Expand Down
3 changes: 1 addition & 2 deletions src/behavior/zoom.js
Expand Up @@ -188,7 +188,6 @@ d3.behavior.zoom = function() {

function mousedowned() {
var that = this,
target = d3.event.target,
dispatch = event.of(that, arguments),
dragged = 0,
subject = d3.select(d3_window(that)).on(mousemove, moved).on(mouseup, ended),
Expand All @@ -206,7 +205,7 @@ d3.behavior.zoom = function() {

function ended() {
subject.on(mousemove, null).on(mouseup, null);
dragRestore(dragged && d3.event.target === target);
dragRestore(dragged);
zoomended(dispatch);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/end.js
@@ -1,4 +1,4 @@
if (typeof define === "function" && define.amd) define(this.d3 = d3);
if (typeof define === "function" && define.amd) this.d3 = d3, define(d3);
else if (typeof module === "object" && module.exports) module.exports = d3;
else this.d3 = d3;
}();
2 changes: 1 addition & 1 deletion src/start.js
@@ -1,2 +1,2 @@
!function(){
var d3 = {version: "3.5.8"}; // semver
var d3 = {version: "3.5.9"}; // semver
23 changes: 12 additions & 11 deletions src/transition/transition.js
Expand Up @@ -94,6 +94,18 @@ function d3_transitionNode(node, i, ns, id, inherit) {
}
}

// Defer tween invocation to end of current frame; see mbostock/d3#1576.
// Note that this transition may be canceled before then!
// This must be scheduled before the start event; see d3/d3-transition#16!
timer.c = tick;
d3_timer(function() {
if (timer.c && tick(elapsed || 1)) {
timer.c = null;
timer.t = NaN;
}
return 1;
}, 0, time);

// Start the transition.
lock.active = id;
transition.event && transition.event.start.call(node, node.__data__, i);
Expand All @@ -109,17 +121,6 @@ function d3_transitionNode(node, i, ns, id, inherit) {
// Defer capture to allow tween initialization to set ease & duration.
ease = transition.ease;
duration = transition.duration;

// Defer tween invocation to end of current frame; see mbostock/d3#1576.
// Note that this transition may be canceled before then!
timer.c = tick;
d3_timer(function() {
if (timer.c && tick(elapsed || 1)) {
timer.c = null;
timer.t = NaN;
}
return 1;
}, 0, time);
}

function tick(elapsed) {
Expand Down

0 comments on commit 7e92b73

Please sign in to comment.