Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/utils/ExportCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ const ExportCanvas = ({show}:{show: boolean}) => {
}
SetCamera(true);
if (animate){
usePlotStore.setState({animate:false}) // Disable animation if currently active
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While disabling the plot animation during export is necessary to prevent conflicts with the manual frame-stepping logic, the original state of animate should be captured and restored once the export process completes.

Currently, if a user has animation enabled in the UI, it will remain disabled after the export finishes. This should be handled similarly to how quality (line 252/487) and DPR (line 253/488) are managed: capture the original value at the start of the useEffect and restore it in both the Animate().then() block and the static export else block.

Suggested change
usePlotStore.setState({animate:false}) // Disable animation if currently active
usePlotStore.setState({ animate: false }) // Disable animation if currently active

const {keyFrames} = useImageExportStore.getState()
const keyFrameList = keyFrames ? Array.from(keyFrames.keys()).sort((a, b) => a - b) : null;
async function Animate(){
Expand Down
Loading