Initialize all member variables in constructor
This commit is contained in:
@@ -23,17 +23,16 @@ ol.MapBrowserEvent = function(type, map, browserEvent) {
|
||||
*/
|
||||
this.browserEvent = browserEvent;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Coordinate|undefined}
|
||||
*/
|
||||
this.coordinate_ = undefined;
|
||||
|
||||
};
|
||||
goog.inherits(ol.MapBrowserEvent, ol.MapEvent);
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Coordinate|undefined}
|
||||
*/
|
||||
ol.MapBrowserEvent.prototype.coordinate_;
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.Coordinate|undefined} Coordinate.
|
||||
*/
|
||||
|
||||
@@ -49,6 +49,12 @@ ol.control.MousePosition =
|
||||
*/
|
||||
this.undefinedHTML_ = opt_undefinedHTML || '';
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.TransformFunction}
|
||||
*/
|
||||
this.transform_ = ol.Projection.identityTransform;
|
||||
|
||||
goog.events.listen(map,
|
||||
ol.Object.getChangedEventType(ol.MapProperty.PROJECTION),
|
||||
this.handleMapProjectionChanged, false, this);
|
||||
@@ -65,13 +71,6 @@ ol.control.MousePosition =
|
||||
goog.inherits(ol.control.MousePosition, ol.Control);
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.TransformFunction}
|
||||
*/
|
||||
ol.control.MousePosition.prototype.transform_;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
@@ -11,18 +11,19 @@ goog.require('ol.interaction.Drag');
|
||||
* @param {ol.interaction.Constraints} constraints Constraints.
|
||||
*/
|
||||
ol.interaction.AltDragRotate = function(constraints) {
|
||||
|
||||
goog.base(this, constraints);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.startRotation_ = 0;
|
||||
|
||||
};
|
||||
goog.inherits(ol.interaction.AltDragRotate, ol.interaction.Drag);
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
ol.interaction.AltDragRotate.prototype.startRotation_;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
@@ -13,25 +13,25 @@ goog.require('ol.interaction.Drag');
|
||||
* @param {ol.interaction.Constraints} constraints Constraints.
|
||||
*/
|
||||
ol.interaction.ShiftDragRotateAndZoom = function(constraints) {
|
||||
|
||||
goog.base(this, constraints);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.startRatio_ = 0;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.startRotation_ = 0;
|
||||
|
||||
};
|
||||
goog.inherits(ol.interaction.ShiftDragRotateAndZoom, ol.interaction.Drag);
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
ol.interaction.ShiftDragRotateAndZoom.prototype.startRatio_;
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
ol.interaction.ShiftDragRotateAndZoom.prototype.startRotation_;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user