From be8cf4a0b5ab35016b9b4dc38318577957047e02 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Wed, 27 Jul 2016 14:14:59 -0400 Subject: [PATCH] use dc.transition to disable transitions at 0 and revert flushing of transitions, no longer necessary here for #1181 --- spec/line-chart-spec.js | 5 +---- src/line-chart.js | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/spec/line-chart-spec.js b/spec/line-chart-spec.js index dfac481aa..c78b83696 100644 --- a/spec/line-chart-spec.js +++ b/spec/line-chart-spec.js @@ -1,4 +1,4 @@ -/* global appendChartID, flushAllD3Transitions, loadDateFixture, makeDate */ +/* global appendChartID, loadDateFixture, makeDate */ describe('dc.lineChart', function () { var id, chart, data; var dimension, group; @@ -224,7 +224,6 @@ describe('dc.lineChart', function () { describe('for vertical ref lines', function () { var x; beforeEach(function () { - flushAllD3Transitions(); var dot = chart.select('circle.dot'); dot.on('mousemove').call(dot[0][0]); x = dot.attr('cx'); @@ -241,7 +240,6 @@ describe('dc.lineChart', function () { describe('for a left y-axis chart', function () { var x; beforeEach(function () { - flushAllD3Transitions(); var dot = chart.select('circle.dot'); dot.on('mousemove').call(dot[0][0]); x = dot.attr('cx'); @@ -258,7 +256,6 @@ describe('dc.lineChart', function () { var x; beforeEach(function () { chart.useRightYAxis(true).render(); - flushAllD3Transitions(); var dot = chart.select('circle.dot'); dot.on('mousemove').call(dot[0][0]); x = dot.attr('cx'); diff --git a/src/line-chart.js b/src/line-chart.js index 20aa399f8..3cd8e280c 100644 --- a/src/line-chart.js +++ b/src/line-chart.js @@ -300,9 +300,9 @@ dc.lineChart = function (parent, chartGroup) { hideRefLines(g); }); - dots.call(renderTitle, d) - .transition() - .duration(_chart.transitionDuration()) + dots.call(renderTitle, d); + + dc.transition(dots, _chart.transitionDuration()) .attr('cx', function (d) { return dc.utils.safeNumber(_chart.x()(d.x)); })