exposed getRandomColor() method

This commit is contained in:
Eric Rowell 2013-05-06 00:17:10 -07:00
parent 2610851e4b
commit d67f1d2c1d
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@
var key;
while(true) {
key = Kinetic.Type._getRandomColorKey();
key = Kinetic.Type.getRandomColor();
if(key && !( key in shapes)) {
break;
}

View File

@ -317,7 +317,7 @@
b: bigint & 255
};
},
_getRandomColorKey: function() {
getRandomColor: function() {
var randColor = (Math.random() * 0xFFFFFF << 0).toString(16);
while (randColor.length < 6) {
randColor = '0' + randColor;