vis_files/button.js
/// Returns the width of specified text
Returns the width of specified text
Returns the width of specified text
function textwidth(text,font)
{ 
	text = text.toString();
	if(text.search("_") == -1 && text.search("^") == -1 && text.search("&") == -1){ 
		cv.font = font;
		return cv.measureText(text).width;
	}
	else{
		var lab = splitintosub(text,font);
		var j = lab.length-1;
		return lab[j].w+lab[j].dw;
	}
}
function textwidth ( text , font ) { text = text . toString ( ) ; if ( text . search ( "_" ) == - 1 && text . search ( "^" ) == - 1 && text . search ( "&" ) == - 1 ) { cv . font = font ; return cv . measureText ( text ) . width ; } else { var lab = splitintosub ( text , font ) ; var j = lab . length - 1 ; return lab [ j ] . w + lab [ j ] . dw ; } }
Returns the width of specified text
Returns the width of specified text