From bf9ca7f3d17af282264722690a6f559ec8a7c147 Mon Sep 17 00:00:00 2001 From: Simon Seyock Date: Fri, 23 Jul 2021 12:08:24 +0200 Subject: [PATCH] Add `change:layers` event. --- src/ol/layer/Group.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/ol/layer/Group.js b/src/ol/layer/Group.js index c89611ad22..804cb8f68a 100644 --- a/src/ol/layer/Group.js +++ b/src/ol/layer/Group.js @@ -13,6 +13,14 @@ import {getIntersection} from '../extent.js'; import {getUid} from '../util.js'; import {listen, unlistenByKey} from '../events.js'; +/*** + * @template Return + * @typedef {import("../Observable").OnSignature & + * import("../Observable").OnSignature & + * import("../Observable").CombinedOnSignature} GroupOnSignature + */ + /** * @typedef {Object} Options * @property {number} [opacity=1] Opacity (0, 1). @@ -64,6 +72,21 @@ class LayerGroup extends BaseLayer { super(baseOptions); + /*** + * @type {GroupOnSignature} + */ + this.on; + + /*** + * @type {GroupOnSignature} + */ + this.once; + + /*** + * @type {GroupOnSignature} + */ + this.un; + /** * @private * @type {Array}