diff --git a/docs/visualize/vega.asciidoc b/docs/visualize/vega.asciidoc index 9f88eeefbbb21..7351cd65ef090 100644 --- a/docs/visualize/vega.asciidoc +++ b/docs/visualize/vega.asciidoc @@ -215,7 +215,8 @@ the graph must specify `type=map` in the host configuration: // defaults to true, shows +/- buttons to zoom in/out "zoomControl": false, - // defaults to true, disables mouse wheel zoom + // Defaults to 'false', disables mouse wheel zoom. If set to + // 'true', map may zoom unexpectedly while scrolling dashboard "scrollWheelZoom": false, // When false, repaints on each move frame. diff --git a/src/legacy/core_plugins/vega/public/data_model/__tests__/vega_parser.js b/src/legacy/core_plugins/vega/public/data_model/__tests__/vega_parser.js index 47623d4721bf5..1c91bccaa1990 100644 --- a/src/legacy/core_plugins/vega/public/data_model/__tests__/vega_parser.js +++ b/src/legacy/core_plugins/vega/public/data_model/__tests__/vega_parser.js @@ -172,7 +172,7 @@ describe('VegaParser._parseMapConfig', () => { longitude: 0, mapStyle: 'default', zoomControl: true, - scrollWheelZoom: true, + scrollWheelZoom: false, }, 0)); it('filled', test({ @@ -181,7 +181,7 @@ describe('VegaParser._parseMapConfig', () => { longitude: 0, mapStyle: 'default', zoomControl: true, - scrollWheelZoom: true, + scrollWheelZoom: false, maxBounds: [1, 2, 3, 4], }, { delayRepaint: true, @@ -189,7 +189,7 @@ describe('VegaParser._parseMapConfig', () => { longitude: 0, mapStyle: 'default', zoomControl: true, - scrollWheelZoom: true, + scrollWheelZoom: false, maxBounds: [1, 2, 3, 4], }, 0)); @@ -208,7 +208,7 @@ describe('VegaParser._parseMapConfig', () => { longitude: 0, mapStyle: 'default', zoomControl: true, - scrollWheelZoom: true, + scrollWheelZoom: false, }, 5)); }); diff --git a/src/legacy/core_plugins/vega/public/data_model/vega_parser.js b/src/legacy/core_plugins/vega/public/data_model/vega_parser.js index 9fbc86033ce70..ad76d424459f3 100644 --- a/src/legacy/core_plugins/vega/public/data_model/vega_parser.js +++ b/src/legacy/core_plugins/vega/public/data_model/vega_parser.js @@ -347,7 +347,7 @@ export class VegaParser { } this._parseBool('zoomControl', res, true); - this._parseBool('scrollWheelZoom', res, true); + this._parseBool('scrollWheelZoom', res, false); const maxBounds = this._config.maxBounds; if (maxBounds !== undefined) {