nathanpeck / clui

Command Line UI toolkit for Node.js
MIT License
1.66k stars 40 forks source link

Corrected character count in gauge #11

Closed cactysman closed 7 years ago

cactysman commented 8 years ago

Corrected the count of the symbols in the filled portion of a gauge. The gauge could vary in width before the change.

Example: Basically if you set width to 20 and had a value of 10, it would draw 9 pipes and 10 dashes which would only generate 19 characters. When the bar was empty, it printed 20 dashes. This is how the character count varied.

See: http://i.imgur.com/oczwChV.png

artokun commented 7 years ago

Let me run some tests on this, thank you for your contribution

artokun commented 7 years ago

Thank you for your suggestion, I came up with something a little different but ultimately the same thing. It will be updated in the next publish.