HanSolo / SteelSeries-Canvas

The HTML5 Canvas port of the SteelSeries component library. Mainly contains gauges.
120 stars 76 forks source link

Added getCanvasContext utility function that allows specifying the host ... #9

Closed BrandonLWhite closed 10 years ago

BrandonLWhite commented 10 years ago

...element as either a textual ID or DOM element object. Replaced all getElementById calls with this function.

This resolves issue #8.

You can now create gauges on elements without having to use HTML IDs. This will allow me to create Knockout databindings for the gauges (forthcoming).

NOTE: This commit does not contain the minified version, because I could not deduce which minifier you guys are using. All of my attempts produced a min version that was much larger than the current. If you could please specify the minifier and args you are using in the README then I'd be happy to handle that too.

BrandonLWhite commented 10 years ago

I ran the Closure compiler with "ccjs steelseries.js --compilation_level=SIMPLE_OPTIMIZATIONS > steelseries-min.js" and got very similar file size as what you guys have, and it seems to function correctly. Is Closure the right minifier?

mcrossley commented 10 years ago

Hi Brandon, that seems like a sensible addition to me, I don't have a problem merging it.

I use the Microsoft Ajax Minifier to produce my minifications: http://ajaxmin.codeplex.com/ but Closure Compiler is fine.