Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default scroll wheel zoom to false on vega maps. Update docs #21169

Merged
merged 3 commits into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/visualize/vega.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ describe('VegaParser._parseMapConfig', () => {
longitude: 0,
mapStyle: 'default',
zoomControl: true,
scrollWheelZoom: true,
scrollWheelZoom: false,
}, 0));

it('filled', test({
Expand All @@ -180,15 +180,15 @@ describe('VegaParser._parseMapConfig', () => {
longitude: 0,
mapStyle: 'default',
zoomControl: true,
scrollWheelZoom: true,
scrollWheelZoom: false,
maxBounds: [1, 2, 3, 4],
}, {
delayRepaint: true,
latitude: 0,
longitude: 0,
mapStyle: 'default',
zoomControl: true,
scrollWheelZoom: true,
scrollWheelZoom: false,
maxBounds: [1, 2, 3, 4],
}, 0));

Expand All @@ -207,7 +207,7 @@ describe('VegaParser._parseMapConfig', () => {
longitude: 0,
mapStyle: 'default',
zoomControl: true,
scrollWheelZoom: true,
scrollWheelZoom: false,
}, 5));
});

Expand Down
2 changes: 1 addition & 1 deletion src/core_plugins/vega/public/data_model/vega_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,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) {
Expand Down