diff --git a/css/editor.css b/css/editor.css
index f9b5ecb..d376623 100644
--- a/css/editor.css
+++ b/css/editor.css
@@ -23,7 +23,6 @@ body {
appearance: none;
border: none;
outline: none;
- resize: none;
max-width: 100%;
min-width: 15%;
color: var(--input-number);
@@ -34,7 +33,7 @@ body {
justify-content: center;
background: var(--history-accent-2);
height: 100%;
- /* cursor: ew-resize; */
+ cursor: ew-resize;
}
.output {
diff --git a/html/index.html b/html/index.html
index 00286ba..f8f6de9 100644
--- a/html/index.html
+++ b/html/index.html
@@ -28,7 +28,7 @@
contenteditable="plaintext-only"
spellcheck="false"
>
-
+
{
+ item.style.gridTemplateColumns = `${editorWidth} 5px ${outputWidth}`;
+ });
+ }
+}
+
+function updateWidthOfCalculator(editorWidth, outputWidth) {
+ calculator.style.gridTemplateColumns = `${editorWidth} 5px ${outputWidth}`;
+}
+
+function resize(e) {
+ const dx = e.clientX - startX;
+ const editorWidthAfter = `${editorWidthBefore + dx}px`;
+ const outputWidthAfter = `${outputWidthBefore - dx}px`;
+ updateWidthOfCalculator(editorWidthAfter, outputWidthAfter);
+ updateWidthOfHistory(editorWidthAfter, outputWidthAfter);
+}
+
+function stopResize() {
+ document.removeEventListener("mousemove", resize);
+ document.removeEventListener("mouseup", stopResize);
+}
+
export async function initSentry() {
Sentry.init({
dsn: "https://f6181e1f6794abaf08674441d2c08403@o4507406315159552.ingest.de.sentry.io/4507406320992336",