Skip to content

Commit 853c26c

Browse files
Desktop: Viewport bounds from viewport container (#2989)
* Remove build script because it created more issues that it solved * Get viewport bounds from viewport container
1 parent fd66f29 commit 853c26c

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

desktop/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

desktop/build.rs

Lines changed: 0 additions & 10 deletions
This file was deleted.

frontend/src/utility-functions/viewports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { type Editor } from "@graphite/editor";
22

33
export function updateBoundsOfViewports(editor: Editor, container: HTMLElement) {
4-
const viewports = Array.from(container.querySelectorAll("[data-viewport]"));
4+
const viewports = Array.from(container.querySelectorAll("[data-viewport-container]"));
55
const boundsOfViewports = viewports.map((canvas) => {
66
const bounds = canvas.getBoundingClientRect();
77
return [bounds.left, bounds.top, bounds.right, bounds.bottom];

0 commit comments

Comments
 (0)