diff --git a/src/App/About.tsx b/src/App/About.tsx index 61c1f51..9241f53 100644 --- a/src/App/About.tsx +++ b/src/App/About.tsx @@ -1,10 +1,19 @@ import logo from "../../artwork/logo.svg"; export function About() { - return
+ return

-

StateBuddy is an open source tool for Statechart editing, simulation, debugging and testing environment, inspired by CouchEdit.

-

It was originally created for teaching Statecharts to university students, but likely is a useful tool for other purposes as well.

-

Commercial use: e‑mail me for permission.

+ +

StateBuddy is an open source tool for Statechart editing, simulation, (omniscient) debugging and testing.

+ +

It was originally created for teaching Statecharts to university students.

+ +

The main novelty is in the way you deal with the visual concrete syntax: You just draw boxes, arrows and text. Connectedness or insideness are continuously figured out by a parser, but they do not influence what you can do with the shapes, which IMO is much more intuitive than editors that try to "help" you. This idea comes from CouchEdit, which was in turn influenced by the very old tool StateMate.

+ +

Unique to StateBuddy is that sides of boxes, and endpoints of arrows can be independently selected for many boxes/arrows simultaneously, making editing even more powerful while remaining highly intuitive to both novice and expert users.

+ +

No commercial use without my written permission.

+ +

Contact: joeri.exelmans@gmail.com

; } diff --git a/src/App/App.css b/src/App/App.css index 3bdf30a..e040401 100644 --- a/src/App/App.css +++ b/src/App/App.css @@ -58,3 +58,22 @@ button.active { background-color: rgba(0,0,255,0.2); color: black; } + +.modalInner { + position: relative; + top: 50%; + transform: translateY(-50%); + text-align: center; + display: inline-block; + background-color: white; +} + +.modalOuter { + width: 100%; + height: 100%; + position:absolute; + text-align: center; + background-color: rgba(200,200,200,0.7); + /* backdrop-filter: blur(2px) */ +} + diff --git a/src/App/App.tsx b/src/App/App.tsx index 282fd09..c61ac88 100644 --- a/src/App/App.tsx +++ b/src/App/App.tsx @@ -149,10 +149,9 @@ export function App() { return <> {/* Modal dialog */} {modal &&
setModal(null)} - style={{width: '100%', height: '100%', position:'absolute', textAlign: 'center', backgroundColor: 'rgba(127,127,127,0.5)' }}> -
+ className="modalOuter" + onMouseDown={() => setModal(null)}> +
e.stopPropagation()}> {modal} diff --git a/src/App/TextDialog.tsx b/src/App/TextDialog.tsx index 4dfd45c..132aadd 100644 --- a/src/App/TextDialog.tsx +++ b/src/App/TextDialog.tsx @@ -1,6 +1,6 @@ import { Dispatch, ReactElement, SetStateAction, useState } from "react"; -import { parse as parseLabel, SyntaxError } from "../statecharts/label_parser"; +import { parse as parseLabel } from "../statecharts/label_parser"; export function TextDialog(props: {setModal: Dispatch>, text: string, done: (newText: string|undefined) => void}) { const [text, setText] = useState(props.text); @@ -26,12 +26,12 @@ export function TextDialog(props: {setModal: Dispatch - Edit text label:
+ return
+ Text label:

{error}
-

Enter to confirm. Escape to cancel. +

Enter to confirm. Esc to cancel.

(Tip: Shift+Enter to insert newline.)
;