From dfbe7447c9833858e76be8376f0e23759306037f Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 16 Nov 2015 09:39:19 +0100 Subject: [PATCH] Test number property with !== undefined Fixes #4424 --- src/ol/control/rotatecontrol.js | 2 +- src/ol/control/zoomslidercontrol.js | 2 +- src/ol/interaction/doubleclickzoominteraction.js | 2 +- src/ol/interaction/dragrotateandzoominteraction.js | 2 +- src/ol/interaction/dragrotateinteraction.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ol/control/rotatecontrol.js b/src/ol/control/rotatecontrol.js index b19bacb1ed..9d8facd3e6 100644 --- a/src/ol/control/rotatecontrol.js +++ b/src/ol/control/rotatecontrol.js @@ -75,7 +75,7 @@ ol.control.Rotate = function(opt_options) { * @type {number} * @private */ - this.duration_ = options.duration ? options.duration : 250; + this.duration_ = options.duration !== undefined ? options.duration : 250; /** * @type {boolean} diff --git a/src/ol/control/zoomslidercontrol.js b/src/ol/control/zoomslidercontrol.js index 3d2bd948f9..92905e89c9 100644 --- a/src/ol/control/zoomslidercontrol.js +++ b/src/ol/control/zoomslidercontrol.js @@ -75,7 +75,7 @@ ol.control.ZoomSlider = function(opt_options) { * @private * @type {number} */ - this.duration_ = options.duration ? options.duration : 200; + this.duration_ = options.duration !== undefined ? options.duration : 200; var className = options.className ? options.className : 'ol-zoomslider'; var thumbElement = goog.dom.createDom('BUTTON', { diff --git a/src/ol/interaction/doubleclickzoominteraction.js b/src/ol/interaction/doubleclickzoominteraction.js index 404e2a1310..634b2837d3 100644 --- a/src/ol/interaction/doubleclickzoominteraction.js +++ b/src/ol/interaction/doubleclickzoominteraction.js @@ -34,7 +34,7 @@ ol.interaction.DoubleClickZoom = function(opt_options) { * @private * @type {number} */ - this.duration_ = options.duration ? options.duration : 250; + this.duration_ = options.duration !== undefined ? options.duration : 250; }; goog.inherits(ol.interaction.DoubleClickZoom, ol.interaction.Interaction); diff --git a/src/ol/interaction/dragrotateandzoominteraction.js b/src/ol/interaction/dragrotateandzoominteraction.js index 66f60baa0a..041d5e7f77 100644 --- a/src/ol/interaction/dragrotateandzoominteraction.js +++ b/src/ol/interaction/dragrotateandzoominteraction.js @@ -64,7 +64,7 @@ ol.interaction.DragRotateAndZoom = function(opt_options) { * @private * @type {number} */ - this.duration_ = options.duration ? options.duration : 400; + this.duration_ = options.duration !== undefined ? options.duration : 400; }; goog.inherits(ol.interaction.DragRotateAndZoom, ol.interaction.Pointer); diff --git a/src/ol/interaction/dragrotateinteraction.js b/src/ol/interaction/dragrotateinteraction.js index d073ad34a4..ef21a0515d 100644 --- a/src/ol/interaction/dragrotateinteraction.js +++ b/src/ol/interaction/dragrotateinteraction.js @@ -49,7 +49,7 @@ ol.interaction.DragRotate = function(opt_options) { * @private * @type {number} */ - this.duration_ = options.duration ? options.duration : 250; + this.duration_ = options.duration !== undefined ? options.duration : 250; }; goog.inherits(ol.interaction.DragRotate, ol.interaction.Pointer);