This demonstrates how a tool can be improved to feel more SketchUp like by supporting optional press+drag+release drawing style, in addition to the normal click+move+click. This is a continuation of ...
Depending what you are trying to achieve, there is a method to get there easily. Just get all the code at once, and pull out what you need. Or follow along line by line, tutorial style. The end goal ...