More dynamic Pins for text

Hi all,

I really prefer the look of the Pins to Labels, however at this point only a few letters can be in each pin before it becomes too hard to read. And increasing the size of the pin makes it too big and leaves too much empty space above and below the pin when more letters are added. I was wondering if there were plans to eventually make it so that pins that could hold more letters. If possible, one option could be to set the size of the pin in different horizontal and vertical directions.



Absolutely. I’ve wanted to do something similar ever since I wrote the initial pin support and just haven’t had the time. I think it would be easy to auto-grow the width of the pin to fit (and optionally grow the height as well). I just don’t have the bandwidth to do it right now.

If you’re interested in trying to add this feature we would definitely take a pull request for it, have a look at the createPin function in the PinBuilder code: The writeTextToCanvas call will actually return a canvas with a dimensions property that tells you how tall/wide it is. You would just need to then modify the pin draw code to use that width.

Also, if you decide to contribute, we would need a CLA, which you can email to us instructions: