Commit edfe1d67 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Do not handle zoom event when zoom disabled

parent 832d6c70
...@@ -2755,6 +2755,12 @@ ...@@ -2755,6 +2755,12 @@
return this; return this;
}; };
function updateZoom() {
var z = __zoom_enabled ? zoom : function () {};
main.select('.' + CLASS.zoomRect).call(z);
main.selectAll('.' + CLASS.eventRect).call(z);
}
/*-- Draw Chart --*/ /*-- Draw Chart --*/
// for svg elements // for svg elements
...@@ -2989,7 +2995,7 @@ ...@@ -2989,7 +2995,7 @@
.attr('height', height) .attr('height', height)
.style('opacity', 0) .style('opacity', 0)
.style('cursor', __axis_rotated ? 'ns-resize' : 'ew-resize') .style('cursor', __axis_rotated ? 'ns-resize' : 'ew-resize')
.call(zoom).on("dblclick.zoom", null); .on("dblclick.zoom", null);
// Set default extent if defined // Set default extent if defined
if (__axis_x_default) { if (__axis_x_default) {
...@@ -3217,7 +3223,7 @@ ...@@ -3217,7 +3223,7 @@
.on('dragstart', function () { dragstart(d3.mouse(this)); }) .on('dragstart', function () { dragstart(d3.mouse(this)); })
.on('dragend', function () { dragend(); }) .on('dragend', function () { dragend(); })
) )
.call(zoom).on("dblclick.zoom", null); .on("dblclick.zoom", null);
} }
function generateEventRectsForMultipleXs(eventRectEnter) { function generateEventRectsForMultipleXs(eventRectEnter) {
...@@ -3303,7 +3309,7 @@ ...@@ -3303,7 +3309,7 @@
.on('dragstart', function () { dragstart(d3.mouse(this)); }) .on('dragstart', function () { dragstart(d3.mouse(this)); })
.on('dragend', function () { dragend(); }) .on('dragend', function () { dragend(); })
) )
.call(zoom).on("dblclick.zoom", null); .on("dblclick.zoom", null);
} }
function toggleShape(that, d, i) { function toggleShape(that, d, i) {
...@@ -4149,6 +4155,8 @@ ...@@ -4149,6 +4155,8 @@
mapToIds(c3.data.targets).forEach(function (id) { mapToIds(c3.data.targets).forEach(function (id) {
withoutFadeIn[id] = true; withoutFadeIn[id] = true;
}); });
updateZoom();
} }
function redrawForBrush() { function redrawForBrush() {
redraw({ redraw({
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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