Merge pull request #4425 from fredj/duration_eq_0

Test number property with !== undefined
This commit is contained in:
Frédéric Junod
2015-11-16 09:53:32 +01:00
5 changed files with 5 additions and 5 deletions

View File

@@ -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}

View File

@@ -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', {

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);