Link to the extent event instead of the extent event type

This commit is contained in:
Tim Schaub
2019-04-28 16:26:36 -06:00
parent 2cdfcf8b21
commit 0f998b4522
+7 -7
View File
@@ -38,7 +38,7 @@ import {createEditingStyle} from '../style/Style.js';
const ExtentEventType = {
/**
* Triggered after the extent is changed
* @event ExtentEventType#extentchanged
* @event ExtentEvent#extentchanged
* @api
*/
EXTENTCHANGED: 'extentchanged'
@@ -47,10 +47,10 @@ const ExtentEventType = {
/**
* @classdesc
* Events emitted by {@link module:ol/interaction/Extent~ExtentInteraction} instances are
* Events emitted by {@link module:ol/interaction/Extent~Extent} instances are
* instances of this type.
*/
class ExtentInteractionEvent extends Event {
class ExtentEvent extends Event {
/**
* @param {import("../extent.js").Extent} extent the new extent
@@ -75,10 +75,10 @@ class ExtentInteractionEvent extends Event {
* Once drawn, the vector box can be modified by dragging its vertices or edges.
* This interaction is only supported for mouse devices.
*
* @fires Event
* @fires ExtentEvent
* @api
*/
class ExtentInteraction extends PointerInteraction {
class Extent extends PointerInteraction {
/**
* @param {Options=} opt_options Options.
*/
@@ -399,7 +399,7 @@ class ExtentInteraction extends PointerInteraction {
//Null extent means no bbox
this.extent_ = extent ? extent : null;
this.createOrUpdateExtentFeature_(extent);
this.dispatchEvent(new ExtentInteractionEvent(this.extent_));
this.dispatchEvent(new ExtentEvent(this.extent_));
}
}
@@ -470,4 +470,4 @@ function getSegments(extent) {
}
export default ExtentInteraction;
export default Extent;