Last active
August 29, 2015 14:01
-
-
Save vird/42a9a2097fa92002c65c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// replace in .attr functions (there are two .attr functions) | |
for (var key in params) { | |
eve("raphael.attr." + key + "." + this.id, this, params[key]); | |
} | |
// with | |
var numericParams = { | |
r:1,rx:1,ry:1,x:1,y:1,cx:1,cy:1,width:1,height:1 | |
}; | |
for (var key in params) { | |
if (numericParams[key]) { | |
params[key] = +params[key]; | |
} | |
eve("raphael.attr." + key + "." + this.id, this, params[key]); | |
} | |
// It's better make numericParams static somewhere |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment