diff --git a/src/equal.js b/src/equal.js index 91810d3..73cc22e 100644 --- a/src/equal.js +++ b/src/equal.js @@ -121,13 +121,6 @@ Snap.plugin(function (Snap, Element, Paper, glob) { eve.on("snap.util.equal", function (name, b) { var A, B, a = Str(this.attr(name) || ""), el = this; - if (isNumeric(a) && isNumeric(b)) { - return { - from: parseFloat(a), - to: parseFloat(b), - f: getNumber - }; - } if (names[name] == "colour") { A = Snap.color(a); B = Snap.color(b); @@ -174,6 +167,13 @@ Snap.plugin(function (Snap, Element, Paper, glob) { f: function (val) { return val; } }; } + if (isNumeric(a) && isNumeric(b)) { + return { + from: parseFloat(a), + to: parseFloat(b), + f: getNumber + }; + } var aUnit = a.match(reUnit), bUnit = Str(b).match(reUnit); if (aUnit && arrayEqual(aUnit, bUnit)) {