Remove sub-namespaces from all remaining typedefs

This commit is contained in:
Peter Robins
2016-06-09 09:21:23 +00:00
parent 09202cf95d
commit 2c29512c80
47 changed files with 492 additions and 479 deletions

View File

@@ -46,7 +46,7 @@ ol.interaction.DragAndDrop = function(opt_options) {
/**
* @private
* @type {Array.<ol.events.Key>}
* @type {Array.<ol.EventsKey>}
*/
this.dropListenKeys_ = null;

View File

@@ -120,14 +120,14 @@ ol.interaction.DragBox = function(opt_options) {
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.condition_ = options.condition ?
options.condition : ol.events.condition.always;
/**
* @private
* @type {ol.interaction.DragBoxEndConditionType}
* @type {ol.DragBoxEndConditionType}
*/
this.boxEndCondition_ = options.boxEndCondition ?
options.boxEndCondition : ol.interaction.DragBox.defaultBoxEndCondition;

View File

@@ -48,7 +48,7 @@ ol.interaction.DragPan = function(opt_options) {
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.condition_ = options.condition ?
options.condition : ol.events.condition.noModifierKeys;

View File

@@ -34,7 +34,7 @@ ol.interaction.DragRotateAndZoom = function(opt_options) {
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.condition_ = options.condition ?
options.condition : ol.events.condition.shiftKeyOnly;

View File

@@ -33,7 +33,7 @@ ol.interaction.DragRotate = function(opt_options) {
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.condition_ = options.condition ?
options.condition : ol.events.condition.altShiftKeysOnly;

View File

@@ -161,7 +161,7 @@ ol.interaction.Draw = function(options) {
/**
* A function to decide if a potential finish coordinate is permissable
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.finishCondition_ = options.finishCondition ? options.finishCondition : ol.functions.TRUE;
@@ -213,7 +213,7 @@ ol.interaction.Draw = function(options) {
}
/**
* @type {ol.interaction.DrawGeometryFunctionType}
* @type {ol.DrawGeometryFunctionType}
* @private
*/
this.geometryFunction_ = geometryFunction;
@@ -294,14 +294,14 @@ ol.interaction.Draw = function(options) {
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.condition_ = options.condition ?
options.condition : ol.events.condition.noModifierKeys;
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.freehandCondition_ = options.freehandCondition ?
options.freehandCondition : ol.events.condition.shiftKeyOnly;
@@ -315,7 +315,7 @@ ol.inherits(ol.interaction.Draw, ol.interaction.Pointer);
/**
* @return {ol.style.StyleFunction} Styles.
* @return {ol.StyleFunction} Styles.
*/
ol.interaction.Draw.getDefaultStyleFunction = function() {
var styles = ol.style.createDefaultEditingStyles();
@@ -795,7 +795,7 @@ ol.interaction.Draw.prototype.updateState_ = function() {
* @param {number=} opt_angle Angle of the first point in radians. 0 means East.
* Default is the angle defined by the heading from the center of the
* regular polygon to the current pointer position.
* @return {ol.interaction.DrawGeometryFunctionType} Function that draws a
* @return {ol.DrawGeometryFunctionType} Function that draws a
* polygon.
* @api
*/

View File

@@ -46,7 +46,7 @@ ol.interaction.KeyboardPan = function(opt_options) {
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.condition_ = options.condition !== undefined ?
options.condition : this.defaultCondition_

View File

@@ -33,7 +33,7 @@ ol.interaction.KeyboardZoom = function(opt_options) {
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.condition_ = options.condition ? options.condition :
ol.events.condition.targetNotEditable;

View File

@@ -103,7 +103,7 @@ ol.interaction.Modify = function(options) {
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.condition_ = options.condition ?
options.condition : ol.events.condition.primaryAction;
@@ -120,7 +120,7 @@ ol.interaction.Modify = function(options) {
}
/**
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
* @private
*/
this.deleteCondition_ = options.deleteCondition ?
@@ -162,7 +162,7 @@ ol.interaction.Modify = function(options) {
/**
* Segment RTree for each layer
* @type {ol.structs.RBush.<ol.interaction.SegmentDataType>}
* @type {ol.structs.RBush.<ol.ModifySegmentDataType>}
* @private
*/
this.rBush_ = new ol.structs.RBush();
@@ -302,10 +302,10 @@ ol.interaction.Modify.prototype.removeFeature_ = function(feature) {
*/
ol.interaction.Modify.prototype.removeFeatureSegmentData_ = function(feature) {
var rBush = this.rBush_;
var /** @type {Array.<ol.interaction.SegmentDataType>} */ nodesToRemove = [];
var /** @type {Array.<ol.ModifySegmentDataType>} */ nodesToRemove = [];
rBush.forEach(
/**
* @param {ol.interaction.SegmentDataType} node RTree node.
* @param {ol.ModifySegmentDataType} node RTree node.
*/
function(node) {
if (feature === node.feature) {
@@ -369,7 +369,7 @@ ol.interaction.Modify.prototype.handleFeatureRemove_ = function(evt) {
*/
ol.interaction.Modify.prototype.writePointGeometry_ = function(feature, geometry) {
var coordinates = geometry.getCoordinates();
var segmentData = /** @type {ol.interaction.SegmentDataType} */ ({
var segmentData = /** @type {ol.ModifySegmentDataType} */ ({
feature: feature,
geometry: geometry,
segment: [coordinates, coordinates]
@@ -388,7 +388,7 @@ ol.interaction.Modify.prototype.writeMultiPointGeometry_ = function(feature, geo
var coordinates, i, ii, segmentData;
for (i = 0, ii = points.length; i < ii; ++i) {
coordinates = points[i];
segmentData = /** @type {ol.interaction.SegmentDataType} */ ({
segmentData = /** @type {ol.ModifySegmentDataType} */ ({
feature: feature,
geometry: geometry,
depth: [i],
@@ -410,7 +410,7 @@ ol.interaction.Modify.prototype.writeLineStringGeometry_ = function(feature, geo
var i, ii, segment, segmentData;
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SegmentDataType} */ ({
segmentData = /** @type {ol.ModifySegmentDataType} */ ({
feature: feature,
geometry: geometry,
index: i,
@@ -433,7 +433,7 @@ ol.interaction.Modify.prototype.writeMultiLineStringGeometry_ = function(feature
coordinates = lines[j];
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SegmentDataType} */ ({
segmentData = /** @type {ol.ModifySegmentDataType} */ ({
feature: feature,
geometry: geometry,
depth: [j],
@@ -458,7 +458,7 @@ ol.interaction.Modify.prototype.writePolygonGeometry_ = function(feature, geomet
coordinates = rings[j];
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SegmentDataType} */ ({
segmentData = /** @type {ol.ModifySegmentDataType} */ ({
feature: feature,
geometry: geometry,
depth: [j],
@@ -485,7 +485,7 @@ ol.interaction.Modify.prototype.writeMultiPolygonGeometry_ = function(feature, g
coordinates = rings[j];
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SegmentDataType} */ ({
segmentData = /** @type {ol.ModifySegmentDataType} */ ({
feature: feature,
geometry: geometry,
depth: [j, k],
@@ -533,8 +533,8 @@ ol.interaction.Modify.prototype.createOrUpdateVertexFeature_ = function(coordina
/**
* @param {ol.interaction.SegmentDataType} a The first segment data.
* @param {ol.interaction.SegmentDataType} b The second segment data.
* @param {ol.ModifySegmentDataType} a The first segment data.
* @param {ol.ModifySegmentDataType} b The second segment data.
* @return {number} The difference in indexes.
* @private
*/
@@ -808,7 +808,7 @@ ol.interaction.Modify.prototype.handlePointerAtPixel_ = function(pixel, map) {
/**
* @param {ol.interaction.SegmentDataType} segmentData Segment data.
* @param {ol.ModifySegmentDataType} segmentData Segment data.
* @param {ol.Coordinate} vertex Vertex.
* @private
*/
@@ -859,7 +859,7 @@ ol.interaction.Modify.prototype.insertVertex_ = function(segmentData, vertex) {
rTree.remove(segmentData);
goog.asserts.assert(index !== undefined, 'index should be defined');
this.updateSegmentIndices_(geometry, index, depth, 1);
var newSegmentData = /** @type {ol.interaction.SegmentDataType} */ ({
var newSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
segment: [segment[0], vertex],
feature: feature,
geometry: geometry,
@@ -870,7 +870,7 @@ ol.interaction.Modify.prototype.insertVertex_ = function(segmentData, vertex) {
newSegmentData);
this.dragSegments_.push([newSegmentData, 1]);
var newSegmentData2 = /** @type {ol.interaction.SegmentDataType} */ ({
var newSegmentData2 = /** @type {ol.ModifySegmentDataType} */ ({
segment: [vertex, segment[1]],
feature: feature,
geometry: geometry,
@@ -998,7 +998,7 @@ ol.interaction.Modify.prototype.removeVertex_ = function() {
if (left !== undefined && right !== undefined) {
goog.asserts.assert(newIndex >= 0, 'newIndex should be larger than 0');
var newSegmentData = /** @type {ol.interaction.SegmentDataType} */ ({
var newSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
depth: segmentData.depth,
feature: segmentData.feature,
geometry: segmentData.geometry,
@@ -1053,7 +1053,7 @@ ol.interaction.Modify.prototype.updateSegmentIndices_ = function(
/**
* @return {ol.style.StyleFunction} Styles.
* @return {ol.StyleFunction} Styles.
*/
ol.interaction.Modify.getDefaultStyleFunction = function() {
var style = ol.style.createDefaultEditingStyles();

View File

@@ -99,28 +99,28 @@ ol.interaction.Select = function(opt_options) {
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.condition_ = options.condition ?
options.condition : ol.events.condition.singleClick;
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.addCondition_ = options.addCondition ?
options.addCondition : ol.events.condition.never;
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.removeCondition_ = options.removeCondition ?
options.removeCondition : ol.events.condition.never;
/**
* @private
* @type {ol.events.ConditionType}
* @type {ol.EventsConditionType}
*/
this.toggleCondition_ = options.toggleCondition ?
options.toggleCondition : ol.events.condition.shiftKeyOnly;
@@ -133,7 +133,7 @@ ol.interaction.Select = function(opt_options) {
/**
* @private
* @type {ol.interaction.SelectFilterFunction}
* @type {ol.SelectFilterFunction}
*/
this.filter_ = options.filter ? options.filter :
ol.functions.TRUE;
@@ -355,7 +355,7 @@ ol.interaction.Select.prototype.setMap = function(map) {
/**
* @return {ol.style.StyleFunction} Styles.
* @return {ol.StyleFunction} Styles.
*/
ol.interaction.Select.getDefaultStyleFunction = function() {
var styles = ol.style.createDefaultEditingStyles();

View File

@@ -80,19 +80,19 @@ ol.interaction.Snap = function(opt_options) {
this.features_ = options.features ? options.features : null;
/**
* @type {Array.<ol.events.Key>}
* @type {Array.<ol.EventsKey>}
* @private
*/
this.featuresListenerKeys_ = [];
/**
* @type {Object.<number, ol.events.Key>}
* @type {Object.<number, ol.EventsKey>}
* @private
*/
this.geometryChangeListenerKeys_ = {};
/**
* @type {Object.<number, ol.events.Key>}
* @type {Object.<number, ol.EventsKey>}
* @private
*/
this.geometryModifyListenerKeys_ = {};
@@ -129,7 +129,7 @@ ol.interaction.Snap = function(opt_options) {
options.pixelTolerance : 10;
/**
* @type {function(ol.interaction.SnapSegmentDataType, ol.interaction.SnapSegmentDataType): number}
* @type {function(ol.SnapSegmentDataType, ol.SnapSegmentDataType): number}
* @private
*/
this.sortByDistance_ = ol.interaction.Snap.sortByDistance.bind(this);
@@ -137,7 +137,7 @@ ol.interaction.Snap = function(opt_options) {
/**
* Segment RTree for each layer
* @type {ol.structs.RBush.<ol.interaction.SnapSegmentDataType>}
* @type {ol.structs.RBush.<ol.SnapSegmentDataType>}
* @private
*/
this.rBush_ = new ol.structs.RBush();
@@ -377,7 +377,7 @@ ol.interaction.Snap.prototype.shouldStopEvent = ol.functions.FALSE;
* @param {ol.Pixel} pixel Pixel
* @param {ol.Coordinate} pixelCoordinate Coordinate
* @param {ol.Map} map Map.
* @return {ol.interaction.SnapResultType} Snap result
* @return {ol.SnapResultType} Snap result
*/
ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
@@ -436,7 +436,7 @@ ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])];
}
}
return /** @type {ol.interaction.SnapResultType} */ ({
return /** @type {ol.SnapResultType} */ ({
snapped: snapped,
vertex: vertex,
vertexPixel: vertexPixel
@@ -478,7 +478,7 @@ ol.interaction.Snap.prototype.writeLineStringGeometry_ = function(feature, geome
var i, ii, segment, segmentData;
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({
segmentData = /** @type {ol.SnapSegmentDataType} */ ({
feature: feature,
segment: segment
});
@@ -499,7 +499,7 @@ ol.interaction.Snap.prototype.writeMultiLineStringGeometry_ = function(feature,
coordinates = lines[j];
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({
segmentData = /** @type {ol.SnapSegmentDataType} */ ({
feature: feature,
segment: segment
});
@@ -519,7 +519,7 @@ ol.interaction.Snap.prototype.writeMultiPointGeometry_ = function(feature, geome
var coordinates, i, ii, segmentData;
for (i = 0, ii = points.length; i < ii; ++i) {
coordinates = points[i];
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({
segmentData = /** @type {ol.SnapSegmentDataType} */ ({
feature: feature,
segment: [coordinates, coordinates]
});
@@ -542,7 +542,7 @@ ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geo
coordinates = rings[j];
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({
segmentData = /** @type {ol.SnapSegmentDataType} */ ({
feature: feature,
segment: segment
});
@@ -560,7 +560,7 @@ ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geo
*/
ol.interaction.Snap.prototype.writePointGeometry_ = function(feature, geometry) {
var coordinates = geometry.getCoordinates();
var segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({
var segmentData = /** @type {ol.SnapSegmentDataType} */ ({
feature: feature,
segment: [coordinates, coordinates]
});
@@ -580,7 +580,7 @@ ol.interaction.Snap.prototype.writePolygonGeometry_ = function(feature, geometry
coordinates = rings[j];
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
segment = coordinates.slice(i, i + 2);
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({
segmentData = /** @type {ol.SnapSegmentDataType} */ ({
feature: feature,
segment: segment
});
@@ -625,8 +625,8 @@ ol.interaction.Snap.handleUpEvent_ = function(evt) {
/**
* Sort segments by distance, helper function
* @param {ol.interaction.SnapSegmentDataType} a The first segment data.
* @param {ol.interaction.SnapSegmentDataType} b The second segment data.
* @param {ol.SnapSegmentDataType} a The first segment data.
* @param {ol.SnapSegmentDataType} b The second segment data.
* @return {number} The difference in distance.
* @this {ol.interaction.Snap}
*/