Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
clean UI
Browse files Browse the repository at this point in the history
  • Loading branch information
diamant3 committed May 29, 2024
1 parent 6f89dca commit 6904e2d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
24 changes: 22 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<html lang="en">
<head>
<title>Handwriting AI</title>
<title>llg - handwriting detection</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<style>
Expand All @@ -12,19 +12,39 @@
background-color: 0x111111;
overflow: hidden;
}

#panel {
width: 20%;
height: 100%;
background-color: #049be3;
text-align: center;
position: fixed;
top: 0;
padding-top: 20px;
left: 0;
}

#container {
right: 0;
position: fixed;
width: 80%;
}
</style>
</head>

<body>
<div id="panel">
<h1>Little Letter Game</h1>
<h3>Tool:</h3>
<select id="tool">
<option value="brush">Brush</option>
<option value="eraser">Eraser</option>
</select>

<h3>OCR Result:</h3>
<textarea readonly id="result">
<textarea rows="5" readonly id="result">
</textarea>
</div>

<div id="container"></div>
</body>
Expand Down
4 changes: 2 additions & 2 deletions scripts/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Konva from "konva";
import { createWorker } from "tesseract.js";

const width = window.innerWidth;
const height = window.innerHeight - 25;
const height = window.innerHeight;

const stage = new Konva.Stage({
container: 'container',
Expand All @@ -23,7 +23,7 @@ stage.on('mousedown touchstart', function (e) {
let pos = stage.getPointerPosition();
lastLine = new Konva.Line({
stroke: '#000000',
strokeWidth: 10,
strokeWidth: 12,
globalCompositeOperation: mode === 'brush' ? 'source-over' : 'destination-out',
lineCap: 'round',
lineJoin: 'round',
Expand Down

0 comments on commit 6904e2d

Please sign in to comment.