Named exports from ol/events

This commit is contained in:
Tim Schaub
2018-01-24 10:09:57 -07:00
parent 1786bbbe80
commit 7e7631c42a
74 changed files with 437 additions and 445 deletions

View File

@@ -3,7 +3,7 @@
*/
import {inherits} from '../index.js';
import {createCanvasContext2D} from '../dom.js';
import _ol_events_ from '../events.js';
import {listenOnce, unlistenByKey} from '../events.js';
import EventTarget from '../events/EventTarget.js';
import EventType from '../events/EventType.js';
import ImageState from '../ImageState.js';
@@ -222,9 +222,9 @@ IconImage.prototype.load = function() {
if (this.imageState_ == ImageState.IDLE) {
this.imageState_ = ImageState.LOADING;
this.imageListenerKeys_ = [
_ol_events_.listenOnce(this.image_, EventType.ERROR,
listenOnce(this.image_, EventType.ERROR,
this.handleImageError_, this),
_ol_events_.listenOnce(this.image_, EventType.LOAD,
listenOnce(this.image_, EventType.LOAD,
this.handleImageLoad_, this)
];
try {
@@ -271,7 +271,7 @@ IconImage.prototype.replaceColor_ = function() {
* @private
*/
IconImage.prototype.unlistenImage_ = function() {
this.imageListenerKeys_.forEach(_ol_events_.unlistenByKey);
this.imageListenerKeys_.forEach(unlistenByKey);
this.imageListenerKeys_ = null;
};
export default IconImage;