Use listen function instead of on

In #7614, the `opt_this` argument was removed from `Observable#on`, `#once` and `#un` but internal code was not adapted.
This commit is contained in:
Frederic Junod
2018-03-05 10:01:10 +01:00
parent d29fd63504
commit 235fc59c72
2 changed files with 12 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ import {getUid, inherits} from '../index.js';
import {assert} from '../asserts.js';
import Feature from '../Feature.js';
import {scale as scaleCoordinate, add as addCoordinate} from '../coordinate.js';
import {listen} from '../events.js';
import EventType from '../events/EventType.js';
import {buffer, createEmpty, createOrUpdateFromCoordinate} from '../extent.js';
import Point from '../geom/Point.js';
@@ -66,8 +67,7 @@ const Cluster = function(options) {
*/
this.source = options.source;
this.source.on(EventType.CHANGE,
Cluster.prototype.refresh, this);
listen(this.source, EventType.CHANGE, this.refresh, this);
};
inherits(Cluster, VectorSource);