caiyiling 2026-05-25 13:17:04 +08:00
parent d6713ba9a4
commit 65d7a95d5f
1 changed files with 20 additions and 17 deletions

View File

@ -92,7 +92,10 @@
@click.stop
@contextmenu.prevent
>
<div class="annotation-context-menu__item" @click.stop="copyCircleAnnotation()">复制</div>
<div class="annotation-context-menu__item" @click.stop="copyCircleAnnotation()">
<!-- 复制 -->
{{ $t('trials:reading:menu:copy') }}
</div>
</div>
</div>
</template>
@ -262,25 +265,25 @@ export default {
e.preventDefault()
e.stopPropagation()
// const annotation = this.getCircleAnnotationFromContextMenuEvent(e)
// if (!annotation) {
// this.hideAnnotationContextMenu()
// return false
// }
const annotation = this.getCircleAnnotationFromContextMenuEvent(e)
if (!annotation) {
this.hideAnnotationContextMenu()
return false
}
// if (cornerstoneTools.annotation.locking.isAnnotationLocked(annotation.annotationUID)) {
// this.hideAnnotationContextMenu()
// return false
// }
if (cornerstoneTools.annotation.locking.isAnnotationLocked(annotation.annotationUID)) {
this.hideAnnotationContextMenu()
return false
}
// this.$emit('activeViewport', this.viewportIndex)
this.$emit('activeViewport', this.viewportIndex)
// const { x, y } = this.getContextMenuPosition(e)
// this.annotationContextMenu.visible = true
// this.annotationContextMenu.x = x
// this.annotationContextMenu.y = y
// this.annotationContextMenu.annotation = annotation
// return false
const { x, y } = this.getContextMenuPosition(e)
this.annotationContextMenu.visible = true
this.annotationContextMenu.x = x
this.annotationContextMenu.y = y
this.annotationContextMenu.annotation = annotation
return false
},
getContextMenuPosition(e) {
const rect = this.element?.getBoundingClientRect?.()