Commit db6b4ac3 authored by Evgeny's avatar Evgeny

Fix init drawing of lines

parent 45325ebd
...@@ -5402,10 +5402,11 @@ ...@@ -5402,10 +5402,11 @@
if($$.config.hasSubs || $$.config.isSub){ if($$.config.hasSubs || $$.config.isSub){
$$.buffer.onlastfinish("draw-lines"+$$.config.isSub, function(){ $$.buffer.onlastfinish("draw-lines"+$$.config.isSub, function(){
console.log("redraw"); $$.buffer.onlastfinish("draw-lines"+$$.config.isSub, function(){
$$.ed3Internal.redrawLinesOnBoth(); $$.ed3Internal.redrawLinesOnBoth();
$$.ed3Internal.redrawLinesOnBoth(); $$.ed3Internal.redrawLinesOnBoth();
}); });
});
} }
}; };
...@@ -6469,15 +6470,15 @@ ...@@ -6469,15 +6470,15 @@
c3.chart.internal.fn.getBox = function(selection){ c3.chart.internal.fn.getBox = function(selection){
var box; var box;
// FIXME: hack for nodejs
try { try {
box = selection.node().getBBox(); box = selection.node().getBBox();
} catch(e){ } catch(e){
box = { box = {
y: 0,
x: 0, x: 0,
height: 0, y: 0,
width: 0 width: 0,
height: 0
}; };
} }
...@@ -6489,8 +6490,6 @@ ...@@ -6489,8 +6490,6 @@
var x1, x2, y1, y2; var x1, x2, y1, y2;
console.log(order);
if($$.config.isSub){ if($$.config.isSub){
$$.ed3Config.subBox = $$.getBox($$.main.selectAll(".sub-chart .c3-chart-bars")); $$.ed3Config.subBox = $$.getBox($$.main.selectAll(".sub-chart .c3-chart-bars"));
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -306,10 +306,11 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf ...@@ -306,10 +306,11 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf
if($$.config.hasSubs || $$.config.isSub){ if($$.config.hasSubs || $$.config.isSub){
$$.buffer.onlastfinish("draw-lines"+$$.config.isSub, function(){ $$.buffer.onlastfinish("draw-lines"+$$.config.isSub, function(){
console.log("redraw"); $$.buffer.onlastfinish("draw-lines"+$$.config.isSub, function(){
$$.ed3Internal.redrawLinesOnBoth(); $$.ed3Internal.redrawLinesOnBoth();
$$.ed3Internal.redrawLinesOnBoth(); $$.ed3Internal.redrawLinesOnBoth();
}); });
});
} }
}; };
......
...@@ -11,15 +11,15 @@ c3.chart.internal.fn.drawLine = function(line, x1, x2, y1, y2){ ...@@ -11,15 +11,15 @@ c3.chart.internal.fn.drawLine = function(line, x1, x2, y1, y2){
c3.chart.internal.fn.getBox = function(selection){ c3.chart.internal.fn.getBox = function(selection){
var box; var box;
// FIXME: hack for nodejs
try { try {
box = selection.node().getBBox(); box = selection.node().getBBox();
} catch(e){ } catch(e){
box = { box = {
y: 0,
x: 0, x: 0,
height: 0, y: 0,
width: 0 width: 0,
height: 0
}; };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment