Simplify events and store listeners only in one place
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
import ImageWrapper from '../Image.js';
|
||||
import {assert} from '../asserts.js';
|
||||
import {listen} from '../events.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import {containsExtent, getHeight, getWidth} from '../extent.js';
|
||||
import {assign} from '../obj.js';
|
||||
@@ -197,8 +196,7 @@ class ImageArcGISRest extends ImageSource {
|
||||
|
||||
this.renderedRevision_ = this.getRevision();
|
||||
|
||||
listen(this.image_, EventType.CHANGE,
|
||||
this.handleImageChange, this);
|
||||
this.image_.addEventListener(EventType.CHANGE, this.handleImageChange.bind(this));
|
||||
|
||||
return this.image_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user