Граф коммитов

1675 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock ef8672cb7d Condense d3.interpolateTransform slightly.
Also, fix the transform rotate test.
2012-07-30 19:42:32 -07:00
Mike Bostock 14ab1b3d01 Merge branch 'transform' of git://github.com/jasondavies/d3 into 2.9.7 2012-07-30 18:54:22 -07:00
Mike Bostock 5e7c5dd665 Merge branch 'fix-event-callbacks' of git://github.com/natevw/d3 into 2.9.7 2012-07-30 18:20:11 -07:00
Mike Bostock 90bfec5d88 Merge branch 'fix-time-full-year' into 2.9.7 2012-07-30 18:18:48 -07:00
Mike Bostock 45f742b412 Merge branch 'dbltap' of git://github.com/jasondavies/d3 into 2.9.7 2012-07-30 18:18:04 -07:00
Mike Bostock 3d6acd074f Merge branch 'faster-linear-interpolation' into 2.9.7 2012-07-30 18:17:15 -07:00
Mike Bostock e74a925e2c Merge branch 'fix-classed-remove' of git://github.com/jasondavies/d3 into 2.9.7 2012-07-30 18:16:33 -07:00
Mike Bostock 151d5fe054 Merge branch 'fix-time-dayOfYear' of git://github.com/jasondavies/d3 into 2.9.7 2012-07-30 18:13:32 -07:00
Mike Bostock d449be9855 Merge branch 'transition-filter' of git://github.com/jasondavies/d3 into 2.9.7 2012-07-30 18:12:37 -07:00
Mike Bostock 313c5b37cc Merge branch 'pack-opt' of git://github.com/jasondavies/d3 into 2.9.7 2012-07-30 18:11:07 -07:00
Jason Davies aa3e38e398 Fix and add tests for transition.filter.
Thanks, @mbostock!
2012-07-25 19:36:21 +01:00
Jason Davies 5b04aa0838 Inherit ID, time and ease from parent transition.
Thanks, @mbostock!
2012-07-25 18:22:03 +01:00
Jason Davies 418811360c Add missing file. 2012-07-25 18:18:44 +01:00
Jason Davies eadf003d2f Clamp Math.sqrt to be on the safe side. 2012-07-25 15:26:05 +01:00
Jason Davies 9b3e780006 Further optimisation of d3.layout.pack.
Also avoids floating point errors without clamping, hopefully.
2012-07-25 13:46:20 +01:00
Jason Davies 7c28977420 Minor optimisation for d3.layout.pack.
Uses the identity sin^2(x) + cos^2(x) = 1.
2012-07-25 13:00:40 +01:00
Jason Davies 29a674b973 Add missing semicolon. 2012-07-25 10:58:06 +01:00
Jason Davies 1893f2941b Add transition.filter. Fixes #726.
Behaves the same as selection.filter.
2012-07-25 10:02:49 +01:00
Jason Davies c3716c72cb Minor optimisations to d3.interpolateTransform. 2012-07-24 21:25:55 +01:00
Jason Davies a40c1537da Retain d3.transform's public API.
That is, d3.transform is for decomposing a matrix.
2012-07-24 21:17:11 +01:00
Jason Davies feb2cefeae Amend previous commit to use private methods. 2012-07-24 19:49:39 +01:00
Jason Davies 839fcd4d4d Interpolate "same type" transforms in isolation.
For consistency with CSS3's 2D transforms, two transforms with the same
number of transform functions and corresponding functions of the same
type are treated differently: each transform function is interpolated in
isolation.

This allows us to interpolate many transforms that contain constant
functions in a more useful way, e.g.

  "rotate(<variable>)translate(<constant>)"

The variable rotation angle would now be linearly interpolated on its
own, keeping the constant translation vector constant.
2012-07-24 18:45:52 +01:00
Jason Davies e8f5d860e2 Fix #720: d3.time.dayOfYear floating-point error. 2012-07-23 18:34:39 +01:00
Jason Davies fe803629f1 Minor optimisation and Chrome bug workaround.
There appears to be a bug in Chrome causing the whole tab to crash when
setting svgNode.className.baseVal = "" for a newly-created element
without a non-empty class name:

  https://code.google.com/p/chromium/issues/detail?id=138552

