提交 99710ea0 编写于 作者: P pah100

add zoomlock to dataZoomInside

上级 3e6096c7
......@@ -7,7 +7,14 @@ define(function(require) {
return DataZoomModel.extend({
type: 'dataZoom.inside'
type: 'dataZoom.inside',
/**
* @protected
*/
defaultOption: {
zoomLock: false // Whether disable zoom but only pan.
}
});
......
......@@ -121,6 +121,11 @@ define(function (require) {
*/
_onZoom: function (controller, coordInfo, scale, mouseX, mouseY) {
var dataZoomModel = this.dataZoomModel;
if (dataZoomModel.option.zoomLock) {
return;
}
scale = 1 / scale;
var range = this._range = scaleCartesian(
scale, [mouseX, mouseY], this._range,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册