diff --git a/src/dom/DomElement.js b/src/dom/DomElement.js index d340b526..035f6cab 100644 --- a/src/dom/DomElement.js +++ b/src/dom/DomElement.js @@ -84,14 +84,14 @@ var DomElement = new function() { }, /** - * Checks if element is invisibile (display: none, ...). + * Checks if element is invisible (display: none, ...). */ isInvisible: function(el) { return DomElement.getSize(el).equals(new Size(0, 0)); }, /** - * Checks if element is visibile in current viewport. + * Checks if element is visible in current viewport. */ isInView: function(el) { // See if the viewport bounds intersect with the windows rectangle diff --git a/src/style/Color.js b/src/style/Color.js index 7395056f..a836049c 100644 --- a/src/style/Color.js +++ b/src/style/Color.js @@ -54,6 +54,8 @@ var Color = Base.extend(new function() { var componentParsers = {}, // Cache and canvas context for color name lookup namedColors = { + // node-canvas appears to return wrong values for 'transparent'. + // Fix it by having it pre-cashed here: transparent: [0, 0, 0, 0] }, colorCtx; diff --git a/test/tests/Color.js b/test/tests/Color.js index 16eabba5..968bfa8d 100644 --- a/test/tests/Color.js +++ b/test/tests/Color.js @@ -67,7 +67,7 @@ test('Creating Colors', function() { 'Color from hex string'); equals(new Color('#FF3300'), new Color(1, 0.2, 0), - 'Color from hex string'); + 'Color from uppercase hex string'); equals(new Color('#ff000099'), new Color(1, 0, 0, .6), 'Color from hex code with alpha');