fix: update canvas element retrieval method in Scene component

This commit is contained in:
2025-06-21 09:22:06 +05:30
parent 78e57ab9fa
commit 695e3c08bb

View File

@@ -35,7 +35,8 @@ export default function Scene({ layout }: { readonly layout: 'Main Layout' | 'Co
getAllProjects(userId, organization)
.then((projects) => {
let project = projects.Projects.find((val: any) => val.projectUuid === projectId || val._id === projectId);
const canvas = document.getElementById("sceneCanvas")?.children[0]?.children[0];
const canvas = document.getElementById("sceneCanvas")?.getElementsByTagName('canvas')[0];
if (!canvas) return;
const screenshotDataUrl = (canvas as HTMLCanvasElement)?.toDataURL("image/png");
const updateProjects = {
projectId: project.projectUuid,