TagCanvas 2.9
Published
TagCanvas 2.9 adds a couple of new options, adds some extra ways to colour
the highlight and adds in missing support for the pulsate
option.
The cloud above demonstrates a couple of the new options added in this version.
First, when you move the pointer of a tag you will see the highlight outline is
displayed using “marching ants”. This is configured using the new
outlineDash
, outlineDashSpace
and
outlineDashSpeed
options. The first one sets the size of the dashes
in pixels, outlineDashSpace
allows you to set a different sized space
in between the dashes, and outlineDashSpeed
lets you specify how
fast the dashes move. The example cloud is using a dash size of 10 and a speed
of 4. The default speed is 1 (which is quite slow) and you can also use negative
values to make the dashes move in the opposite direction.
You may also have noticed that the highlight colour is not the same for all
the tags in the example cloud above. Version 2.9 of TagCanvas has three ways to
set the highlight colour for individual tags - the example is using the
outlineColour
option set to “tag”, which tells TagCanvas
to get the highlight colour from the text of the tag's <a>
links. It also supports a value of “tagbg” to use the background
colour from the links instead. The third option for setting the highlight colour
individually is to set the weightMode
to “outline”,
which colours the highlight using a weight gradient in the same way that the
“colour” weight mode sets the tag text colour according to its
weight.
The next new feature is also used by the example cloud, a new “magic” argument supported by the sphere and cylinder shapes that adjusts the way tags are distributed around the shape. This has come from the work Peter Petrov has done on his WordPress plugin where he has produced a vast array of extra shapes. The magic argument increases or decreases the angle between the tags, which is why the cloud above looks like a double helix instead of the tags being evenly distributed over the surface of a cylinder.
To use the magic option, you should pass it to the shape option in parentheses
following the shape name. The example is using shape: 'hcylinder(0.3)'
,
though the resulting effect depends on the number of tags in the cloud so you
should experiment to find a number that works for your cloud. You can put in
any numbers you like, but values between -1 and 1 are most likely to be useful.
You can blame Peter for naming the option “magic” – though to
be fair, I couldn't think of anything better to call it.
Click here to see what effect setting the magic number to 0.036 has on the cloud above.
Apart from these new options, I've also extended pulsating highlight support to the “colour” and “size” outline methods. The pulsate options had no effect on these outline modes before, but now they can transition between states too.
The new version is available from the TagCanvas page.