Commit 24f9f2c
committed
Store brush transition state on the DOM.
Rather than capture the brush’s pre-transition state via closure, store the
state on the DOM like the axis component (this.__chart__). Now the brush can be
instanced on multiple elements, and each element’s pre-transition state can be
tracked separately, consistent with its display.
Further, restore the pre-transition state of the brush prior to emitting the
brushstart event, using the pre-transition data-space extent, if any. And
likewise, when the transition ends, restore the post-transition data-space
extent if available, rather than the less accurate pixel-space extent. Since the
data-space extent is restored when the transition ends, an additional brush
event is now emitted prior to brushend, since the extent may have changed.1 parent dddb501 commit 24f9f2c
3 files changed
Lines changed: 56 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7941 | 7941 | | |
7942 | 7942 | | |
7943 | 7943 | | |
7944 | | - | |
| 7944 | + | |
7945 | 7945 | | |
7946 | 7946 | | |
7947 | 7947 | | |
| |||
7972 | 7972 | | |
7973 | 7973 | | |
7974 | 7974 | | |
7975 | | - | |
7976 | | - | |
7977 | | - | |
7978 | | - | |
7979 | | - | |
| 7975 | + | |
| 7976 | + | |
| 7977 | + | |
| 7978 | + | |
| 7979 | + | |
| 7980 | + | |
| 7981 | + | |
| 7982 | + | |
| 7983 | + | |
| 7984 | + | |
| 7985 | + | |
| 7986 | + | |
| 7987 | + | |
7980 | 7988 | | |
7981 | 7989 | | |
7982 | 7990 | | |
7983 | 7991 | | |
7984 | | - | |
| 7992 | + | |
7985 | 7993 | | |
7986 | | - | |
7987 | | - | |
7988 | 7994 | | |
7989 | | - | |
7990 | | - | |
| 7995 | + | |
| 7996 | + | |
7991 | 7997 | | |
7992 | 7998 | | |
7993 | 7999 | | |
7994 | 8000 | | |
7995 | 8001 | | |
7996 | 8002 | | |
| 8003 | + | |
| 8004 | + | |
| 8005 | + | |
| 8006 | + | |
| 8007 | + | |
| 8008 | + | |
7997 | 8009 | | |
7998 | 8010 | | |
7999 | 8011 | | |
8000 | 8012 | | |
8001 | | - | |
8002 | | - | |
8003 | | - | |
8004 | | - | |
8005 | | - | |
8006 | | - | |
| 8013 | + | |
8007 | 8014 | | |
8008 | 8015 | | |
8009 | 8016 | | |
| |||
8014 | 8021 | | |
8015 | 8022 | | |
8016 | 8023 | | |
8017 | | - | |
8018 | | - | |
| 8024 | + | |
| 8025 | + | |
8019 | 8026 | | |
8020 | 8027 | | |
8021 | 8028 | | |
| |||
0 commit comments