From 43cfc2a4cd187f605cc956f2d80f3a26d75cdf76 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 18 Apr 2013 21:01:58 +0200 Subject: [PATCH 1/3] Initialize all properties in constructor in controls --- src/ol/control/scalelinecontrol.js | 2 +- src/ol/control/zoomslidercontrol.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ol/control/scalelinecontrol.js b/src/ol/control/scalelinecontrol.js index 4f43d8ce3d..37f779a2f0 100644 --- a/src/ol/control/scalelinecontrol.js +++ b/src/ol/control/scalelinecontrol.js @@ -77,7 +77,7 @@ ol.control.ScaleLine = function(opt_options) { * @private * @type {number|undefined} */ - this.renderedWidth_; + this.renderedWidth_ = undefined; /** * @private diff --git a/src/ol/control/zoomslidercontrol.js b/src/ol/control/zoomslidercontrol.js index 5fb6a454ea..5af6be81e6 100644 --- a/src/ol/control/zoomslidercontrol.js +++ b/src/ol/control/zoomslidercontrol.js @@ -38,10 +38,10 @@ ol.control.ZoomSlider = function(options) { /** * Will hold the current resolution of the view. * - * @type {number} + * @type {number|undefined} * @private */ - this.currentResolution_; + this.currentResolution_ = undefined; /** * The direction of the slider. Will be determined from actual display of the From b24c46dd198a75d6cf26c8a77b7cc7b04f809791 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 18 Apr 2013 21:02:18 +0200 Subject: [PATCH 2/3] Initialize all properties in constructor in ol.Geolocation --- src/ol/geolocation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/geolocation.js b/src/ol/geolocation.js index a619db1b1f..81bdc95d1b 100644 --- a/src/ol/geolocation.js +++ b/src/ol/geolocation.js @@ -49,7 +49,7 @@ ol.Geolocation = function() { * @private * @type {number|undefined} */ - this.watchId_; + this.watchId_ = undefined; this.setTracking(false); From 7d610bde7bbb97df41ccbb6ecea6d63c8dc8b8f0 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 18 Apr 2013 21:02:53 +0200 Subject: [PATCH 3/3] Initialize all properties in constructor in interactions --- src/ol/interaction/dragrotateandzoominteraction.js | 4 ++-- src/ol/interaction/touchrotateinteraction.js | 2 +- src/ol/interaction/touchzoominteraction.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ol/interaction/dragrotateandzoominteraction.js b/src/ol/interaction/dragrotateandzoominteraction.js index f7f64c0cc4..4e67f01c27 100644 --- a/src/ol/interaction/dragrotateandzoominteraction.js +++ b/src/ol/interaction/dragrotateandzoominteraction.js @@ -29,13 +29,13 @@ ol.interaction.DragRotateAndZoom = function(condition) { * @private * @type {number|undefined} */ - this.lastAngle_; + this.lastAngle_ = undefined; /** * @private * @type {number|undefined} */ - this.lastMagnitude_; + this.lastMagnitude_ = undefined; }; goog.inherits(ol.interaction.DragRotateAndZoom, ol.interaction.Drag); diff --git a/src/ol/interaction/touchrotateinteraction.js b/src/ol/interaction/touchrotateinteraction.js index 166ff7111e..d7ffb146f5 100644 --- a/src/ol/interaction/touchrotateinteraction.js +++ b/src/ol/interaction/touchrotateinteraction.js @@ -38,7 +38,7 @@ ol.interaction.TouchRotate = function(opt_threshold) { * @private * @type {number|undefined} */ - this.lastAngle_; + this.lastAngle_ = undefined; /** * @private diff --git a/src/ol/interaction/touchzoominteraction.js b/src/ol/interaction/touchzoominteraction.js index 8585bef32b..d68e2f853d 100644 --- a/src/ol/interaction/touchzoominteraction.js +++ b/src/ol/interaction/touchzoominteraction.js @@ -36,7 +36,7 @@ ol.interaction.TouchZoom = function() { * @private * @type {number|undefined} */ - this.lastDistance_; + this.lastDistance_ = undefined; /** * @private