Fix panel and computed property bugs (#65)
Moving panel to page element was resulting in opening errors after more than one page opened. viewedAll computer property was returning errors before result data was fetched. Signed-off-by: Justin Georgi <justin.georgi@gmail.com> Reviewed-on: Georgi_Lab/ALVINN_f7#65
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<f7-page name="detect" id="detect-page">
|
||||
<f7-page name="detect" :id="detectorName + '-detect-page'">
|
||||
<!-- Top Navbar -->
|
||||
<f7-navbar :sliding="false" back-link="true" back-link-url="/" back-link-force>
|
||||
<f7-nav-title sliding>{{ regions[activeRegion] }}</f7-nav-title>
|
||||
@@ -50,7 +50,7 @@
|
||||
<input type="file" ref="image_chooser" @change="getImage()" accept="image/*" capture="environment" style="display: none;"/>
|
||||
</f7-block>
|
||||
|
||||
<f7-panel :id="detectorName + '-settings'" right cover :backdrop="false" container-el="#detect-page">
|
||||
<f7-panel :id="detectorName + '-settings'" right cover :backdrop="false" :container-el="`#${detectorName}-detect-page`">
|
||||
<f7-page>
|
||||
<f7-navbar title="Detection Settings"></f7-navbar>
|
||||
<f7-list>
|
||||
@@ -376,9 +376,13 @@
|
||||
return this.showResults.filter( r => { return r.aboveThreshold && r.isSearched && !r.isDeleted }).length
|
||||
},
|
||||
viewedAll () {
|
||||
if (this.resultData && this.resultData.detections) {
|
||||
return this.resultData.detections
|
||||
.filter( s => { return s.confidence >= this.detectorLevel})
|
||||
.every( s => { return s.beenViewed })
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user