From 4054e03100377dfee0ba0c9d2001ea79c9b6d4f4 Mon Sep 17 00:00:00 2001 From: Timon Schelling Date: Mon, 4 Aug 2025 00:36:24 +0000 Subject: [PATCH 1/2] Remove build script because it created more issues that it solved --- desktop/.gitignore | 3 --- desktop/build.rs | 10 ---------- 2 files changed, 13 deletions(-) delete mode 100644 desktop/.gitignore delete mode 100644 desktop/build.rs diff --git a/desktop/.gitignore b/desktop/.gitignore deleted file mode 100644 index aba21e242c..0000000000 --- a/desktop/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Generated by Cargo -# will have compiled files and executables -/target/ diff --git a/desktop/build.rs b/desktop/build.rs deleted file mode 100644 index 6602dee825..0000000000 --- a/desktop/build.rs +++ /dev/null @@ -1,10 +0,0 @@ -use std::fs::metadata; - -fn main() { - let frontend_dir = format!("{}/../frontend/dist", env!("CARGO_MANIFEST_DIR")); - metadata(&frontend_dir).expect("Failed to find frontend directory. Please build the frontend first."); - metadata(format!("{}/index.html", &frontend_dir)).expect("Failed to find index.html in frontend directory."); - - println!("cargo:rerun-if-changed=."); - println!("cargo:rerun-if-changed=../frontend/dist"); -} From a7ae975c24e3dbb5802299695beec3c25216292d Mon Sep 17 00:00:00 2001 From: Timon Schelling Date: Mon, 4 Aug 2025 09:30:17 +0000 Subject: [PATCH 2/2] Get viewport bounds from viewport container --- frontend/src/utility-functions/viewports.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/utility-functions/viewports.ts b/frontend/src/utility-functions/viewports.ts index edf412655a..2653680888 100644 --- a/frontend/src/utility-functions/viewports.ts +++ b/frontend/src/utility-functions/viewports.ts @@ -1,7 +1,7 @@ import { type Editor } from "@graphite/editor"; export function updateBoundsOfViewports(editor: Editor, container: HTMLElement) { - const viewports = Array.from(container.querySelectorAll("[data-viewport]")); + const viewports = Array.from(container.querySelectorAll("[data-viewport-container]")); const boundsOfViewports = viewports.map((canvas) => { const bounds = canvas.getBoundingClientRect(); return [bounds.left, bounds.top, bounds.right, bounds.bottom];