• David Schnur's avatar
    Replace drawText with add and remove methods. · a9a31644
    David Schnur authored
    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.
    a9a31644
Name
Last commit
Last update
examples Loading commit data...
.gitignore Loading commit data...
API.md Loading commit data...
CONTRIBUTING.md Loading commit data...
FAQ.md Loading commit data...
LICENSE.txt Loading commit data...
Makefile Loading commit data...
NEWS.md Loading commit data...
PLUGINS.md Loading commit data...
README.md Loading commit data...
component.json Loading commit data...
excanvas.js Loading commit data...
excanvas.min.js Loading commit data...
flot.jquery.json Loading commit data...
jquery.colorhelpers.js Loading commit data...
jquery.flot.canvas.js Loading commit data...
jquery.flot.categories.js Loading commit data...
jquery.flot.crosshair.js Loading commit data...
jquery.flot.errorbars.js Loading commit data...
jquery.flot.fillbetween.js Loading commit data...
jquery.flot.image.js Loading commit data...
jquery.flot.js Loading commit data...
jquery.flot.navigate.js Loading commit data...
jquery.flot.pie.js Loading commit data...
jquery.flot.resize.js Loading commit data...
jquery.flot.selection.js Loading commit data...
jquery.flot.stack.js Loading commit data...
jquery.flot.symbol.js Loading commit data...
jquery.flot.threshold.js Loading commit data...
jquery.flot.time.js Loading commit data...
jquery.js Loading commit data...