astashov / tixi

Ascii charts editor
http://textik.com
Eclipse Public License 1.0
428 stars 31 forks source link

Polyline tool #12

Open StreakyCobra opened 7 years ago

StreakyCobra commented 7 years ago

Currently it is possible to draw «Line», and «Rectangle-Line». A nice addition would be adding the possibility to do «Polyline».

For instance if I want to draw something like this arrow:

   +--------+
   |        |
   |        |
+-----+  +-----+
|  |  |  |  |  |
|  +  |  |  v  |
|     |  |     |
+-----+  +-----+

I would either need to use three lines, or one line and one rectangular line. It would be nice to draw arbitrary-length line by starting to draw a line, and then clicking to add intermediary points, until Enter is pressed for instance.

It would be like:

  2          3
   +--------+
   |        |
   |        |
+-----+  +-----+
|  |  |  |  |  |
| 1+  |  |  v4 |
|     |  |     |
+-----+  +-----+
  1. Click point 1
  2. Click point 2 (Or these two first steps may be replaced by dragging from point 1 to point 2)
  3. Click point 3
  4. Click point 4
  5. Press Enter

Feel free to close this issue if you don't like the idea, I just opened this to suggest some ideas for future enhancements if you look for such!

astashov commented 7 years ago

Makes sense. Though using of Enter probably will not be that obvious for users. Would be nice to have a way to do that without using a keyboard. Like, finishing the line with double-click, maybe?

StreakyCobra commented 7 years ago

Like, finishing the line with double-click, maybe?

This, or a right click, or another keypress. As long as it's explicited somewhere on the screen when the tool is used :-)

Now that I'm thinking about this, Would be nice to map ESC to exit this mode too, because it is the usual goto button to cancel an action!

astashov commented 7 years ago

Hmm, or Esc could just always cancel the currently creating shape, like you start drawing a line (or rectangle, or any shape), without releasing a mouse button you press Esc, and the line disappears. I think I saw such behavior in other editors as well.

astashov commented 7 years ago

Thanks for the feedback, btw, very interesting :)

StreakyCobra commented 7 years ago

or Esc could just always cancel the currently creating shape

Yes, it would even be better.

StreakyCobra commented 7 years ago

Thanks for the feedback, btw, very interesting :)

My pleasure, I know that we, open-source developers, appreciate feedbacks for improving our projects :-)