TagCanvas 2.7
Published
TagCanvas 2.7 adds a few simple options, cleans up the touchscreen controls and fixes a couple of little bugs. Here's an example cloud:
The first thing you are likely to notice about this cloud is the unusual shape - TagCanvas now supports using your own custom callback function to define the shape of the cloud. I added this because Peter Petrov has added a load of interesting shapes to his WordPress plugin and I wanted to make it easier to use other shapes without hardcoding them into the TagCanvas script. There is no new option for this, just provide the name of your function to the “shape” option. There is some documentation and another example on the TagCanvas shapes page.
The list of links used by TagCanvas to draw the cloud above only contains four links. Four tags would not show off the custom shape very well, which is where the new options come in handy. “minTags” and “repeatTags” repeat the list of links to create extra tags in the cloud. “repeatTags” repeats the list a specified number of times, while “minTags” specifies a minimum number of tags, repeating the list as many times as required to reach that number. The options are limited to prevent creating vast numbers of tags, but they should allow for some quite large clouds.
The example cloud also demonstrates a new option for adding an image in the centre of the cloud, “centreImage”. This was already possible to do using the “centreFunc” option, but that is a bit complicated to use and so this new option does all the hard work for you.
The new “pinchZoom” option is also enabled for the example cloud, but you will need to look at it using a touchscreen to try it out. In case you can't guess from the option name, it adds support for a two-finger pinch gesture to zoom the cloud in and out. I've also cleaned up the touch controls in this version to cope better with multiple fingers (or whatever appendages you touch your screen with) touching the screen at once.
There are a couple of very simple bug fixes in this version too, but they are really just for coping better when invalid options are specified so I won't go into the details.
The new version is available from the TagCanvas page.