(blob)
| 23 | } |
| 24 | |
| 25 | load(blob) { |
| 26 | // Reset before loading a new blob |
| 27 | this.reset(); |
| 28 | |
| 29 | if (!blob) return; |
| 30 | |
| 31 | this.blob = blob; |
| 32 | this.url = URL.createObjectURL(this.blob); |
| 33 | this.loading = true; |
| 34 | this.loaded = false; |
| 35 | this.fresh = false; |
| 36 | this.image.src = this.url; |
| 37 | } |
| 38 | |
| 39 | reset() { |
| 40 | this.loading = false; |