Commit 7e92b730 authored by Mike Bostock's avatar Mike Bostock

Merge branch '3.5.9'

parents 45a20644 629d298a
......@@ -10,7 +10,7 @@
"animation",
"canvas"
],
"version": "3.5.8",
"version": "3.5.9",
"main": "d3.js",
"scripts": [
"d3.js"
......
!function() {
var d3 = {
version: "3.5.8"
version: "3.5.9"
};
var d3_arraySlice = [].slice, d3_array = function(list) {
return d3_arraySlice.call(list);
......@@ -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"
});
......@@ -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() {
......@@ -1480,7 +1480,7 @@
}
function ended() {
subject.on(mousemove, null).on(mouseup, null);
dragRestore(dragged && d3.event.target === target);
dragRestore(dragged);
zoomended(dispatch);
}
}
......@@ -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 = [];
......@@ -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;
......@@ -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;
}();
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -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"
});
......
{
"name": "d3",
"version": "3.5.8",
"version": "3.5.9",
"description": "A JavaScript visualization library for HTML and SVG.",
"keywords": [
"dom",
......@@ -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": {
......
......@@ -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"});
}
};
......
......@@ -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),
......@@ -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);
}
}
......
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;
}();
!function(){
var d3 = {version: "3.5.8"}; // semver
var d3 = {version: "3.5.9"}; // semver
......@@ -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);
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment