diff --git a/fableous-fe/src/components/canvas/Canvas.tsx b/fableous-fe/src/components/canvas/Canvas.tsx index 7ad8b570..c1595df5 100644 --- a/fableous-fe/src/components/canvas/Canvas.tsx +++ b/fableous-fe/src/components/canvas/Canvas.tsx @@ -22,7 +22,7 @@ import { scaleUpXY, translateXY, } from "./helpers"; -import { ASPECT_RATIO, SCALE, SELECT_PADDING } from "./constants"; +import { SCALE, SELECT_PADDING } from "./constants"; import { Cursor } from "./CursorScreen"; import { ImperativeCanvasRef, TextShape, TextShapeMap } from "./data"; import { ControllerRole, ToolMode, WSMessageType } from "../../constant"; @@ -911,7 +911,9 @@ const Canvas = forwardRef( className="relative place-self-center" style={{ width: offsetWidth, - height: offsetWidth * ASPECT_RATIO, + // -1 so height can shrink + height: offsetHeight - 1, + maxHeight: "100%", }} > ( showKeyboard(true); }} style={{ - width: offsetWidth, - height: offsetHeight, + position: "absolute", + width: "100%", + height: "100%", borderRadius: "24px", // allows onPointerMove to be fired continuously on touch, // else will be treated as pan gesture leading to short strokes diff --git a/fableous-fe/src/components/canvas/CursorScreen.tsx b/fableous-fe/src/components/canvas/CursorScreen.tsx index 1988e8cd..d5c3dc9d 100644 --- a/fableous-fe/src/components/canvas/CursorScreen.tsx +++ b/fableous-fe/src/components/canvas/CursorScreen.tsx @@ -4,7 +4,7 @@ /* eslint-disable no-case-declarations */ import { useEffect, useRef } from "react"; import { scaleUpXY } from "./helpers"; -import { ASPECT_RATIO, SCALE } from "./constants"; +import { SCALE } from "./constants"; import { ToolMode } from "../../constant"; export interface Cursor { @@ -110,18 +110,21 @@ const CursorScreen = (props: CursorScreenProps) => { return (
diff --git a/fableous-fe/src/containers/HubCanvasPage.tsx b/fableous-fe/src/containers/HubCanvasPage.tsx index 36c8e54a..7efa3da6 100644 --- a/fableous-fe/src/containers/HubCanvasPage.tsx +++ b/fableous-fe/src/containers/HubCanvasPage.tsx @@ -698,7 +698,7 @@ export default function HubCanvasPage() {