Fix cordova file load regression (#53)
Closes: #52 Signed-off-by: Justin Georgi <justin.georgi@gmail.com> Reviewed-on: Georgi_Lab/ALVINN_f7#53
This commit is contained in:
@@ -238,6 +238,7 @@
|
||||
imageRegion: '',
|
||||
imageLoaded: false,
|
||||
imageView: '',
|
||||
imageLoadMode: "environment",
|
||||
detectorName: '',
|
||||
detectorLevel: 50,
|
||||
detectorLabels: [],
|
||||
@@ -357,6 +358,7 @@
|
||||
}
|
||||
},
|
||||
selectImage (mode) {
|
||||
this.imageLoadMode = mode
|
||||
if (mode == "camera") {
|
||||
this.$refs.image_chooser.setAttribute("capture","environment")
|
||||
} else {
|
||||
@@ -407,7 +409,7 @@
|
||||
getImage (searchImage) {
|
||||
var self = this
|
||||
let loadImage =new Promise(resolve => {
|
||||
if (this.isCordova) {
|
||||
if (this.isCordova && this.imageLoadMode == "camera") {
|
||||
this.imageView = 'data:image/jpg;base64,' + searchImage
|
||||
} else {
|
||||
const searchImage = this.$refs.image_chooser.files[0]
|
||||
|
||||
Reference in New Issue
Block a user