Use extends, super and proper constructor jsdoc for ol/interaction
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
/**
|
||||
* @module ol/interaction/MouseWheelZoom
|
||||
*/
|
||||
import {inherits} from '../util.js';
|
||||
import ViewHint from '../ViewHint.js';
|
||||
import {always} from '../events/condition.js';
|
||||
import {easeOut} from '../easing.js';
|
||||
@@ -47,16 +46,15 @@ export const Mode = {
|
||||
/**
|
||||
* @classdesc
|
||||
* Allows the user to zoom the map by scrolling the mouse wheel.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/interaction/Interaction}
|
||||
* @param {module:ol/interaction/MouseWheelZoom~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
class MouseWheelZoom {
|
||||
class MouseWheelZoom extends Interaction {
|
||||
/**
|
||||
* @param {module:ol/interaction/MouseWheelZoom~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
constructor(opt_options) {
|
||||
|
||||
Interaction.call(this, {
|
||||
super({
|
||||
handleEvent: handleEvent
|
||||
});
|
||||
|
||||
@@ -192,8 +190,6 @@ class MouseWheelZoom {
|
||||
}
|
||||
}
|
||||
|
||||
inherits(MouseWheelZoom, Interaction);
|
||||
|
||||
|
||||
/**
|
||||
* Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a
|
||||
|
||||
Reference in New Issue
Block a user