Merge pull request #9476 from tschaub/event-longnames

Document events fired by interactions
This commit is contained in:
Tim Schaub
2019-05-01 10:04:58 -06:00
committed by GitHub
2 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -65,7 +65,7 @@
"istanbul": "0.4.5", "istanbul": "0.4.5",
"jquery": "3.4.0", "jquery": "3.4.0",
"jsdoc": "3.5.5", "jsdoc": "3.5.5",
"jsdoc-plugin-typescript": "^1.0.7", "jsdoc-plugin-typescript": "^1.0.8",
"karma": "^4.0.1", "karma": "^4.0.1",
"karma-chrome-launcher": "2.2.0", "karma-chrome-launcher": "2.2.0",
"karma-coverage": "^1.1.2", "karma-coverage": "^1.1.2",
+7 -7
View File
@@ -38,7 +38,7 @@ import {createEditingStyle} from '../style/Style.js';
const ExtentEventType = { const ExtentEventType = {
/** /**
* Triggered after the extent is changed * Triggered after the extent is changed
* @event ExtentEventType#extentchanged * @event ExtentEvent#extentchanged
* @api * @api
*/ */
EXTENTCHANGED: 'extentchanged' EXTENTCHANGED: 'extentchanged'
@@ -47,10 +47,10 @@ const ExtentEventType = {
/** /**
* @classdesc * @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. * instances of this type.
*/ */
class ExtentInteractionEvent extends Event { class ExtentEvent extends Event {
/** /**
* @param {import("../extent.js").Extent} extent the new extent * @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. * Once drawn, the vector box can be modified by dragging its vertices or edges.
* This interaction is only supported for mouse devices. * This interaction is only supported for mouse devices.
* *
* @fires Event * @fires ExtentEvent
* @api * @api
*/ */
class ExtentInteraction extends PointerInteraction { class Extent extends PointerInteraction {
/** /**
* @param {Options=} opt_options Options. * @param {Options=} opt_options Options.
*/ */
@@ -399,7 +399,7 @@ class ExtentInteraction extends PointerInteraction {
//Null extent means no bbox //Null extent means no bbox
this.extent_ = extent ? extent : null; this.extent_ = extent ? extent : null;
this.createOrUpdateExtentFeature_(extent); 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;