Comparing version 3.0.8 to 3.0.9
@@ -108,4 +108,4 @@ /* | ||
try { test.style.color = "rgba(0,0,0,0.5)" } catch(e){} | ||
var rgba = /^rgba/.test(test.style.color) | ||
try {test.style.color = "rgba(0,0,0,0.5)"} catch(e){} | ||
var rgba = /^rgba/.test(test.style.color) | ||
@@ -117,3 +117,3 @@ var parseColor = function(value, normalize){ | ||
if (!c) return normalize ? "rgba(0,0,0,1)" : "" | ||
if (c[3] === 0 && !rgba) return "transparent" | ||
if (c[3] === 0 && !normalize) return "transparent" | ||
return (!normalize && (!rgba || c[3] === 1)) ? "rgb(" + c.slice(0, 3) + ")" : "rgba(" + c + ")" | ||
@@ -331,3 +331,3 @@ } | ||
var filterName = test.style.MsFilter != null ? "MsFilter" : test.style.filter != null ? "filter" : null | ||
var filterName = (test.style.MsFilter != null && "MsFilter") || (test.style.filter != null && "filter") | ||
@@ -363,5 +363,5 @@ parsers.opacity = parseOpacity | ||
each(['Webkit', "Moz", "O", "ms", null], function(prefix){ | ||
each(['Webkit', "Moz", "ms"], function(prefix){ | ||
each(["transition", "transform", "transformOrigin", "transformStyle", "perspective", "perspectiveOrigin", "backfaceVisibility"], function(style){ | ||
var cc = prefix ? prefix + capitalize(style) : style | ||
var cc = prefix + capitalize(style) | ||
if (test.style[cc] != null) aliases[style] = cc | ||
@@ -371,3 +371,3 @@ }) | ||
var transitionName = aliases.transition | ||
var transitionName = aliases.transition || (test.style.transition != null && "transition") | ||
@@ -493,5 +493,5 @@ // equations collection | ||
var match = equation.replace(/\s+/g, "").match(rCubicBezier) | ||
return match ? map(match.slice(1), function(v){ | ||
return match && map(match.slice(1), function(v){ | ||
return +v | ||
}) : null | ||
}) | ||
} | ||
@@ -729,5 +729,7 @@ | ||
var animations = {} | ||
var moofx = function(x, y){ | ||
return nodes(x, y) | ||
} | ||
var moofx = nodes.implement({ | ||
nodes.implement({ | ||
@@ -808,7 +810,10 @@ // {properties}, options or | ||
moofx.version = "3.0.9" | ||
/*(moofx.test)?*/ | ||
moofx.parse = function(property, value, normalize, node){ | ||
if (!parsers[property = camelize(property)]) return null | ||
return parsers[property](value, normalize, node) | ||
} | ||
}/*:*/ | ||
module.exports = moofx |
@@ -28,6 +28,6 @@ /* | ||
var RGBtoRGB = function(r, g, b, a){ | ||
if (a == null) a = 1 | ||
r = parseInt(r, 10) | ||
g = parseInt(g, 10) | ||
b = parseInt(b, 10) | ||
if (a == null || a === "") a = 1 | ||
r = parseFloat(r) | ||
g = parseFloat(g) | ||
b = parseFloat(b) | ||
a = parseFloat(a) | ||
@@ -70,3 +70,3 @@ if (!(r <= 255 && r >= 0 && g <= 255 && g >= 0 && b <= 255 && b >= 0 && a <= 1 && a >= 0)) return null | ||
var r, b, g | ||
if (a == null) a = 1 | ||
if (a == null || a === "") a = 1 | ||
h /= 360 | ||
@@ -73,0 +73,0 @@ s /= 100 |
{ | ||
"name": "moofx", | ||
"description": "A CSS3-enabled javascript animation library for node and the browser", | ||
"version": "3.0.8", | ||
"version": "3.0.9", | ||
"license": "MIT (http://mootools.net/license.txt)", | ||
@@ -25,4 +25,4 @@ "main": "./lib/main.js", | ||
"cubic-bezier": "0.1.2", | ||
"prime": "0.0.4-alpha", | ||
"nodes": "0.0.5-alpha" | ||
"prime": "0.0.5-alpha", | ||
"nodes": "0.0.6-alpha" | ||
}, | ||
@@ -29,0 +29,0 @@ "sources": [ |
Sorry, the diff of this file is not supported yet
30765
778
+ Addednodes@0.0.6-alpha(transitive)
+ Addedprime@0.0.5-alpha(transitive)
- Removednodes@0.0.5-alpha(transitive)
- Removedprime@0.0.4-alpha(transitive)
Updatednodes@0.0.6-alpha
Updatedprime@0.0.5-alpha