mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Minor fixes in comments and tests.
This commit is contained in:
parent
76d07892d1
commit
4c035ada36
3 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue