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

@@ -4,7 +4,7 @@
import {inherits} from './index.js';
import _ol_ImageBase_ from './ImageBase.js';
import ImageState from './ImageState.js';
import _ol_events_ from './events.js';
import {listenOnce, unlistenByKey} from './events.js';
import EventType from './events/EventType.js';
import {getHeight} from './extent.js';
@@ -108,9 +108,9 @@ _ol_Image_.prototype.load = function() {
this.state = ImageState.LOADING;
this.changed();
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)
];
this.imageLoadFunction_(this, this.src_);
@@ -132,7 +132,7 @@ _ol_Image_.prototype.setImage = function(image) {
* @private
*/
_ol_Image_.prototype.unlistenImage_ = function() {
this.imageListenerKeys_.forEach(_ol_events_.unlistenByKey);
this.imageListenerKeys_.forEach(unlistenByKey);
this.imageListenerKeys_ = null;
};
export default _ol_Image_;