Skip to content

Make ol.Overlay autoPan default to false #3270

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

Merged
merged 1 commit into from
Feb 24, 2015
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
6 changes: 2 additions & 4 deletions examples/measure.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ function createHelpTooltip() {
helpTooltip = new ol.Overlay({
element: helpTooltipElement,
offset: [15, 0],
positioning: 'center-left',
autoPan: false
positioning: 'center-left'
});
map.addOverlay(helpTooltip);
}
Expand All @@ -223,8 +222,7 @@ function createMeasureTooltip() {
measureTooltip = new ol.Overlay({
element: measureTooltipElement,
offset: [0, -15],
positioning: 'bottom-center',
autoPan: false
positioning: 'bottom-center'
});
map.addOverlay(measureTooltip);
}
Expand Down
1 change: 1 addition & 0 deletions examples/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ closer.onclick = function() {
*/
var overlay = new ol.Overlay(/** @type {olx.OverlayOptions} */ ({
element: container,
autoPan: true,
autoPanAnimation: {
duration: 250
}
Expand Down
3 changes: 1 addition & 2 deletions examples/tileutfgrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ var nameElement = document.getElementById('country-name');
var infoOverlay = new ol.Overlay({
element: infoElement,
offset: [15, 15],
stopEvent: false,
autoPan: false
stopEvent: false
});
map.addOverlay(infoOverlay);

Expand Down
2 changes: 1 addition & 1 deletion externs/olx.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ olx.OverlayOptions.prototype.insertFirst;
/**
* If set to `true` the map is panned when calling `setPosition`, so that the
* overlay is entirely visible in the current viewport.
* The default is `true`.
* The default is `false`.
* @type {boolean|undefined}
* @api
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ol/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ ol.Overlay = function(options) {
* @private
* @type {boolean}
*/
this.autoPan_ = goog.isDef(options.autoPan) ? options.autoPan : true;
this.autoPan_ = goog.isDef(options.autoPan) ? options.autoPan : false;

/**
* @private
Expand Down