Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] I added TrackballRotateTool, ZoomTool, PanTool when I was rendering 3D images using volume, and the image position was wrong when I switched tools #1631

Closed
woaihengniu opened this issue Nov 28, 2024 · 0 comments · Fixed by #1700
Assignees

Comments

@woaihengniu
Copy link

Describe the Bug

rendering 3D images using volume, Add TrackballRotateTool, ZoomTool, PanTool, I first activate Pan tool or zoom tool, move image or zoom image, after disabling pan tool or zoom tool, activate TrackballRotateTool, The position of the image is returned to the original rendering position and the state of panning or scaling is cleared

Steps to Reproduce

const addTolls = () => {
addTool(TrackballRotateTool);
toolGroup3d.addTool(TrackballRotateTool.toolName, {
configuration: { volumeId },
});
addTool(ZoomTool);
toolGroup3d.addTool(ZoomTool.toolName, {
configuration: { volumeId },
});
addTool(PanTool);
toolGroup3d.addTool(PanTool.toolName, {
configuration: { volumeId },
});
}

const activeTool = (index) => {
toolGroup3d.setToolDisabled(ZoomTool.toolName);
toolGroup3d.setToolDisabled(PanTool.toolName);
toolGroup3d.setToolDisabled(TrackballRotateTool.toolName);
if (isActiveBack.value == 0) {
toolGroup3d.setToolEnabled(TrackballRotateTool.toolName)
toolGroup3d.setToolActive(TrackballRotateTool.toolName, {
bindings: [
{
mouseButton: MouseBindings.Primary, // Left Click
},
],
});

}
if (isActiveBack.value == 1) {
    toolGroup3d.setToolEnabled(PanTool.toolName);
    toolGroup3d.setToolActive(PanTool.toolName, {
        bindings: [
            {
                mouseButton: MouseBindings.Primary, // right Click
            },
        ],
    });
}
if (isActiveBack.value == 2) {
    toolGroup3d.setToolEnabled(ZoomTool.toolName);
    toolGroup3d.setToolActive(ZoomTool.toolName, {
        bindings: [
            {
                mouseButton: MouseBindings.Primary, // right Click
            },
        ],
    });
}

}

The current behavior

The state of the image after panning or zooming is changed when using the TrackballRotateTool

The expected behavior

The state of the image does not change when you use the TrackballRotateTool after panning or zooming the image

OS

win10

Node version

v18.20.4

Browser

Microsoft Edge 128.0.2739.79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants