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

2805 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 23ee2c08a6 Merge branch '3.2.8' 2013-08-01 07:37:51 -07:00
Mike Bostock 4c6b28d18f Merge branch 'map-copy-constructor' into 3.2.8 2013-08-01 07:37:00 -07:00
Mike Bostock b56349531c Merge branch 'fix-zoom-touch' into 3.2.8 2013-08-01 07:36:26 -07:00
Mike Bostock af85c4e497 Merge branch 'fix-degenerate-log-ticks' into 3.2.8 2013-08-01 07:36:02 -07:00
Mike Bostock 7f03c05c2d Merge branch 'fix-sort-null' into 3.2.8 2013-08-01 07:35:38 -07:00
Mike Bostock 4530a2e526 Style tweak. 2013-08-01 07:33:51 -07:00
Mike Bostock b32286cea7 Revert microoptimization of d3_number. 2013-08-01 07:31:53 -07:00
Mike Bostock 23904ccb70 Revert breakage of d3.{as,des}cending. 2013-08-01 07:30:31 -07:00
Mike Bostock 46472b1d67 Merge branch 'patch-3' of git://github.com/LeoDutra/d3 into micro-optimizations
Conflicts:
	src/core/array.js
2013-08-01 07:29:32 -07:00
Mike Bostock c234c58bbf Merge branch 'patch-2' of git://github.com/LeoDutra/d3 into micro-optimizations
Conflicts:
	src/arrays/set.js
2013-08-01 07:28:49 -07:00
Mike Bostock e2a44099a5 Merge branch 'master' of git://github.com/LeoDutra/d3 into micro-optimizations 2013-08-01 07:27:59 -07:00
Jason Davies 43f439e34f Minor optimisation. 2013-07-31 22:39:01 +01:00
Mike Bostock a85b05e803 Fix dbltap detection. 2013-07-31 14:31:22 -07:00
Jason Davies 993017ff22 Add a few comments. 2013-07-31 21:28:41 +01:00
Mike Bostock 9192c11ba9 Fix #1431 - sort with null nodes. 2013-07-31 11:00:11 -07:00
Mike Bostock c247e16261 Better test for automatic tick precision. 2013-07-31 10:40:07 -07:00
Leonardo Dutra ab68440f2e Optimized array.js 2013-07-29 17:27:08 -03:00
Leonardo Dutra fe5b68d096 Optimized set.js 2013-07-29 17:25:05 -03:00
Leonardo Dutra 0befad2225 Optimized number.js 2013-07-24 18:39:27 -03:00
Leonardo Dutra 5cb34b8f5f Optimized array.js
Less operators, vars and:
http://jsperf.com/array-constructor-vs-literal-modalities
2013-07-24 18:04:52 -03:00
Leonardo Dutra 1240174396 Optimized set.js
length cache, ++i faster operator.
2013-07-24 17:59:28 -03:00
Leonardo Dutra 1bec3a67b0 Update permute.js
Why? Less vars, less operators, and this difference:
http://jsperf.com/array-constructor-vs-literal-modalities
2013-07-24 17:51:35 -03:00
Leonardo Dutra 48f27ae5cf Optimized descending.js
No need to repeat ">="... "===" is faster (same type comparison operator)
2013-07-24 16:01:18 -03:00
Leonardo Dutra 4a7e69772a Optimized ascending.js
No need to repeat ">="

"a < b ? -1 : a > b ? 1 : 0" would be better, but I don't know if it would break logic.
2013-07-24 15:58:58 -03:00
Mike Bostock 0015231c07 Fix #1420 - regression with degenerate log ticks.
Commit 59554738 broke the check for a degenerate domain; this restores the
original check and adds a test to verify this behavior.
2013-07-24 14:13:12 -04:00
Jason Davies 120fb558a6 Fix issue with drag suppression for multitouch.
Due to the touchend listener being overwritten for every touchstart, two
touchstart events would result in d3_event_dragSuppress being called
twice, with only a single drag restore, meaning that a document's
user-select style could be lost.

This restructuring means that the first touchstart creates the closures
for subsequent touchstart, touchmove and touchend events.  A nice
side-benefit is that fewer closures are created for multitouch.
2013-07-23 23:23:38 +01:00
Jason Davies 2fd0227a67 Avoid binding multiple touch listeners for zoom.
For a two-finger pinch, if two touchstart events fire, this results in
two touchmove and touchend listeners.  The first will have a single
location in the locations variable, but its touchmove listener will
fire with two touches, causing it to fail due to not finding the
location of the second touch.

