| 430 | } |
| 431 | |
| 432 | function render (callback) { |
| 433 | if (this._busy) { |
| 434 | this._queue.push(this.render.bind(this, callback)); |
| 435 | return this; |
| 436 | } |
| 437 | this._dispatch.call('renderStart', this); |
| 438 | if (this._transitionFactory) { |
| 439 | d3Timer.timeout(function () { |
| 440 | // Decouple from time spent. See https://github.com/d3/d3-timer/issues/27 |
| 441 | this._transition = d3Transition.transition(this._transitionFactory()); |
| 442 | _render.call(this, callback); |
| 443 | }.bind(this), 0); |
| 444 | } else { |
| 445 | _render.call(this, callback); |
| 446 | } |
| 447 | return this; |
| 448 | } |
| 449 | function _render(callback) { |
| 450 | var transitionInstance = this._transition; |
| 451 | var fade = this._options.fade && transitionInstance != null; |