controls and interactions.

This commit is contained in:
Simon Seyock
2021-06-23 13:13:47 +02:00
committed by Andreas Hocevar
parent 3365576548
commit e9a161740a
10 changed files with 76 additions and 0 deletions

View File

@@ -80,6 +80,13 @@ class FullScreen extends Control {
target: options.target,
});
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes|
* 'enterfullscreen'|'leavefullscreen', import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types, import("../Object").ObjectEvent>}
*/
this.on;
/**
* @private
* @type {string}

View File

@@ -68,6 +68,13 @@ class MousePosition extends Control {
target: options.target,
});
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:coordinateFormat'|'change:projection', import("../Object").ObjectEvent>}
*/
this.on;
this.addChangeListener(PROJECTION, this.handleProjectionChanged_);
if (options.coordinateFormat) {

View File

@@ -90,6 +90,13 @@ class ScaleLine extends Control {
target: options.target,
});
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:units', import("../Object").ObjectEvent>}
*/
this.on;
/**
* @private
* @type {HTMLElement}

View File

@@ -112,6 +112,14 @@ class DragBox extends PointerInteraction {
constructor(opt_options) {
super();
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:active', import("../Object").ObjectEvent> &
* import("../Observable").OnSignature<'boxcancel'|'boxdrag'|'boxend', DragBoxEvent>}
*/
this.on;
const options = opt_options ? opt_options : {};
/**

View File

@@ -193,6 +193,14 @@ class Draw extends PointerInteraction {
super(pointerOptions);
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:active', import("../Object").ObjectEvent> &
* import("../Observable").OnSignature<'drawabort'|'drawend'|'drawstart', DrawEvent>}
*/
this.on;
/**
* @type {boolean}
* @private

View File

@@ -92,6 +92,14 @@ class Extent extends PointerInteraction {
super(/** @type {import("./Pointer.js").Options} */ (options));
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:active', import("../Object").ObjectEvent> &
* import("../Observable").OnSignature<'extentchanged', ExtentEvent>}
*/
this.on;
/**
* Condition
* @type {import("../events/condition.js").Condition}

View File

@@ -36,6 +36,13 @@ class Interaction extends BaseObject {
constructor(opt_options) {
super();
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:active', import("../Object").ObjectEvent>}
*/
this.on;
if (opt_options && opt_options.handleEvent) {
this.handleEvent = opt_options.handleEvent;
}

View File

@@ -192,6 +192,14 @@ class Modify extends PointerInteraction {
constructor(options) {
super(/** @type {import("./Pointer.js").Options} */ (options));
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:active', import("../Object").ObjectEvent> &
* import("../Observable").OnSignature<'modifyend'|'modifystart', ModifyEvent>}
*/
this.on;
/** @private */
this.boundHandleFeatureChange_ = this.handleFeatureChange_.bind(this);

View File

@@ -156,6 +156,14 @@ class Select extends Interaction {
constructor(opt_options) {
super();
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:active', import("../Object").ObjectEvent> &
* import("../Observable").OnSignature<'select', SelectEvent>}
*/
this.on;
const options = opt_options ? opt_options : {};
/**

View File

@@ -126,6 +126,14 @@ class Translate extends PointerInteraction {
super(/** @type {import("./Pointer.js").Options} */ (options));
/***
* @type {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default> &
* import("../Observable").OnSignature<import("../ObjectEventType").Types|
* 'change:active', import("../Object").ObjectEvent> &
* import("../Observable").OnSignature<'translateend'|'translatestart'|'translating', TranslateEvent>}
*/
this.on;
/**
* The last position we translated to.
* @type {import("../coordinate.js").Coordinate}