Remove lint
This commit is contained in:
@@ -46,7 +46,9 @@ class DoubleClickZoom extends Interaction {
|
||||
handleEvent(mapBrowserEvent) {
|
||||
let stopEvent = false;
|
||||
if (mapBrowserEvent.type == MapBrowserEventType.DBLCLICK) {
|
||||
const browserEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent);
|
||||
const browserEvent = /** @type {MouseEvent} */ (
|
||||
mapBrowserEvent.originalEvent
|
||||
);
|
||||
const map = mapBrowserEvent.map;
|
||||
const anchor = mapBrowserEvent.coordinate;
|
||||
const delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;
|
||||
|
||||
@@ -185,7 +185,9 @@ class Draw extends PointerInteraction {
|
||||
* @param {Options} options Options.
|
||||
*/
|
||||
constructor(options) {
|
||||
const pointerOptions = /** @type {import("./Pointer.js").Options} */ (options);
|
||||
const pointerOptions = /** @type {import("./Pointer.js").Options} */ (
|
||||
options
|
||||
);
|
||||
if (!pointerOptions.stopDown) {
|
||||
pointerOptions.stopDown = FALSE;
|
||||
}
|
||||
@@ -255,7 +257,9 @@ class Draw extends PointerInteraction {
|
||||
* @type {import("../geom/GeometryType.js").default}
|
||||
* @private
|
||||
*/
|
||||
this.type_ = /** @type {import("../geom/GeometryType.js").default} */ (options.type);
|
||||
this.type_ = /** @type {import("../geom/GeometryType.js").default} */ (
|
||||
options.type
|
||||
);
|
||||
|
||||
/**
|
||||
* Drawing mode (derived from geometry type.
|
||||
|
||||
@@ -86,7 +86,9 @@ class KeyboardPan extends Interaction {
|
||||
handleEvent(mapBrowserEvent) {
|
||||
let stopEvent = false;
|
||||
if (mapBrowserEvent.type == EventType.KEYDOWN) {
|
||||
const keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);
|
||||
const keyEvent = /** @type {KeyboardEvent} */ (
|
||||
mapBrowserEvent.originalEvent
|
||||
);
|
||||
const keyCode = keyEvent.keyCode;
|
||||
if (
|
||||
this.condition_(mapBrowserEvent) &&
|
||||
|
||||
@@ -70,7 +70,9 @@ class KeyboardZoom extends Interaction {
|
||||
mapBrowserEvent.type == EventType.KEYDOWN ||
|
||||
mapBrowserEvent.type == EventType.KEYPRESS
|
||||
) {
|
||||
const keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);
|
||||
const keyEvent = /** @type {KeyboardEvent} */ (
|
||||
mapBrowserEvent.originalEvent
|
||||
);
|
||||
const charCode = keyEvent.charCode;
|
||||
if (
|
||||
this.condition_(mapBrowserEvent) &&
|
||||
|
||||
@@ -757,7 +757,9 @@ class Modify extends PointerInteraction {
|
||||
centerSegmentData.featureSegments = featureSegments;
|
||||
circumferenceSegmentData.featureSegments = featureSegments;
|
||||
this.rBush_.insert(createExtent(coordinates), centerSegmentData);
|
||||
let circleGeometry = /** @type {import("../geom/Geometry.js").default} */ (geometry);
|
||||
let circleGeometry = /** @type {import("../geom/Geometry.js").default} */ (
|
||||
geometry
|
||||
);
|
||||
const userProjection = getUserProjection();
|
||||
if (userProjection && this.getMap()) {
|
||||
const projection = this.getMap().getView().getProjection();
|
||||
@@ -1526,14 +1528,16 @@ function projectedDistanceToSegmentDataSquared(
|
||||
const geometry = segmentData.geometry;
|
||||
|
||||
if (geometry.getType() === GeometryType.CIRCLE) {
|
||||
let circleGeometry = /** @type {import("../geom/Circle.js").default} */ (geometry);
|
||||
let circleGeometry = /** @type {import("../geom/Circle.js").default} */ (
|
||||
geometry
|
||||
);
|
||||
|
||||
if (segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) {
|
||||
const userProjection = getUserProjection();
|
||||
if (userProjection) {
|
||||
circleGeometry = /** @type {import("../geom/Circle.js").default} */ (circleGeometry
|
||||
.clone()
|
||||
.transform(userProjection, projection));
|
||||
circleGeometry = /** @type {import("../geom/Circle.js").default} */ (
|
||||
circleGeometry.clone().transform(userProjection, projection)
|
||||
);
|
||||
}
|
||||
const distanceToCenterSquared = squaredCoordinateDistance(
|
||||
circleGeometry.getCenter(),
|
||||
@@ -1568,12 +1572,14 @@ function closestOnSegmentData(pointCoordinates, segmentData, projection) {
|
||||
geometry.getType() === GeometryType.CIRCLE &&
|
||||
segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX
|
||||
) {
|
||||
let circleGeometry = /** @type {import("../geom/Circle.js").default} */ (geometry);
|
||||
let circleGeometry = /** @type {import("../geom/Circle.js").default} */ (
|
||||
geometry
|
||||
);
|
||||
const userProjection = getUserProjection();
|
||||
if (userProjection) {
|
||||
circleGeometry = /** @type {import("../geom/Circle.js").default} */ (circleGeometry
|
||||
.clone()
|
||||
.transform(userProjection, projection));
|
||||
circleGeometry = /** @type {import("../geom/Circle.js").default} */ (
|
||||
circleGeometry.clone().transform(userProjection, projection)
|
||||
);
|
||||
}
|
||||
return toUserCoordinate(
|
||||
circleGeometry.getClosestPoint(
|
||||
|
||||
@@ -179,7 +179,9 @@ class MouseWheelZoom extends Interaction {
|
||||
}
|
||||
|
||||
const map = mapBrowserEvent.map;
|
||||
const wheelEvent = /** @type {WheelEvent} */ (mapBrowserEvent.originalEvent);
|
||||
const wheelEvent = /** @type {WheelEvent} */ (
|
||||
mapBrowserEvent.originalEvent
|
||||
);
|
||||
wheelEvent.preventDefault();
|
||||
|
||||
if (this.useAnchor_) {
|
||||
|
||||
@@ -27,7 +27,9 @@ class PinchRotate extends PointerInteraction {
|
||||
constructor(opt_options) {
|
||||
const options = opt_options ? opt_options : {};
|
||||
|
||||
const pointerOptions = /** @type {import("./Pointer.js").Options} */ (options);
|
||||
const pointerOptions = /** @type {import("./Pointer.js").Options} */ (
|
||||
options
|
||||
);
|
||||
|
||||
if (!pointerOptions.stopDown) {
|
||||
pointerOptions.stopDown = FALSE;
|
||||
|
||||
@@ -24,7 +24,9 @@ class PinchZoom extends PointerInteraction {
|
||||
constructor(opt_options) {
|
||||
const options = opt_options ? opt_options : {};
|
||||
|
||||
const pointerOptions = /** @type {import("./Pointer.js").Options} */ (options);
|
||||
const pointerOptions = /** @type {import("./Pointer.js").Options} */ (
|
||||
options
|
||||
);
|
||||
|
||||
if (!pointerOptions.stopDown) {
|
||||
pointerOptions.stopDown = FALSE;
|
||||
|
||||
@@ -295,8 +295,9 @@ class Select extends Interaction {
|
||||
* @api
|
||||
*/
|
||||
getLayer(feature) {
|
||||
return /** @type {import('../layer/Vector.js').default} */ (this
|
||||
.featureLayerAssociation_[getUid(feature)]);
|
||||
return /** @type {import('../layer/Vector.js').default} */ (
|
||||
this.featureLayerAssociation_[getUid(feature)]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -100,7 +100,9 @@ class Snap extends PointerInteraction {
|
||||
constructor(opt_options) {
|
||||
const options = opt_options ? opt_options : {};
|
||||
|
||||
const pointerOptions = /** @type {import("./Pointer.js").Options} */ (options);
|
||||
const pointerOptions = /** @type {import("./Pointer.js").Options} */ (
|
||||
options
|
||||
);
|
||||
|
||||
if (!pointerOptions.handleDownEvent) {
|
||||
pointerOptions.handleDownEvent = TRUE;
|
||||
@@ -358,7 +360,9 @@ class Snap extends PointerInteraction {
|
||||
setMap(map) {
|
||||
const currentMap = this.getMap();
|
||||
const keys = this.featuresListenerKeys_;
|
||||
const features = /** @type {Array<import("../Feature.js").default>} */ (this.getFeatures_());
|
||||
const features = /** @type {Array<import("../Feature.js").default>} */ (
|
||||
this.getFeatures_()
|
||||
);
|
||||
|
||||
if (currentMap) {
|
||||
keys.forEach(unlistenByKey);
|
||||
@@ -548,9 +552,9 @@ class Snap extends PointerInteraction {
|
||||
let circleGeometry = geometry;
|
||||
const userProjection = getUserProjection();
|
||||
if (userProjection) {
|
||||
circleGeometry = /** @type {import("../geom/Circle.js").default} */ (circleGeometry
|
||||
.clone()
|
||||
.transform(userProjection, projection));
|
||||
circleGeometry = /** @type {import("../geom/Circle.js").default} */ (
|
||||
circleGeometry.clone().transform(userProjection, projection)
|
||||
);
|
||||
}
|
||||
const polygon = fromCircle(circleGeometry);
|
||||
if (userProjection) {
|
||||
|
||||
Reference in New Issue
Block a user