+
+ Ctrl+Z>}>
+
+
+ Ctrl+Shift+Z>}>
+
+
+
+
+
+
+
{([
["and", "AND-states", , A],
["or", "OR-states", , O],
@@ -205,7 +222,6 @@ export function TopPanel({rt, time, setTime, onInit, onClear, onRaise, ast, mode
className={mode===m ? "active":""}
onClick={() => setMode(m)}
>{buttonTxt})}
-
@@ -221,7 +237,7 @@ export function TopPanel({rt, time, setTime, onInit, onClear, onRaise, ast, mode
-
Space}>
+ Space toggles>}>
@@ -253,6 +269,12 @@ export function TopPanel({rt, time, setTime, onInit, onClear, onRaise, ast, mode
+
+
Backspace}>
+
+
+
@@ -291,7 +313,7 @@ export function TopPanel({rt, time, setTime, onInit, onClear, onRaise, ast, mode
~}>
setShowKeys(e.target.checked)}>
-
+
diff --git a/src/VisualEditor/VisualEditor.css b/src/VisualEditor/VisualEditor.css
index f9d982e..619125a 100644
--- a/src/VisualEditor/VisualEditor.css
+++ b/src/VisualEditor/VisualEditor.css
@@ -39,19 +39,12 @@
/* fill: rgba(0, 0, 255, 0.2); */
}
.rountangle.error {
- stroke: rgb(230,0,0);
+ stroke: var(--error-color);
}
.rountangle.active {
- /* fill: rgb(255, 140, 0); */
- /* fill-opacity: 0.2; */
- /* stroke: rgb(100, 149, 237); */
- /* stroke: */
stroke: rgb(192, 125, 0);
fill:rgb(255, 251, 244);
- /* fill: lightgrey; */
- /* color: white; */
- filter: drop-shadow( 0px 0px 3px rgba(192, 125, 0, 0.856));
- /* stroke-width: 3px; */
+ filter: drop-shadow( 0px 0px 3px rgba(192, 125, 0, 0.85));
}
.selected:hover:not(:active) {
@@ -166,7 +159,7 @@ text.helper:hover {
}
.arrow.error {
- stroke: rgb(230,0,0);
+ stroke: var(--error-color);
}
.arrow.fired {
stroke: rgb(192, 125, 0);
@@ -174,7 +167,7 @@ text.helper:hover {
}
text.error, tspan.error {
- fill: rgb(230,0,0);
+ fill: var(--error-color);
font-weight: 600;
}
diff --git a/src/VisualEditor/VisualEditor.tsx b/src/VisualEditor/VisualEditor.tsx
index d5d6c80..3f657dc 100644
--- a/src/VisualEditor/VisualEditor.tsx
+++ b/src/VisualEditor/VisualEditor.tsx
@@ -314,7 +314,8 @@ export function VisualEditor({ast, setAST, rt, errors, setErrors, mode, highligh
const onMouseMove = (e: {pageX: number, pageY: number}) => {
const currentPointer = getCurrentPointer(e);
if (dragging) {
- const pointerDelta = subtractV2D(currentPointer, dragging.lastMousePos);
+ // const pointerDelta = subtractV2D(currentPointer, dragging.lastMousePos);
+ const pointerDelta = {x: e.movementX, y: e.movementY};
setState(state => ({
...state,
rountangles: state.rountangles.map(r => {
diff --git a/src/index.css b/src/index.css
index c54e9a7..cf0a025 100644
--- a/src/index.css
+++ b/src/index.css
@@ -4,6 +4,11 @@ html, body {
font-family: Roboto, sans-serif;
}
+body {
+ /* --error-color: darkred; */
+ --error-color: rgb(163, 0, 0);
+}
+
div#root {
height: 100%;
}
@@ -18,7 +23,7 @@ kbd {
border: 0.8px solid #aaa;
border-radius: 4px;
background: linear-gradient(#ebebeb, #fff);
- box-shadow: inset 0 -2px 0 #aaa;
+ box-shadow: inset 0 -1.5px 0 #aaa;
vertical-align: middle;
user-select: none;
}
@@ -38,4 +43,4 @@ input {
label {
user-select: none;
-}
\ No newline at end of file
+}