OHIF-26: StudyLoadingListener :: minor change (fn.bind)

This commit is contained in:
Leonardo Campos committed 2017-05-03 00:28:27 -03:00
1 parent 594a8b1241
commit 8f46e01422
1 file changed
+6 -10
@@ -52,12 +52,11 @@ class DICOMFileLoadingListener extends BaseLoadingListener {
startListening() {
const imageLoadProgressEventName = this._getImageLoadProgressEventName();
const imageLoadProgressEventHandle = this._imageLoadProgressEventHandle.bind(this);
this.stopListening();
$(cornerstone).on(imageLoadProgressEventName, (e, eventData) => {
this._imageLoadProgressEventHandle(e, eventData);
});
$(cornerstone).on(imageLoadProgressEventName, imageLoadProgressEventHandle);
}
stopListening() {
@@ -127,16 +126,13 @@ class StackLoadingListener extends BaseLoadingListener {
startListening() {
const imageLoadedEventName = this._getImageLoadedEventName();
const imageCachePromiseRemovedEventName = this._getImageCachePromiseRemoveEventName();
const imageLoadedEventHandle = this._imageLoadedEventHandle.bind(this);
const imageCachePromiseRemovedEventHandle = this._imageCachePromiseRemovedEventHandle.bind(this);
this.stopListening();
$(cornerstone).on(imageLoadedEventName, (e, eventData) => {
this._imageLoadedEventHandle(e, eventData);
});
$(cornerstone).on(imageCachePromiseRemovedEventName, (e, eventData) => {
this._imageCachePromiseRemovedEventHandle(e, eventData);
});
$(cornerstone).on(imageLoadedEventName, imageLoadedEventHandle);
$(cornerstone).on(imageCachePromiseRemovedEventName, imageCachePromiseRemovedEventHandle);
}
stopListening() {