Browse Source

Do not handle zoom event when zoom disabled

pull/310/head
Masayuki Tanaka 11 years ago
parent
commit
edfe1d67c1
  1. 14
      c3.js
  2. 6
      c3.min.js

14
c3.js

@ -2755,6 +2755,12 @@
return this;
};
function updateZoom() {
var z = __zoom_enabled ? zoom : function () {};
main.select('.' + CLASS.zoomRect).call(z);
main.selectAll('.' + CLASS.eventRect).call(z);
}
/*-- Draw Chart --*/
// for svg elements
@ -2989,7 +2995,7 @@
.attr('height', height)
.style('opacity', 0)
.style('cursor', __axis_rotated ? 'ns-resize' : 'ew-resize')
.call(zoom).on("dblclick.zoom", null);
.on("dblclick.zoom", null);
// Set default extent if defined
if (__axis_x_default) {
@ -3217,7 +3223,7 @@
.on('dragstart', function () { dragstart(d3.mouse(this)); })
.on('dragend', function () { dragend(); })
)
.call(zoom).on("dblclick.zoom", null);
.on("dblclick.zoom", null);
}
function generateEventRectsForMultipleXs(eventRectEnter) {
@ -3303,7 +3309,7 @@
.on('dragstart', function () { dragstart(d3.mouse(this)); })
.on('dragend', function () { dragend(); })
)
.call(zoom).on("dblclick.zoom", null);
.on("dblclick.zoom", null);
}
function toggleShape(that, d, i) {
@ -4149,6 +4155,8 @@
mapToIds(c3.data.targets).forEach(function (id) {
withoutFadeIn[id] = true;
});
updateZoom();
}
function redrawForBrush() {
redraw({

6
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save