Simplify events and store listeners only in one place

This commit is contained in:
ahocevar
2019-09-04 16:39:32 +02:00
parent d416866108
commit ebfb20440a
52 changed files with 224 additions and 599 deletions
+1 -3
View File
@@ -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_;