diff --git a/src/App/AST.css b/src/App/AST.css index 9f571ba..f6782b2 100644 --- a/src/App/AST.css +++ b/src/App/AST.css @@ -26,6 +26,7 @@ details { padding-left: 2px; padding-right: 2px; background-color: rgb(230, 249, 255); + display: inline-block; } .activeState { @@ -36,6 +37,7 @@ details { margin-left: 4px; padding-left: 2px; padding-right: 2px; + display: inline-block; } hr { diff --git a/src/App/App.css b/src/App/App.css index c0d4301..8ad7d75 100644 --- a/src/App/App.css +++ b/src/App/App.css @@ -86,5 +86,3 @@ button.active { max-height: 100vh; overflow: auto; } - - diff --git a/src/App/App.tsx b/src/App/App.tsx index 042910d..58007a5 100644 --- a/src/App/App.tsx +++ b/src/App/App.tsx @@ -192,8 +192,9 @@ export function App() { borderLeft: 1, borderColor: "divider", flex: '0 0 content', - overflow: "auto", - maxWidth: '30vw', + overflowY: "auto", + overflowX: "visible", + maxWidth: 'min(300px, 30vw)', }}> diff --git a/src/App/TopPanel.tsx b/src/App/TopPanel.tsx index 9ec6eb1..16464eb 100644 --- a/src/App/TopPanel.tsx +++ b/src/App/TopPanel.tsx @@ -199,134 +199,128 @@ export function TopPanel({rt, rtIdx, time, setTime, onInit, onClear, onRaise, on onTimeScaleChange((timescale*2).toString(), Math.round(performance.now())); } - return <> -
- {/* shortcuts / about */} -
- ~}> - - - -
+ return
+ {/* shortcuts / about */} +
+ ~}> + + +   +
- {/* undo / redo */} -
- Ctrl+Z}> - - - Ctrl+Shift+Z}> - - -
+ {/* undo / redo */} +
+ Ctrl+Z}> + + + Ctrl+Shift+Z}> + +   +
- {/* insert rountangle / arrow / ... */} -
- {([ - ["and", "AND-states", , A], - ["or", "OR-states", , O], - ["pseudo", "pseudo-states", , P], - ["shallow", "shallow history", , H], - ["deep", "deep history", , <>], - ["transition", "transitions", , T], - ["text", "text", <> T , X], - ] as [InsertMode, string, ReactElement, ReactElement][]).map(([m, hint, buttonTxt, keyInfo]) => - - )} -
- + {/* insert rountangle / arrow / ... */} +
+ {([ + ["and", "AND-states", , A], + ["or", "OR-states", , O], + ["pseudo", "pseudo-states", , P], + ["shallow", "shallow history", , H], + ["deep", "deep history", , <>], + ["transition", "transitions", , T], + ["text", "text", <> T , X], + ] as [InsertMode, string, ReactElement, ReactElement][]).map(([m, hint, buttonTxt, keyInfo]) => + + )}   +
- {/* execution */} -
- - {/* init / clear / pause / real time */} -
- I}> - - - C}> - - -   - Space toggles}> - - - -
- -   - - {/* speed */} -
-   - S}> - - - onTimeScaleChange(e.target.value, Math.round(performance.now()))}/> - F}> - - -
- -   - - {/* time, next */} -
-
-   - -   -
-
-   - - Tab}> - - -
-
- - -
- + {/* execution */}
- {ast.inputEvents && - <> - {ast.inputEvents.map(({event, paramName}) => - <> - {paramName && <>} -  )} - - } + {/* init / clear / pause / real time */} +
+ I}> + + + C}> + + +   + Space toggles}> + + + +   +
+ {/* speed */} +
+   + S}> + + + onTimeScaleChange(e.target.value, Math.round(performance.now()))}/> + F}> + + +   +
+ + {/* time, next */} +
+
+   + +
+   +
+   + + Tab}> + + +   +
+
-
- ; + + {/* input events */} +
+ {ast.inputEvents && + <> + {ast.inputEvents.map(({event, paramName}) => +
+ {paramName && <>} +  
)} + + } +
+ +
; }