Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2026-04-28 15:08:49 +08:00
commit aaeadbc440
2 changed files with 33 additions and 10 deletions

View File

@ -2626,7 +2626,7 @@ export default {
toolGroup.setToolDisabled(FusionJumpToPointTool.toolName) toolGroup.setToolDisabled(FusionJumpToPointTool.toolName)
} }
}, },
dispatchFusionCenterPoint() { dispatchFusionCenterPoint(retryCount = 0) {
const renderingEngine = getRenderingEngine(renderingEngineId) const renderingEngine = getRenderingEngine(renderingEngineId)
if (!renderingEngine) return if (!renderingEngine) return
const toolGroup = ToolGroupManager.getToolGroup(this.fusionToolGroupId) const toolGroup = ToolGroupManager.getToolGroup(this.fusionToolGroupId)
@ -2652,6 +2652,11 @@ export default {
}) })
return return
} }
if (retryCount < 10) {
setTimeout(() => {
this.dispatchFusionCenterPoint(retryCount + 1)
}, 120)
}
}, },
setFusionMipRotateEnabled(enabled) { setFusionMipRotateEnabled(enabled) {
if (!this.isFusion) return if (!this.isFusion) return

View File

@ -194,9 +194,7 @@ class FusionJumpToPointTool extends AnnotationDisplayTool {
if (!viewport?.element) return false if (!viewport?.element) return false
const annotations = getAnnotations(this.getToolName(), viewport.element) || [] const annotations = getAnnotations(this.getToolName(), viewport.element) || []
const crosshairAnnotation = annotations.find((item) => const crosshairAnnotation = this._findViewportCrosshairAnnotationFromList(annotations, viewport.id)
item?.data?.type === 'fusion-jump-crosshair' && item?.data?.viewportId === viewport.id
)
if (!crosshairAnnotation) return false if (!crosshairAnnotation) return false
const worldPoint = crosshairAnnotation.data?.handles?.points?.[0] const worldPoint = crosshairAnnotation.data?.handles?.points?.[0]
@ -323,9 +321,20 @@ class FusionJumpToPointTool extends AnnotationDisplayTool {
_getViewportCrosshairAnnotation(viewport) { _getViewportCrosshairAnnotation(viewport) {
if (!viewport?.element) return null if (!viewport?.element) return null
const annotations = getAnnotations(this.getToolName(), viewport.element) || [] const annotations = getAnnotations(this.getToolName(), viewport.element) || []
return annotations.find((item) => return this._findViewportCrosshairAnnotationFromList(annotations, viewport.id)
item?.data?.type === 'fusion-jump-crosshair' && item?.data?.viewportId === viewport.id }
) || null
_findViewportCrosshairAnnotationFromList(annotations, viewportId) {
if (!Array.isArray(annotations) || !viewportId) return null
for (let i = 0; i < annotations.length; i++) {
const item = annotations[i]
const data = item && item.data
if (!data) continue
if (data.type === 'fusion-jump-crosshair' && data.viewportId === viewportId) {
return item
}
}
return null
} }
_tryStartDrag(evt) { _tryStartDrag(evt) {
@ -521,8 +530,13 @@ class FusionJumpToPointTool extends AnnotationDisplayTool {
_getReferenceLineColor(viewportId, fallbackColor) { _getReferenceLineColor(viewportId, fallbackColor) {
if (typeof this.configuration.getReferenceLineColor === 'function') { if (typeof this.configuration.getReferenceLineColor === 'function') {
const color = this.configuration.getReferenceLineColor(viewportId) try {
const safeViewportId = viewportId || ''
const color = this.configuration.getReferenceLineColor(safeViewportId)
if (color) return color if (color) return color
} catch (e) {
console.log(e)
}
} }
return fallbackColor || '#6fb9ff' return fallbackColor || '#6fb9ff'
} }
@ -538,7 +552,11 @@ class FusionJumpToPointTool extends AnnotationDisplayTool {
const centerHoleSize = Number.isFinite(appearance.centerHoleSize) ? appearance.centerHoleSize : 8 const centerHoleSize = Number.isFinite(appearance.centerHoleSize) ? appearance.centerHoleSize : 8
let color = appearance.color let color = appearance.color
if (!color && typeof this.configuration.getReferenceLineColor === 'function') { if (!color && typeof this.configuration.getReferenceLineColor === 'function') {
color = this.configuration.getReferenceLineColor(sourceViewportId) try {
color = this.configuration.getReferenceLineColor(sourceViewportId || '')
} catch (e) {
console.log(e)
}
} }
return { return {