have somewhat ok global lock on animation down, better than nothing

This commit is contained in:
Peter Cottle 2012-10-13 13:48:15 -07:00
parent ef5ff59cca
commit a9e4d5a9a6
5 changed files with 18 additions and 103 deletions

View file

@ -1,16 +1,13 @@
/**
* Constants....!!!
*/
var constants = {
clickDragMass: 20,
baseMass: 1,
};
var TIME = {
betweenCommandsDelay: 400,
commandShow: 300,
reflowGuess: 100
};
// useful for locks, etc
var GLOBAL = {
isAnimating: false
};
var GRAPHICS = {
@ -43,39 +40,3 @@ var GRAPHICS = {
orphanNodeFill: 'hsb(0.5,0.8,0.7)',
};
/**
* Graphics style -- DEPRECATED
*/
var graphics = {
// colors
edgeStroke: 'rgba(94%, 96%, 98%, 0.5)', // '#EFF5FB',
nodeEdge: 'rgba(94%, 96%, 98%, 0.9)', // '#EFF5FB',
nodeFill: '#0066cc',
nodeRadius: 10,
// widths
nodeStrokeWidth: 15,
edgeWidth: 2,
// ref names
refFont: '14pt Courier New',
refFontFill: '#FFF',
refSelectedFontFill: 'rgb(255, 30, 10)',
// ref arrows
arrowFill: '#FFF',
arrowStroke: '#000',
arrowWidth: 4,
arrowHeadWidth: 5,
};
function randomString(string_length) {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var randomstring = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
return randomstring;
}