From ea83354a33f7aa875d0fa93c77c9a33ab9e36da9 Mon Sep 17 00:00:00 2001 From: Edgardo Di Gesto Date: Mon, 28 May 2018 15:13:51 +0200 Subject: [PATCH] Add radiuschanging and centerchanging events --- lib/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/main.js b/lib/main.js index 437c3d3..a3643e4 100644 --- a/lib/main.js +++ b/lib/main.js @@ -154,6 +154,7 @@ class MapboxCircle { this._currentCenterLngLat[0] = newCenter[0]; this._currentCenterLngLat[1] = newCenter[1]; } + this._eventEmitter.emit('centerchanging', this); this._updateCircle(); this._animate(); } @@ -170,6 +171,7 @@ class MapboxCircle { } else { this._currentRadius = Math.min(Math.max(this.options.minRadius, newRadius), this.options.maxRadius); } + this._eventEmitter.emit('radiuschanging', this); this._updateCircle(); this._animate(); }