Refactor canvas element references to use consistent ID for workspace
This commit is contained in:
@@ -89,7 +89,7 @@ export default function Dropped3dWidgets() {
|
||||
if (widgetSubOption === "Floating" || widgetSubOption === "2D") return;
|
||||
if (selectedZone.zoneName === "") return;
|
||||
|
||||
const canvasElement = document.getElementById("real-time-vis-canvas");
|
||||
const canvasElement = document.getElementById("work-space-three-d-canvas");
|
||||
|
||||
if (!canvasElement) return;
|
||||
|
||||
@@ -601,7 +601,7 @@ export default function Dropped3dWidgets() {
|
||||
const handleRightClick3d = (event: React.MouseEvent, id: string) => {
|
||||
event.preventDefault();
|
||||
|
||||
const canvasElement = document.getElementById("real-time-vis-canvas");
|
||||
const canvasElement = document.getElementById("work-space-three-d-canvas");
|
||||
if (!canvasElement) throw new Error("Canvas element not found");
|
||||
|
||||
const canvasRect = canvasElement.getBoundingClientRect();
|
||||
@@ -654,7 +654,7 @@ export default function Dropped3dWidgets() {
|
||||
setSelectedChartId({ id: id, type: type })
|
||||
event.preventDefault();
|
||||
const canvasElement = document.getElementById(
|
||||
"real-time-vis-canvas"
|
||||
"work-space-three-d-canvas"
|
||||
);
|
||||
if (!canvasElement) throw new Error("Canvas element not found");
|
||||
const canvasRect = canvasElement.getBoundingClientRect();
|
||||
|
||||
Reference in New Issue
Block a user