Module type for ol/Feature

This commit is contained in:
Tim Schaub
2018-03-11 23:32:28 -06:00
parent 5c9aa0ce93
commit cf80733e41
56 changed files with 333 additions and 333 deletions
+1 -1
View File
@@ -492,7 +492,7 @@ CanvasImmediateRenderer.prototype.drawGeometry = function(geometry) {
* this method is called. If you need `zIndex` support, you should be using an
* {@link ol.layer.Vector} instead.
*
* @param {ol.Feature} feature Feature.
* @param {module:ol/Feature~Feature} feature Feature.
* @param {ol.style.Style} style Style.
* @override
* @api
+8 -8
View File
@@ -449,7 +449,7 @@ CanvasReplay.prototype.drawCustom = function(geometry, feature, renderer) {
/**
* @protected
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
* @param {ol.Feature|ol.render.Feature} feature Feature.
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/
CanvasReplay.prototype.beginGeometry = function(geometry, feature) {
this.beginGeometryInstruction1_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0];
@@ -496,7 +496,7 @@ CanvasReplay.prototype.setStrokeStyle_ = function(context, instruction) {
/**
* @param {ol.DeclutterGroup} declutterGroup Declutter group.
* @param {ol.Feature|ol.render.Feature} feature Feature.
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/
CanvasReplay.prototype.renderDeclutter_ = function(declutterGroup, feature) {
if (declutterGroup && declutterGroup.length > 5) {
@@ -538,7 +538,7 @@ CanvasReplay.prototype.renderDeclutter_ = function(declutterGroup, feature) {
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip.
* @param {Array.<*>} instructions Instructions array.
* @param {function((ol.Feature|ol.render.Feature)): T|undefined}
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined}
* featureCallback Feature callback.
* @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this
* extent.
@@ -584,14 +584,14 @@ CanvasReplay.prototype.replay_ = function(
// When the batch size gets too big, performance decreases. 200 is a good
// balance between batch size and number of fill/stroke instructions.
const batchSize = this.instructions != instructions || this.overlaps ? 0 : 200;
let /** @type {ol.Feature|ol.render.Feature} */ feature;
let /** @type {module:ol/Feature~Feature|ol.render.Feature} */ feature;
let x, y;
while (i < ii) {
const instruction = instructions[i];
const type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]);
switch (type) {
case CanvasInstruction.BEGIN_GEOMETRY:
feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]);
feature = /** @type {module:ol/Feature~Feature|ol.render.Feature} */ (instruction[1]);
if ((skipFeatures &&
skippedFeaturesHash[getUid(feature).toString()]) ||
!feature.getGeometry()) {
@@ -760,7 +760,7 @@ CanvasReplay.prototype.replay_ = function(
break;
case CanvasInstruction.END_GEOMETRY:
if (featureCallback !== undefined) {
feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]);
feature = /** @type {module:ol/Feature~Feature|ol.render.Feature} */ (instruction[1]);
const result = featureCallback(feature);
if (result) {
return result;
@@ -870,7 +870,7 @@ CanvasReplay.prototype.replay = function(
* @param {number} viewRotation View rotation.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip.
* @param {function((ol.Feature|ol.render.Feature)): T=} opt_featureCallback
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T=} opt_featureCallback
* Feature callback.
* @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this
* extent.
@@ -1054,7 +1054,7 @@ CanvasReplay.prototype.updateStrokeStyle = function(state, applyStroke) {
/**
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
* @param {ol.Feature|ol.render.Feature} feature Feature.
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
*/
CanvasReplay.prototype.endGeometry = function(geometry, feature) {
this.beginGeometryInstruction1_[2] = this.instructions.length;
+2 -2
View File
@@ -288,7 +288,7 @@ CanvasReplayGroup.prototype.finish = function() {
* @param {number} hitTolerance Hit tolerance in pixels.
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
* to skip.
* @param {function((ol.Feature|ol.render.Feature)): T} callback Feature
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T} callback Feature
* callback.
* @param {Object.<string, ol.DeclutterGroup>} declutterReplays Declutter
* replays.
@@ -335,7 +335,7 @@ CanvasReplayGroup.prototype.forEachFeatureAtCoordinate = function(
let replayType;
/**
* @param {ol.Feature|ol.render.Feature} feature Feature.
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @return {?} Callback result.
*/
function featureCallback(feature) {