Merge pull request #5450 from probins/typedefs
Remove sub-namespaces from all remaining typedefs
This commit is contained in:
@@ -75,17 +75,17 @@ ol.style.AtlasManager = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @param {string} id The identifier of the entry to check.
|
||||
* @return {?ol.style.AtlasManagerInfo} The position and atlas image for the
|
||||
* @return {?ol.AtlasManagerInfo} The position and atlas image for the
|
||||
* entry, or `null` if the entry is not part of the atlas manager.
|
||||
*/
|
||||
ol.style.AtlasManager.prototype.getInfo = function(id) {
|
||||
/** @type {?ol.style.AtlasInfo} */
|
||||
/** @type {?ol.AtlasInfo} */
|
||||
var info = this.getInfo_(this.atlases_, id);
|
||||
|
||||
if (!info) {
|
||||
return null;
|
||||
}
|
||||
/** @type {?ol.style.AtlasInfo} */
|
||||
/** @type {?ol.AtlasInfo} */
|
||||
var hitInfo = this.getInfo_(this.hitAtlases_, id);
|
||||
goog.asserts.assert(hitInfo, 'hitInfo must not be null');
|
||||
|
||||
@@ -97,7 +97,7 @@ ol.style.AtlasManager.prototype.getInfo = function(id) {
|
||||
* @private
|
||||
* @param {Array.<ol.style.Atlas>} atlases The atlases to search.
|
||||
* @param {string} id The identifier of the entry to check.
|
||||
* @return {?ol.style.AtlasInfo} The position and atlas image for the entry,
|
||||
* @return {?ol.AtlasInfo} The position and atlas image for the entry,
|
||||
* or `null` if the entry is not part of the atlases.
|
||||
*/
|
||||
ol.style.AtlasManager.prototype.getInfo_ = function(atlases, id) {
|
||||
@@ -115,10 +115,10 @@ ol.style.AtlasManager.prototype.getInfo_ = function(atlases, id) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.style.AtlasInfo} info The info for the real image.
|
||||
* @param {ol.style.AtlasInfo} hitInfo The info for the hit-detection
|
||||
* @param {ol.AtlasInfo} info The info for the real image.
|
||||
* @param {ol.AtlasInfo} hitInfo The info for the hit-detection
|
||||
* image.
|
||||
* @return {?ol.style.AtlasManagerInfo} The position and atlas image for the
|
||||
* @return {?ol.AtlasManagerInfo} The position and atlas image for the
|
||||
* entry, or `null` if the entry is not part of the atlases.
|
||||
*/
|
||||
ol.style.AtlasManager.prototype.mergeInfos_ = function(info, hitInfo) {
|
||||
@@ -126,7 +126,7 @@ ol.style.AtlasManager.prototype.mergeInfos_ = function(info, hitInfo) {
|
||||
'in order to merge, offsetX of info and hitInfo must be equal');
|
||||
goog.asserts.assert(info.offsetY === hitInfo.offsetY,
|
||||
'in order to merge, offsetY of info and hitInfo must be equal');
|
||||
return /** @type {ol.style.AtlasManagerInfo} */ ({
|
||||
return /** @type {ol.AtlasManagerInfo} */ ({
|
||||
offsetX: info.offsetX,
|
||||
offsetY: info.offsetY,
|
||||
image: info.image,
|
||||
@@ -154,7 +154,7 @@ ol.style.AtlasManager.prototype.mergeInfos_ = function(info, hitInfo) {
|
||||
* detection atlas image.
|
||||
* @param {Object=} opt_this Value to use as `this` when executing
|
||||
* `renderCallback` and `renderHitCallback`.
|
||||
* @return {?ol.style.AtlasManagerInfo} The position and atlas image for the
|
||||
* @return {?ol.AtlasManagerInfo} The position and atlas image for the
|
||||
* entry, or `null` if the image is too big.
|
||||
*/
|
||||
ol.style.AtlasManager.prototype.add = function(id, width, height,
|
||||
@@ -164,7 +164,7 @@ ol.style.AtlasManager.prototype.add = function(id, width, height,
|
||||
return null;
|
||||
}
|
||||
|
||||
/** @type {?ol.style.AtlasInfo} */
|
||||
/** @type {?ol.AtlasInfo} */
|
||||
var info = this.add_(false,
|
||||
id, width, height, renderCallback, opt_this);
|
||||
if (!info) {
|
||||
@@ -177,7 +177,7 @@ ol.style.AtlasManager.prototype.add = function(id, width, height,
|
||||
var renderHitCallback = opt_renderHitCallback !== undefined ?
|
||||
opt_renderHitCallback : ol.nullFunction;
|
||||
|
||||
/** @type {?ol.style.AtlasInfo} */
|
||||
/** @type {?ol.AtlasInfo} */
|
||||
var hitInfo = this.add_(true,
|
||||
id, width, height, renderHitCallback, opt_this);
|
||||
goog.asserts.assert(hitInfo, 'hitInfo must not be null');
|
||||
@@ -196,7 +196,7 @@ ol.style.AtlasManager.prototype.add = function(id, width, height,
|
||||
* Called to render the new image onto an atlas image.
|
||||
* @param {Object=} opt_this Value to use as `this` when executing
|
||||
* `renderCallback` and `renderHitCallback`.
|
||||
* @return {?ol.style.AtlasInfo} The position and atlas image for the entry,
|
||||
* @return {?ol.AtlasInfo} The position and atlas image for the entry,
|
||||
* or `null` if the image is too big.
|
||||
*/
|
||||
ol.style.AtlasManager.prototype.add_ = function(isHitAtlas, id, width, height,
|
||||
@@ -256,13 +256,13 @@ ol.style.Atlas = function(size, space) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<ol.style.AtlasBlock>}
|
||||
* @type {Array.<ol.AtlasBlock>}
|
||||
*/
|
||||
this.emptyBlocks_ = [{x: 0, y: 0, width: size, height: size}];
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object.<string, ol.style.AtlasInfo>}
|
||||
* @type {Object.<string, ol.AtlasInfo>}
|
||||
*/
|
||||
this.entries_ = {};
|
||||
|
||||
@@ -282,7 +282,7 @@ ol.style.Atlas = function(size, space) {
|
||||
|
||||
/**
|
||||
* @param {string} id The identifier of the entry to check.
|
||||
* @return {?ol.style.AtlasInfo} The atlas info.
|
||||
* @return {?ol.AtlasInfo} The atlas info.
|
||||
*/
|
||||
ol.style.Atlas.prototype.get = function(id) {
|
||||
return this.entries_[id] || null;
|
||||
@@ -297,7 +297,7 @@ ol.style.Atlas.prototype.get = function(id) {
|
||||
* Called to render the new image onto an atlas image.
|
||||
* @param {Object=} opt_this Value to use as `this` when executing
|
||||
* `renderCallback`.
|
||||
* @return {?ol.style.AtlasInfo} The position and atlas image for the entry.
|
||||
* @return {?ol.AtlasInfo} The position and atlas image for the entry.
|
||||
*/
|
||||
ol.style.Atlas.prototype.add = function(id, width, height, renderCallback, opt_this) {
|
||||
var block, i, ii;
|
||||
@@ -332,7 +332,7 @@ ol.style.Atlas.prototype.add = function(id, width, height, renderCallback, opt_t
|
||||
/**
|
||||
* @private
|
||||
* @param {number} index The index of the block.
|
||||
* @param {ol.style.AtlasBlock} block The block to split.
|
||||
* @param {ol.AtlasBlock} block The block to split.
|
||||
* @param {number} width The width of the entry to insert.
|
||||
* @param {number} height The height of the entry to insert.
|
||||
*/
|
||||
@@ -340,9 +340,9 @@ ol.style.Atlas.prototype.split_ = function(index, block, width, height) {
|
||||
var deltaWidth = block.width - width;
|
||||
var deltaHeight = block.height - height;
|
||||
|
||||
/** @type {ol.style.AtlasBlock} */
|
||||
/** @type {ol.AtlasBlock} */
|
||||
var newBlock1;
|
||||
/** @type {ol.style.AtlasBlock} */
|
||||
/** @type {ol.AtlasBlock} */
|
||||
var newBlock2;
|
||||
|
||||
if (deltaWidth > deltaHeight) {
|
||||
@@ -391,8 +391,8 @@ ol.style.Atlas.prototype.split_ = function(index, block, width, height) {
|
||||
* blocks (that are potentially smaller) are filled first.
|
||||
* @private
|
||||
* @param {number} index The index of the block to remove.
|
||||
* @param {ol.style.AtlasBlock} newBlock1 The 1st block to add.
|
||||
* @param {ol.style.AtlasBlock} newBlock2 The 2nd block to add.
|
||||
* @param {ol.AtlasBlock} newBlock1 The 1st block to add.
|
||||
* @param {ol.AtlasBlock} newBlock2 The 2nd block to add.
|
||||
*/
|
||||
ol.style.Atlas.prototype.updateBlocks_ = function(index, newBlock1, newBlock2) {
|
||||
var args = [index, 1];
|
||||
|
||||
@@ -252,7 +252,7 @@ ol.style.Circle.prototype.render_ = function(atlasManager) {
|
||||
|
||||
var size = 2 * (this.radius_ + strokeWidth) + 1;
|
||||
|
||||
/** @type {ol.style.CircleRenderOptions} */
|
||||
/** @type {ol.CircleRenderOptions} */
|
||||
var renderOptions = {
|
||||
strokeStyle: strokeStyle,
|
||||
strokeWidth: strokeWidth,
|
||||
@@ -313,7 +313,7 @@ ol.style.Circle.prototype.render_ = function(atlasManager) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.style.CircleRenderOptions} renderOptions Render options.
|
||||
* @param {ol.CircleRenderOptions} renderOptions Render options.
|
||||
* @param {CanvasRenderingContext2D} context The rendering context.
|
||||
* @param {number} x The origin for the symbol (x).
|
||||
* @param {number} y The origin for the symbol (y).
|
||||
@@ -348,7 +348,7 @@ ol.style.Circle.prototype.draw_ = function(renderOptions, context, x, y) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.style.CircleRenderOptions} renderOptions Render options.
|
||||
* @param {ol.CircleRenderOptions} renderOptions Render options.
|
||||
*/
|
||||
ol.style.Circle.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
||||
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
|
||||
@@ -368,7 +368,7 @@ ol.style.Circle.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.style.CircleRenderOptions} renderOptions Render options.
|
||||
* @param {ol.CircleRenderOptions} renderOptions Render options.
|
||||
* @param {CanvasRenderingContext2D} context The context.
|
||||
* @param {number} x The origin for the symbol (x).
|
||||
* @param {number} y The origin for the symbol (y).
|
||||
|
||||
@@ -414,7 +414,7 @@ ol.style.IconImage_ = function(image, src, size, crossOrigin, imageState,
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<ol.events.Key>}
|
||||
* @type {Array.<ol.EventsKey>}
|
||||
*/
|
||||
this.imageListenerKeys_ = null;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ ol.style.ImageState = {
|
||||
* {@link ol.style.RegularShape}.
|
||||
*
|
||||
* @constructor
|
||||
* @param {ol.style.ImageOptions} options Options.
|
||||
* @param {ol.StyleImageOptions} options Options.
|
||||
* @api
|
||||
*/
|
||||
ol.style.Image = function(options) {
|
||||
@@ -223,7 +223,7 @@ ol.style.Image.prototype.setSnapToPixel = function(snapToPixel) {
|
||||
/**
|
||||
* @param {function(this: T, ol.events.Event)} listener Listener function.
|
||||
* @param {T} thisArg Value to use as `this` when executing `listener`.
|
||||
* @return {ol.events.Key|undefined} Listener key.
|
||||
* @return {ol.EventsKey|undefined} Listener key.
|
||||
* @template T
|
||||
*/
|
||||
ol.style.Image.prototype.listenImageChange = goog.abstractMethod;
|
||||
|
||||
@@ -328,7 +328,7 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) {
|
||||
|
||||
var size = 2 * (this.radius_ + strokeWidth) + 1;
|
||||
|
||||
/** @type {ol.style.RegularShapeRenderOptions} */
|
||||
/** @type {ol.RegularShapeRenderOptions} */
|
||||
var renderOptions = {
|
||||
strokeStyle: strokeStyle,
|
||||
strokeWidth: strokeWidth,
|
||||
@@ -391,7 +391,7 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.style.RegularShapeRenderOptions} renderOptions Render options.
|
||||
* @param {ol.RegularShapeRenderOptions} renderOptions Render options.
|
||||
* @param {CanvasRenderingContext2D} context The rendering context.
|
||||
* @param {number} x The origin for the symbol (x).
|
||||
* @param {number} y The origin for the symbol (y).
|
||||
@@ -436,7 +436,7 @@ ol.style.RegularShape.prototype.draw_ = function(renderOptions, context, x, y) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.style.RegularShapeRenderOptions} renderOptions Render options.
|
||||
* @param {ol.RegularShapeRenderOptions} renderOptions Render options.
|
||||
*/
|
||||
ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
||||
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
|
||||
@@ -456,7 +456,7 @@ ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptio
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.style.RegularShapeRenderOptions} renderOptions Render options.
|
||||
* @param {ol.RegularShapeRenderOptions} renderOptions Render options.
|
||||
* @param {CanvasRenderingContext2D} context The context.
|
||||
* @param {number} x The origin for the symbol (x).
|
||||
* @param {number} y The origin for the symbol (y).
|
||||
|
||||
@@ -27,13 +27,13 @@ ol.style.Style = function(opt_options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {string|ol.geom.Geometry|ol.style.GeometryFunction}
|
||||
* @type {string|ol.geom.Geometry|ol.StyleGeometryFunction}
|
||||
*/
|
||||
this.geometry_ = null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!ol.style.GeometryFunction}
|
||||
* @type {!ol.StyleGeometryFunction}
|
||||
*/
|
||||
this.geometryFunction_ = ol.style.defaultGeometryFunction;
|
||||
|
||||
@@ -76,7 +76,7 @@ ol.style.Style = function(opt_options) {
|
||||
|
||||
/**
|
||||
* Get the geometry to be rendered.
|
||||
* @return {string|ol.geom.Geometry|ol.style.GeometryFunction}
|
||||
* @return {string|ol.geom.Geometry|ol.StyleGeometryFunction}
|
||||
* Feature property or geometry or function that returns the geometry that will
|
||||
* be rendered with this style.
|
||||
* @api
|
||||
@@ -88,7 +88,7 @@ ol.style.Style.prototype.getGeometry = function() {
|
||||
|
||||
/**
|
||||
* Get the function used to generate a geometry for rendering.
|
||||
* @return {!ol.style.GeometryFunction} Function that is called with a feature
|
||||
* @return {!ol.StyleGeometryFunction} Function that is called with a feature
|
||||
* and returns the geometry to render instead of the feature's geometry.
|
||||
* @api
|
||||
*/
|
||||
@@ -150,7 +150,7 @@ ol.style.Style.prototype.getZIndex = function() {
|
||||
/**
|
||||
* Set a geometry that is rendered instead of the feature's geometry.
|
||||
*
|
||||
* @param {string|ol.geom.Geometry|ol.style.GeometryFunction} geometry
|
||||
* @param {string|ol.geom.Geometry|ol.StyleGeometryFunction} geometry
|
||||
* Feature property or geometry or function returning a geometry to render
|
||||
* for this style.
|
||||
* @api
|
||||
@@ -195,9 +195,9 @@ ol.style.Style.prototype.setZIndex = function(zIndex) {
|
||||
* Convert the provided object into a style function. Functions passed through
|
||||
* unchanged. Arrays of ol.style.Style or single style objects wrapped in a
|
||||
* new style function.
|
||||
* @param {ol.style.StyleFunction|Array.<ol.style.Style>|ol.style.Style} obj
|
||||
* @param {ol.StyleFunction|Array.<ol.style.Style>|ol.style.Style} obj
|
||||
* A style function, a single style, or an array of styles.
|
||||
* @return {ol.style.StyleFunction} A style function.
|
||||
* @return {ol.StyleFunction} A style function.
|
||||
*/
|
||||
ol.style.createStyleFunction = function(obj) {
|
||||
var styleFunction;
|
||||
|
||||
Reference in New Issue
Block a user