Skip to content
Snippets Groups Projects
Verified Commit b9ce2b2c authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

feat: new fullscreen mode

parent 549c8afd
No related branches found
No related tags found
1 merge request!9Version 0.4.0 🍾
Pipeline #1360 passed
......@@ -22,6 +22,7 @@ type DisplayOptions = {
type DisplayProps = {
options?: DisplayOptions;
size?: string;
fullscreen?: boolean,
style?: string[];
onDrawHandler?: (caller: DrawHandler) => void;
};
......@@ -37,6 +38,7 @@ type CanvasContents = {
export const Display: FC<DisplayProps> = ({
options = { width: 320, height: 288, logicWidth: 160, logicHeight: 144 },
size = "small",
fullscreen = false,
style = [],
onDrawHandler
}) => {
......@@ -49,7 +51,7 @@ export const Display: FC<DisplayProps> = ({
}
let canvasContents: CanvasContents | null = null;
const classes = () => ["display", size, ...style].join(" ");
const classes = () => ["display", fullscreen ? "fullscreen" : null, size, ...style].join(" ");
const canvasRef = useRef<HTMLCanvasElement>(null);
......@@ -72,7 +74,7 @@ export const Display: FC<DisplayProps> = ({
return (
<div id="display" className={classes()}>
<span id="display-close" className="magnify-button canvas-close">
<span id="display-close" className="magnify-button display-close">
<img
className="large"
src={require("./minimise.svg")}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment