Merge pull request #2763 from fredj/cleanup
Miscellaneous coding style and typo fixes
This commit is contained in:
+2
-4
@@ -68,8 +68,7 @@ ol.has.CANVAS = ol.ENABLE_CANVAS && (
|
|||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.has.DEVICE_ORIENTATION =
|
ol.has.DEVICE_ORIENTATION = 'DeviceOrientationEvent' in goog.global;
|
||||||
'DeviceOrientationEvent' in goog.global;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -111,8 +110,7 @@ ol.has.POINTER = 'PointerEvent' in goog.global;
|
|||||||
* @const
|
* @const
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
ol.has.MSPOINTER =
|
ol.has.MSPOINTER = !!(goog.global.navigator.msPointerEnabled);
|
||||||
!!(goog.global.navigator.msPointerEnabled);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ ol.interaction.Modify = function(options) {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.overlay_ = new ol.FeatureOverlay({
|
this.overlay_ = new ol.FeatureOverlay({
|
||||||
style: (goog.isDef(options.style)) ? options.style :
|
style: goog.isDef(options.style) ? options.style :
|
||||||
ol.interaction.Modify.getDefaultStyleFunction()
|
ol.interaction.Modify.getDefaultStyleFunction()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ ol.interaction.Select = function(opt_options) {
|
|||||||
* @type {ol.FeatureOverlay}
|
* @type {ol.FeatureOverlay}
|
||||||
*/
|
*/
|
||||||
this.featureOverlay_ = new ol.FeatureOverlay({
|
this.featureOverlay_ = new ol.FeatureOverlay({
|
||||||
style: (goog.isDef(options.style)) ? options.style :
|
style: goog.isDef(options.style) ? options.style :
|
||||||
ol.interaction.Select.getDefaultStyleFunction()
|
ol.interaction.Select.getDefaultStyleFunction()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ ol.layer.Layer.visibleAtResolution = function(layerState, resolution) {
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.layer.Layer.prototype.getLayersArray = function(opt_array) {
|
ol.layer.Layer.prototype.getLayersArray = function(opt_array) {
|
||||||
var array = (goog.isDef(opt_array)) ? opt_array : [];
|
var array = goog.isDef(opt_array) ? opt_array : [];
|
||||||
array.push(this);
|
array.push(this);
|
||||||
return array;
|
return array;
|
||||||
};
|
};
|
||||||
@@ -72,7 +72,7 @@ ol.layer.Layer.prototype.getLayersArray = function(opt_array) {
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.layer.Layer.prototype.getLayerStatesArray = function(opt_states) {
|
ol.layer.Layer.prototype.getLayerStatesArray = function(opt_states) {
|
||||||
var states = (goog.isDef(opt_states)) ? opt_states : [];
|
var states = goog.isDef(opt_states) ? opt_states : [];
|
||||||
states.push(this.getLayerState());
|
states.push(this.getLayerState());
|
||||||
return states;
|
return states;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ goog.exportProperty(
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.layer.Group.prototype.getLayersArray = function(opt_array) {
|
ol.layer.Group.prototype.getLayersArray = function(opt_array) {
|
||||||
var array = (goog.isDef(opt_array)) ? opt_array : [];
|
var array = goog.isDef(opt_array) ? opt_array : [];
|
||||||
this.getLayers().forEach(function(layer) {
|
this.getLayers().forEach(function(layer) {
|
||||||
layer.getLayersArray(array);
|
layer.getLayersArray(array);
|
||||||
});
|
});
|
||||||
@@ -191,7 +191,7 @@ ol.layer.Group.prototype.getLayersArray = function(opt_array) {
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.layer.Group.prototype.getLayerStatesArray = function(opt_states) {
|
ol.layer.Group.prototype.getLayerStatesArray = function(opt_states) {
|
||||||
var states = (goog.isDef(opt_states)) ? opt_states : [];
|
var states = goog.isDef(opt_states) ? opt_states : [];
|
||||||
|
|
||||||
var pos = states.length;
|
var pos = states.length;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -73,7 +73,7 @@ ol.DRAGZOOM_ANIMATION_DURATION = 200;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @define {number} Hysterisis pixels.
|
* @define {number} Hysteresis pixels.
|
||||||
*/
|
*/
|
||||||
ol.DRAG_BOX_HYSTERESIS_PIXELS = 8;
|
ol.DRAG_BOX_HYSTERESIS_PIXELS = 8;
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -129,8 +129,7 @@ ol.Overlay = function(options) {
|
|||||||
this.handlePositionChanged, false, this);
|
this.handlePositionChanged, false, this);
|
||||||
|
|
||||||
goog.events.listen(
|
goog.events.listen(
|
||||||
this,
|
this, ol.Object.getChangeEventType(ol.OverlayProperty.POSITIONING),
|
||||||
ol.Object.getChangeEventType(ol.OverlayProperty.POSITIONING),
|
|
||||||
this.handlePositioningChanged, false, this);
|
this.handlePositioningChanged, false, this);
|
||||||
|
|
||||||
if (goog.isDef(options.element)) {
|
if (goog.isDef(options.element)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user