this.uploadQueueLoadNext();
};
+DDFileUploaderBase.prototype.progressHandlerCB = function(progress) {
+ // To be implemented by descendant.
+ // 0 <= progress <= 1
+};
+
DDFileUploaderBase.prototype.progressHandler = function(evt) {
if (evt.lengthComputable) {
var progress = evt.loaded / evt.total;
- this.updateProgressBar(progress);
- var currentOpacity = this.previewImg.style.opacity;
- this.previewImg.style.opacity = Math.max(currentOpacity, progress);
+ this.progressHandlerCB(progress);
}
};
this.progressBar = slide.progressBar;
};
+DDImageUploader.prototype.progressHandlerCB = function(progress) {
+ this.updateProgressBar(progress);
+ var currentOpacity = this.previewImg.style.opacity;
+ this.previewImg.style.opacity = Math.max(currentOpacity, progress);
+};
// Methods about preview queue.
DDImageUploader.prototype.previewQueuePush = function(slide) {