wangxiaoshuang 2024-03-26 17:58:41 +08:00
commit bbcb092f3e
1 changed files with 24 additions and 6 deletions

View File

@ -1978,7 +1978,8 @@ export default {
imageLocation(obj) {
return new Promise(resolve => {
console.log('imageLocation')
this.setToolToTarget()
obj.markTool = obj.markTool ? obj.markTool : 'CircleROI'
this.setToolToTarget(obj)
if (!obj.otherMeasureData) {
resolve()
return
@ -2005,14 +2006,31 @@ export default {
})
},
setToolToTarget(obj) {
if (this.activeTool) {
var toolGroupIds = [ctToolGroupId, ptToolGroupId, fusionToolGroupId]
var toolGroupIds = [ctToolGroupId, ptToolGroupId, fusionToolGroupId]
if (this.readingTaskState < 2 && obj.markTool && !obj.otherMeasureData) {
toolGroupIds.forEach((toolGroupId) => {
const toolGroup = ToolGroupManager.getToolGroup(toolGroupId)
toolGroup.setToolPassive(this.activeTool)
if (this.activeTool) {
toolGroup.setToolPassive(this.activeTool)
}
toolGroup.setToolActive(obj.markTool, {
bindings: [
{
mouseButton: MouseBindings.Primary // Left Click
}
]
})
})
this.activeTool = ''
this.activeTool = obj.markTool
} else {
if (this.activeTool === obj.markTool) {
toolGroupIds.forEach((toolGroupId) => {
const toolGroup = ToolGroupManager.getToolGroup(toolGroupId)
toolGroup.setToolPassive(this.activeTool)
})
this.activeTool = ''
}
}
this.isNonTargetMeasurement = false
},