Simplify touches code slightly.

This commit is contained in:
Mike Bostock 2011-05-12 11:28:31 -07:00
Родитель bdc7023776
Коммит f1a2f62dcb
3 изменённых файлов: 3 добавлений и 5 удалений

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

@ -3204,8 +3204,7 @@ function d3_svg_mousePoints(container, events) {
};
d3.svg.touches = function(container) {
var touches = d3.event.touches;
return touches && touches.length
? d3_svg_mousePoints(container, d3_array(touches)) : [];
return touches ? d3_svg_mousePoints(container, d3_array(touches)) : [];
};
d3.svg.symbol = function() {
var type = d3_svg_symbolType,

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

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

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

@ -1,5 +1,4 @@
d3.svg.touches = function(container) {
var touches = d3.event.touches;
return touches && touches.length
? d3_svg_mousePoints(container, d3_array(touches)) : [];
return touches ? d3_svg_mousePoints(container, d3_array(touches)) : [];
};