Skip to content

Commit

Permalink
Default scroll wheel zoom to false on vega maps. Update docs (elastic…
Browse files Browse the repository at this point in the history
  • Loading branch information
kindsun committed Feb 7, 2019
1 parent 252a099 commit 43b2532
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
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 @@ -172,7 +172,7 @@ describe('VegaParser._parseMapConfig', () => {
longitude: 0,
mapStyle: 'default',
zoomControl: true,
scrollWheelZoom: true,
scrollWheelZoom: false,
}, 0));

it('filled', test({
Expand All @@ -181,15 +181,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 @@ -208,7 +208,7 @@ describe('VegaParser._parseMapConfig', () => {
longitude: 0,
mapStyle: 'default',
zoomControl: true,
scrollWheelZoom: true,
scrollWheelZoom: false,
}, 5));
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 43b2532

Please sign in to comment.