zxcalc / quantomatic

Quantomatic is a tool for doing automated graph rewriting.
http://quantomatic.github.io
151 stars 22 forks source link

Freehand draw nodes #216

Closed akissinger closed 5 years ago

akissinger commented 6 years ago

It would be nice if clicking on a spot (or more specifically, mouseup at the same or close location to mousedown) with the Freehand tool would create a node of the currently selected type. Combine this with a fast way to change the current type (e.g. keyboard shortcuts) and you would be able to make diagrams really quickly.

(@hmillerbakewell: I seem to recall it used to have this behaviour. Is this a regression, or did you decide to remove it for some reason?)

hmillerbakewell commented 6 years ago

New shortcuts: "v" selects the Add Vertex tool. If you have the "Add Vertex" tool already selected then it will cycle through the available vertex types. "e" does the same for edges and the Add Edge tool. "d" toggles the "directed" checkbox, but only if the Add Edge tool is selected.

Some of this functionality used to be there, but it was inconsistent so I removed it. This iteration seems to be stable.

With the Freehand Tool: Clicking any vertex (inlcuding a wire vertex) cycles the type, so you can click through the options that way.