1. 24 Mar, 2014 7 commits
    • Mike Bostock's avatar
      Remove workaround for WebKit bug 44083. · 2b148070
      Mike Bostock authored
      This was fixed in 2010, so I think it’s safe to remove the workaround now.
    • Mike Bostock's avatar
      d3.touch defaults to changedTouches. · 467f1490
      Mike Bostock authored
      This way, it’s easier to tell whether the touch changed during the event. This
      also fixes #1600 because the drag behavior now only dispatches a drag event on
      elements that moved, even if multiple touches are active.
    • Mike Bostock's avatar
      Add d3.touch; fix #1786. · 38724915
      Mike Bostock authored
      The drag behavior no longer crashes when the element being dragged is removed
      from the DOM. In addition, the new d3.touch method extracts a single identified
      touch from the current touch event, making it more efficient during multitouch.
      The drag behavior now assigns touchmove and touchend listeners on the target
      element of the touchstart event, rather than the window.
    • Mike Bostock's avatar
      Fix all touches ending on any touch ending. · ee23f941
      Mike Bostock authored
      The drag behavior registers a touchend listener for each started touch; however,
      a touchend event is dispatched to ALL listeners when any touch ends, not just
      for the corresponding starting touch. The drag behavior must therefore detect
      whenever the ending touch is the corresponding starting touch, and ignore other
      ending touches.
      This fixes the drag behavior during multitouch, as discussed in #1786.
    • Mike Bostock's avatar
      Prefer interpolateNumber when coercible to number. · 947c6090
      Mike Bostock authored
      Objects that are coercible to numbers, such as Dates, are often more usefully
      interpolated as numbers rather than as objects.
    • Mike Bostock's avatar
      Instead of bisectBy, replace bisector. · 90b6c0b9
      Mike Bostock authored
      For backwards-compatibility, bisector checks the arity of the specified
      function, and if the function only takes a single argument, it is wrapped with a
      suitable comparator.
    • Mike Bostock's avatar
      Add d3.bisectBy(comparator). · 3c7cc81b
      Mike Bostock authored
      Fixes #1766. Unlike d3.bisector(accessor), this allows you to define a bisector
      that works in reverse order.
      An awkward aspect of implementing bisection on top of a comparator is that it is
      often the case that the sorted array contains objects (e.g., rows from a TSV),
      while the search value is a primitive value (e.g., a number). Thus, you want to
      apply an accessor to the array elements but not to the search value.
      The solution here is to invoke the comparator deterministically: the first
      argument is always an element from the array, and the second argument is always
      the search value. This lets a comparator apply an accessor to array elements but
      not to search values.
  2. 23 Mar, 2014 1 commit
  3. 22 Mar, 2014 2 commits
  4. 21 Mar, 2014 1 commit
  5. 20 Mar, 2014 2 commits
  6. 17 Mar, 2014 2 commits
  7. 13 Mar, 2014 2 commits
  8. 09 Mar, 2014 1 commit
  9. 27 Feb, 2014 1 commit
  10. 26 Feb, 2014 1 commit
    • Jason Davies's avatar
      Workaround for lack of symmetry in Math.sin. · bef5de75
      Jason Davies authored
      Chrome 33 included some sin/cos optimisations, which unfortunately broke
      our assumption that sin(-x) + sin(x) = 0 for all x.  More details here:
      This fix uses:
        sin(x) = sgn(x) * sin(abs(x))
        cos(x) = cos(abs(x))
      where it matters, which fixes area calculations for degenerate polygons
      such as:
      Fixes #1753.
  11. 18 Feb, 2014 4 commits
  12. 11 Feb, 2014 2 commits
  13. 03 Feb, 2014 1 commit
  14. 21 Jan, 2014 1 commit
  15. 20 Jan, 2014 1 commit
  16. 16 Jan, 2014 1 commit
  17. 15 Jan, 2014 2 commits
  18. 14 Jan, 2014 2 commits
  19. 13 Jan, 2014 1 commit
  20. 10 Jan, 2014 3 commits
  21. 09 Jan, 2014 2 commits