Simplify events and store listeners only in one place
This commit is contained in:
@@ -80,9 +80,7 @@ class LayerGroup extends BaseLayer {
|
||||
*/
|
||||
this.listenerKeys_ = {};
|
||||
|
||||
listen(this,
|
||||
getChangeEventType(Property.LAYERS),
|
||||
this.handleLayersChanged_, this);
|
||||
this.addEventListener(getChangeEventType(Property.LAYERS), this.handleLayersChanged_);
|
||||
|
||||
if (layers) {
|
||||
if (Array.isArray(layers)) {
|
||||
|
||||
Reference in New Issue
Block a user