If the first listener fires before the second, this exception breaks
touch zooming (as no further listeners will be called), but the order is
undefined so may be browser/device dependent (for reproducing the bug).

Since zooming only ever involves a single gesture at a time, it makes
more sense to only have one listener of each type at a time, unlike
dragging, which involves multiple drag gestures at once.
2013-07-23 19:52:51 +01:00
Mike Bostock 4b839b655d More restrictive copy constructor.
Rather than duck-checking for a forEach method, limit the use of forEach to
d3_Map instances. In ECMAScript 6, the map.forEach method passes the callback
(value, key) rather than (key, value); likewise, array.forEach does the same.
2013-07-22 07:55:24 -04:00
Mike Bostock c14858be79 Fix #1413 - d3.map copy constructor. 2013-07-21 12:55:17 -04:00
Mike Bostock dddef328ed Fix transitions that stop on start. 2013-07-18 23:30:09 -04:00
Mike Bostock 268af88a2a Merge branch '3.2.7' 2013-07-18 23:17:22 -04:00
Mike Bostock f603935360 Merge branch 'optimize-time-ticks' into 3.2.7 2013-07-18 23:15:03 -04:00
Mike Bostock 9c50a1b204 Merge branch 'fix-transition-callback-order' into 3.2.7 2013-07-18 23:14:37 -04:00
Mike Bostock 07360d74e4 Merge branch 'fix-zoom-mouse-touch' into 3.2.7 2013-07-18 23:14:06 -04:00
Mike Bostock c49570f4bf Merge branch 'fix-transition-filter' into 3.2.7 2013-07-18 23:13:40 -04:00
Mike Bostock 8c5558a6ba Color interpolators return strings.
This partially reverts ce6526cfe3. Although this
lacks the occasional convenience of a color instance, it has several advantages:
strings are immutable, so there is no concern of modifying the return value
(#1030); performance is improved; sometimes (e.g., Canvas, IE9 #1371) automatic
string coercion of values is unavailable, so strings are more convenient.
2013-07-18 23:08:56 -04:00
Mike Bostock 9be1fa2355 Minify color strings. 2013-07-18 22:47:51 -04:00
Mike Bostock 940d38d3ae Fix #1407 - transition.filter crashes on empty.
Also remove unneeded third argument to d3_transition since transition.time is
now stored on the per-node transition object.
2013-07-18 20:56:25 -04:00
Mike Bostock e89b2783b6 Isolate temporary state while touching.
Previously we were trying to be clever and reuse the translate0 state while
touching; it’s simpler to just use a separate variable. Also, this commit now
restores the mousedown listener on touchend, just in case the device happens to
support both mouse and touch.
2013-07-18 16:25:38 -04:00
Mike Bostock 2a4277ddad Remove mouse listeners from intended target.
Related #1381.
2013-07-18 15:07:41 -04:00
Mike Bostock be2bee767a Fix #1402 - transition callback order.
Rather than registering new timers, reassign the transition’s timer callback in-
place such that the order of callbacks for transitions is always prioritized
based on when the transition was created.
2013-07-18 13:07:14 -04:00
Mike Bostock 2bd0ad9a64 Remove symmetric Math.log.
Since Math.log is a monotonic function for positive values, we can safely remove
the Math.log from both sides of the comparison. The reason Math.log was used
previously is that this is an estimate of error (the log difference between the
desired number of ticks and the actual number of ticks).
2013-07-16 13:48:46 -04:00
Mike Bostock 95bc9f412b Fix log.nice. 2013-07-12 09:38:35 -07:00
Mike Bostock f281e7c296 Prevent default on dbltap. 2013-07-11 17:21:38 -07:00
Mike Bostock 7d813c96e1 Merge branch '3.2.5' 2013-07-11 16:54:20 -07:00
Mike Bostock 08d701cb3c Merge branch 'fix-log-scale-rounding' into 3.2.5 2013-07-11 16:53:02 -07:00
Mike Bostock 5329795e1d Merge branch 'fix-suppress-touchstart' into 3.2.5 2013-07-11 16:52:23 -07:00
Mike Bostock da25e58949 Merge branch 'fix-localized-decimal-point' into 3.2.5 2013-07-11 16:51:38 -07:00
Mike Bostock 5aba2e6864 Simplify. 2013-07-11 15:19:33 -07:00
Mike Bostock 595547389b Fix another rounding bug in log.ticks. 2013-07-11 13:48:46 -07:00