Renamed the 'canvas' variable to 'surface'.

Renaming the variable gives us room to create a new class called Canvas.
Abstract-out canvas creation into an object.

Moved canvas creation and size management into a new Canvas class.

This is the first step towards a more object-oriented architecture.
Since we create multiple canvases, and have to maintain several
module-global variables to track their properties, they are the ideal
place to start.

This commit also removes sizing code that was duplicated between
makeCanvas and resizeCanvas.
Added a basic frame for the canvas-drawing plugin.
Added methods to draw and measure text.

These methods provide a common way to draw HTML text above a canvas.

The getTextInfo method generates div HTML for text with a given font
style/class and angle, measures the element's dimensions, and saves
everything in a cache.  The drawText method takes the resulting entry,
finishes generating the inline styles necessary to position the div, and
adds the result to a buffer.  The render method dumps the buffer into an
overlay and expires unused cache entries.
Provide a way for plugins to override classes.
Moved canvas tick rendering into a plugin.

The base implementation uses the new drawText and getTextInfo methods to
draw text in HTML.  Canvas rendering has been moved to overrides of
these methods within the canvas-render plugin.
Replace axis.font with options.font.

Instead of giving the axis its own font property, we simply look at its
options, where the font comes from in the first place.  A separate
property is unnecessary and inconsistent with the way other axis options
are handled.
Fixed missing/superfluous semicolons.
Preserve canvas elements on re-plot.

Since the Canvas .text object is jQuery-wrapped, it was not preserved as
expected when clearing the canvas of junk.  I've replaced the selection
with one based on element classes.
Merge pull request #961 from brianpeiris/master

Add basic Travis CI setup with test script that runs JSHint.
Cache actual elements instead of buffering HTML.

This significantly improves performance, since we already create the
elements when measuring them, and that effort is now no longer wasted.
We must take care to detach, rather than remove, when clearing the text
layer, so we can add the elements back later if necessary.
Move cached hasOwnProperty to the top level.
fix example (syntax error and indenting)
Merge pull request #966 from bor/fix/PLUGINS_example

Fix example (syntax error and indenting).
Simplify creation of the cached element.
Fixed inline event.drag's use of $.event.handle.

This resolves issue #964.
Updated credits for #964 navigate event.drag fix.
Replace drawText with add and remove methods.

Every cache element now contains the actual text element instead of just
its HTML, plus a flag indicating whether it is visible.  The addText and
removeText methods control the state of this flag, and the render method
uses it to manage elements within the text container.  So where we
previously used drawText to actually render text, now we add each string
once, then let the render method take care of drawing them as necessary.

This dramatically improves performance by eliminating the need to clear
and re-populate HTML text on every drawing cycle.  Since the elements
are now static between add/remove calls, this also allows users to add
interactivity, as they could in 0.7.  Finally, it eliminates the need
for a separate 'hot' cache.

I also removed the unnecessary 'dimensions' object; it's easier and
faster to store the width and height at the top level of the info
object.
Reverse cache key order to ensure uniqueness.

Also switch from dashes to pipes, and remove the angle for now, since we
don't currently support rotated text.
Factor out text layer creation to its own method.

This sets the stage for allowing the use of multiple layers.