Your last update was empty, I bet that wasn't intentional.
(btw, patch set 1 seems to have vanished making it harder to do patch to
patch diffs).
http://codereview.appspot.com/67158/diff/3001/4001
File trunk/excanvas.js (right):
http://codereview.appspot.com/67158/diff/3001/4001#newcode261
Line 261: aliceblue: '#F0F8FF',
In the interest of saving a few bytes, how about removing the leading
hash symbol from the color codes?
http://codereview.appspot.com/67158/diff/3001/4001#newcode477
Line 477: str = colorData[styleString] || styleString;
...and then changing this line to read
str = '#' + colorData[styleString] || styleString;
http://codereview.appspot.com/67158/diff/3001/4001
File trunk/excanvas.js (right):
http://codereview.appspot.com/67158/diff/3001/4001#newcode261
Line 261: aliceblue: '#F0F8FF',
On 2009/06/23 01:52:35, eae wrote:
> In the interest of saving a few bytes, how about removing the leading
hash
> symbol from the color codes?
With gzip this will not matter. If we add a string concat every time we
want to get a value it will add two object allocations.
http://codereview.appspot.com/67158/diff/3001/4001#newcode477
Line 477: str = colorData[styleString] || styleString;
On 2009/06/23 01:52:35, eae wrote:
> ...and then changing this line to read
> str = '#' + colorData[styleString] || styleString;
That would be
str = styleString in colorData ? '#' + colorData[styleString] :
styleString;
You've got me convinced, let's go for readable.