Use extends, super and proper constructor jsdoc for ol/interaction

This commit is contained in:
ahocevar
2018-07-17 21:09:06 +02:00
parent fd962caa1c
commit e79add2e77
20 changed files with 273 additions and 402 deletions

View File

@@ -1,7 +1,6 @@
/**
* @module ol/interaction/DragRotateAndZoom
*/
import {inherits} from '../util.js';
import {disable} from '../rotationconstraint.js';
import ViewHint from '../ViewHint.js';
import {shiftKeyOnly, mouseOnly} from '../events/condition.js';
@@ -28,19 +27,18 @@ import PointerInteraction from '../interaction/Pointer.js';
* This interaction is only supported for mouse devices.
*
* And this interaction is not included in the default interactions.
*
* @constructor
* @extends {module:ol/interaction/Pointer}
* @param {module:ol/interaction/DragRotateAndZoom~Options=} opt_options Options.
* @api
*/
class DragRotateAndZoom {
class DragRotateAndZoom extends PointerInteraction {
/**
* @param {module:ol/interaction/DragRotateAndZoom~Options=} opt_options Options.
* @api
*/
constructor(opt_options) {
const options = opt_options ? opt_options : {};
PointerInteraction.call(this, {
super({
handleDownEvent: handleDownEvent,
handleDragEvent: handleDragEvent,
handleUpEvent: handleUpEvent
@@ -80,8 +78,6 @@ class DragRotateAndZoom {
}
inherits(DragRotateAndZoom, PointerInteraction);
/**
* @param {module:ol/MapBrowserPointerEvent} mapBrowserEvent Event.