| 1 | import {selection} from "d3-selection";
|
|---|
| 2 | import transition_attr from "./attr.js";
|
|---|
| 3 | import transition_attrTween from "./attrTween.js";
|
|---|
| 4 | import transition_delay from "./delay.js";
|
|---|
| 5 | import transition_duration from "./duration.js";
|
|---|
| 6 | import transition_ease from "./ease.js";
|
|---|
| 7 | import transition_easeVarying from "./easeVarying.js";
|
|---|
| 8 | import transition_filter from "./filter.js";
|
|---|
| 9 | import transition_merge from "./merge.js";
|
|---|
| 10 | import transition_on from "./on.js";
|
|---|
| 11 | import transition_remove from "./remove.js";
|
|---|
| 12 | import transition_select from "./select.js";
|
|---|
| 13 | import transition_selectAll from "./selectAll.js";
|
|---|
| 14 | import transition_selection from "./selection.js";
|
|---|
| 15 | import transition_style from "./style.js";
|
|---|
| 16 | import transition_styleTween from "./styleTween.js";
|
|---|
| 17 | import transition_text from "./text.js";
|
|---|
| 18 | import transition_textTween from "./textTween.js";
|
|---|
| 19 | import transition_transition from "./transition.js";
|
|---|
| 20 | import transition_tween from "./tween.js";
|
|---|
| 21 | import transition_end from "./end.js";
|
|---|
| 22 |
|
|---|
| 23 | var id = 0;
|
|---|
| 24 |
|
|---|
| 25 | export function Transition(groups, parents, name, id) {
|
|---|
| 26 | this._groups = groups;
|
|---|
| 27 | this._parents = parents;
|
|---|
| 28 | this._name = name;
|
|---|
| 29 | this._id = id;
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | export default function transition(name) {
|
|---|
| 33 | return selection().transition(name);
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | export function newId() {
|
|---|
| 37 | return ++id;
|
|---|
| 38 | }
|
|---|
| 39 |
|
|---|
| 40 | var selection_prototype = selection.prototype;
|
|---|
| 41 |
|
|---|
| 42 | Transition.prototype = transition.prototype = {
|
|---|
| 43 | constructor: Transition,
|
|---|
| 44 | select: transition_select,
|
|---|
| 45 | selectAll: transition_selectAll,
|
|---|
| 46 | selectChild: selection_prototype.selectChild,
|
|---|
| 47 | selectChildren: selection_prototype.selectChildren,
|
|---|
| 48 | filter: transition_filter,
|
|---|
| 49 | merge: transition_merge,
|
|---|
| 50 | selection: transition_selection,
|
|---|
| 51 | transition: transition_transition,
|
|---|
| 52 | call: selection_prototype.call,
|
|---|
| 53 | nodes: selection_prototype.nodes,
|
|---|
| 54 | node: selection_prototype.node,
|
|---|
| 55 | size: selection_prototype.size,
|
|---|
| 56 | empty: selection_prototype.empty,
|
|---|
| 57 | each: selection_prototype.each,
|
|---|
| 58 | on: transition_on,
|
|---|
| 59 | attr: transition_attr,
|
|---|
| 60 | attrTween: transition_attrTween,
|
|---|
| 61 | style: transition_style,
|
|---|
| 62 | styleTween: transition_styleTween,
|
|---|
| 63 | text: transition_text,
|
|---|
| 64 | textTween: transition_textTween,
|
|---|
| 65 | remove: transition_remove,
|
|---|
| 66 | tween: transition_tween,
|
|---|
| 67 | delay: transition_delay,
|
|---|
| 68 | duration: transition_duration,
|
|---|
| 69 | ease: transition_ease,
|
|---|
| 70 | easeVarying: transition_easeVarying,
|
|---|
| 71 | end: transition_end,
|
|---|
| 72 | [Symbol.iterator]: selection_prototype[Symbol.iterator]
|
|---|
| 73 | };
|
|---|