From f18b78d2da3816dfaf7235a9f3385d05896316c0 Mon Sep 17 00:00:00 2001 From: Maximilian Kroeg Date: Thu, 27 Feb 2020 10:00:41 +0100 Subject: [PATCH] Do requested changes 2/3 to cluster source --- src/ol/source/Cluster.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/source/Cluster.js b/src/ol/source/Cluster.js index 1f62b6e51b..35b02010ae 100644 --- a/src/ol/source/Cluster.js +++ b/src/ol/source/Cluster.js @@ -29,7 +29,7 @@ import VectorSource from './Vector.js'; * ``` * See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster * calculation point for polygons. - * @property {VectorSource} [source=null] Source. + * @property {VectorSource} [source] Source. * @property {boolean} [wrapX=true] Whether to wrap the world horizontally. */ @@ -150,7 +150,7 @@ class Cluster extends VectorSource { } this.source = source; if (source) { - this.sourceListenKey_ = source.addEventListener(EventType.CHANGE, this.boundRefresh_); + source.addEventListener(EventType.CHANGE, this.boundRefresh_); } this.refresh(); }