@behance/helicropter
Advanced tools
Comparing version 15.2.0 to 15.2.1
{ | ||
"name": "@behance/helicropter", | ||
"version": "15.2.0", | ||
"version": "15.2.1", | ||
"description": "My helicropter goes \"whosh whosh whosh\"", | ||
@@ -5,0 +5,0 @@ "main": "src/js/index.js", |
@@ -350,2 +350,4 @@ import extend from '@behance/nbd/util/extend'; | ||
this._view.stopListening(this._view._uploadArea, 'image-uploading'); | ||
this._view.stopListening(this._view._uploadArea, 'upload-error'); | ||
this._view.listenOnce(this._view._uploadArea, { | ||
@@ -358,2 +360,8 @@ 'image-uploading'() { | ||
this._view.listenTo(this._view._uploadArea, { | ||
'upload-error'(err) { | ||
this.trigger('error:upload', err); | ||
}, | ||
}); | ||
this.uploadImage(); | ||
@@ -360,0 +368,0 @@ }, |
@@ -141,2 +141,11 @@ import $ from 'jquery'; | ||
it('emits `error:upload` when there is an error', function(done) { | ||
this.helicropter = new Helicropter(this.defaultConfig); | ||
this.helicropter.on('error:upload', done); | ||
this.helicropter.uploadThenRender($('.helicropter-container')); | ||
this.helicropter._view._uploadArea._uploader.trigger('error'); | ||
}); | ||
it('does not render the upload button for uploadArea', function(done) { | ||
@@ -143,0 +152,0 @@ this.helicropter = new Helicropter(this.defaultConfig); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8669660
4208