Make the default effectively truthy

This commit is contained in:
ahocevar
2014-02-13 22:52:48 +01:00
parent aa5a08a377
commit adad57d481

View File

@@ -835,11 +835,13 @@ ol.Map.prototype.handlePostRender = function() {
var hints = frameState.viewHints; var hints = frameState.viewHints;
var deviceOptions = this.deviceOptions_; var deviceOptions = this.deviceOptions_;
if (hints[ol.ViewHint.ANIMATING]) { if (hints[ol.ViewHint.ANIMATING]) {
maxTotalLoading = deviceOptions.loadTilesWhileAnimating ? 8 : 0; maxTotalLoading = deviceOptions.loadTilesWhileAnimating === false ?
0 : 8;
maxNewLoads = 2; maxNewLoads = 2;
} }
if (hints[ol.ViewHint.INTERACTING]) { if (hints[ol.ViewHint.INTERACTING]) {
maxTotalLoading = deviceOptions.loadTilesWhileInteracting ? 8 : 0; maxTotalLoading = deviceOptions.loadTilesWhileInteracting === false ?
0 : 8;
maxNewLoads = 2; maxNewLoads = 2;
} }
tileSourceCount = goog.object.getCount(frameState.wantedTiles); tileSourceCount = goog.object.getCount(frameState.wantedTiles);
@@ -1429,11 +1431,7 @@ ol.Map.createOptionsInternal = function(options) {
} }
var deviceOptions = goog.isDef(options.deviceOptions) ? var deviceOptions = goog.isDef(options.deviceOptions) ?
options.deviceOptions : options.deviceOptions : /** @type {olx.DeviceOptions} */ ({});
{
loadTilesWhileAnimating: true,
loadTilesWhileInteracting: true
};
var interactions; var interactions;
if (goog.isDef(options.interactions)) { if (goog.isDef(options.interactions)) {