This fix is a minor optimisation: if the current class is empty then
removing a class should be a no-op.  It also conveniently works around
the Chrome bug.
2012-07-23 16:15:01 +01:00
Nathan Vander Wilt 7c3f2cce20 pass group index (and any potential other arguments in future) on to event handler 2012-07-20 18:00:10 -07:00
Mike Bostock fb86373a3d Add generated file. 2012-07-19 11:02:35 -07:00
Mike Bostock 7442d95798 Merge branch 'date-2d' of git://github.com/jasondavies/d3 into fix-time-full-year 2012-07-17 14:00:08 -07:00
Mike Bostock 83b5f45997 Fix #711 for years in the first century.
Alas, the JavaScript Date constructor is Y2K-centric.
2012-07-17 13:45:34 -07:00
Mike Bostock 5c1cd6bd2c Add generated file. 2012-07-17 13:45:18 -07:00
Mike Bostock 544addb462 Fix node-canvas example. 2012-07-13 09:02:12 -07:00
Jason Davies 42b9253f96 Convert 2-digit years according to POSIX.
This is also the convention used by Python 1.5.2+. Values 69-99 are
mapped to 1969-1999, and values 0–68 are mapped to 2000–2068.
2012-07-10 16:40:19 +01:00
Jason Davies 69f02eb5fc Don't interpret double-pan as double-tap.
Firstly, the last-touched-time was being set on touchend, even if a pan
gesture had occurred. This caused a pan quickly followed by a single tap
to be interpreted as a double-tap. In this fix, the time is only set on
touchstart.

Secondly, the time is cleared on touchmove, so that a pan gesture
cancels double-tap detection.
2012-07-05 08:44:28 +01:00
Mike Bostock 9cf2595fd1 Faster linear interpolation. 2012-07-04 11:21:05 -07:00
Mike Bostock c5d230d16e Merge branch '2.9.6' 2012-07-02 18:08:52 -07:00
Mike Bostock 2643a869a4 Merge branch 'fix-axis-transition' into 2.9.6 2012-07-02 18:06:53 -07:00
Mike Bostock 3d40415209 Merge branch 'faster-geo-path' into 2.9.6 2012-07-02 18:06:23 -07:00
Mike Bostock 306a3e35cb Merge branch 'fix-interpolate-hsl' into 2.9.6 2012-07-02 18:05:51 -07:00
Mike Bostock d0b0af50b6 Fix more bugs in circle clipping.
It was returning 0 rather than null when a feature was completely clipped, and
it was crashing when a closed polygon was completely clipped.
2012-07-02 17:42:23 -07:00
Mike Bostock 54b0dcba00 Optimize greatArc and circle.
When clipping, the origin of the great arc doesn’t change, so we can cache a
number of intermediate values and accelerate the clipping computation.
2012-07-02 16:58:54 -07:00
Mike Bostock 3c082bf245 Condense code slightly. 2012-07-02 10:59:06 -07:00
Jason Davies 8710e5bbd1 Add some unit tests for d3.geo.circle. 2012-07-02 17:02:52 +01:00
Jason Davies 9865daadf8 Only close clipped polygon if it is unclosed. 2012-07-02 17:02:44 +01:00
Jason Davies 10570e915d Fix #691: remove incorrect last interpolation step.
For closed polygons, the last point should simply be connected to the
first clipped point, rather than be clipped to the clipping circle.
2012-07-02 09:27:37 +01:00
Mike Bostock ae1fed7f4f Use shortest path for hue in d3.interpolateHsl.
Fixes #688.
2012-06-28 17:43:26 -07:00
Mike Bostock d12f42d8a3 Faster d3.geo.path implementation.
Rather than creating separate arrays for each geometry, a shared buffer is used
and the array is only converted to a string once.
2012-06-28 12:21:32 -07:00
Mike Bostock f7ed0304bf Don't transition label positioning attributes.
The axis component no longer uses a transition for the text elements' dy and
text-anchor attributes. This makes it easier to style the labels using post-
selection, since the transition will not override custom attribute values.
2012-06-25 13:03:55 -07:00
Mike Bostock e71de33e31 Merge branch '2.9.5' 2012-06-24 11:03:14 -07:00
Mike Bostock a3ab896295 Merge branch 'fix-interpolate-rotate' into 2.9.5 2012-06-24 10:59:40 -07:00
Mike Bostock 9f96939022 Merge branch 'fix-classed-whitespace' into 2.9.5 2012-06-24 10:59:06 -07:00
Mike Bostock 8598dc40bf More robust fix to d3.interpolateTransform. 2012-06-24 10:43:13 -07:00