Fix structure click selection error
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 37s
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 37s
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -613,9 +613,9 @@
|
|||||||
}
|
}
|
||||||
let boxCoords = []
|
let boxCoords = []
|
||||||
this.resultData.detections.forEach(d => {
|
this.resultData.detections.forEach(d => {
|
||||||
if (d.aboveThreshold && d.isSearched && !d.isDeleted) {
|
let cvsBox = d.box.getBoxes('point',this.imageView,this.$refs.image_cvs)[1]
|
||||||
boxCoords.push(d.box.getBoxes('point',this.imageView,this.$refs.image_cvs)[1])
|
cvsBox.clickable = d.aboveThreshold && d.isSearched && !d.isDeleted
|
||||||
}
|
boxCoords.push(cvsBox)
|
||||||
})
|
})
|
||||||
const numBoxes = boxCoords.length
|
const numBoxes = boxCoords.length
|
||||||
let clickX = (e.offsetX - this.canvasOffset.x) / this.canvasZoom
|
let clickX = (e.offsetX - this.canvasOffset.x) / this.canvasZoom
|
||||||
@@ -625,7 +625,8 @@
|
|||||||
const findBox = boxCoords.findIndex( (r, i) => {
|
const findBox = boxCoords.findIndex( (r, i) => {
|
||||||
let di = loopIndex(i)
|
let di = loopIndex(i)
|
||||||
if (di == this.selectedChip ) return false
|
if (di == this.selectedChip ) return false
|
||||||
return r.left <= clickX &&
|
return r.clickable &&
|
||||||
|
r.left <= clickX &&
|
||||||
r.right >= clickX &&
|
r.right >= clickX &&
|
||||||
r.top <= clickY &&
|
r.top <= clickY &&
|
||||||
r.bottom >= clickY
|
r.bottom >= clickY
|
||||||
|
|||||||
Reference in New Issue
Block a user