, , .
jQuery , . , API .
getInfoBoxDimensions: function( content ) {
var sensor = $("<div>").html(content);
$(sensor).appendTo("body").css({"position" : "absolute", "left" : "-900px"});
var width = $(sensor).width();
var height = $(sensor).height();
$(sensor).remove();
return new Array(width, height);
},
html :
var infoBoxDimensions = getInfoBoxDimensions(info_box_html);
infoBox, :
var ib = new InfoBox({
content : info_box_html,
boxStyle : {
width : infoBoxDimensions[0] + "px",
height : infoBoxDimensions[1] + "px"
},
....
....
});
info_box_html " ". 100%, , .
,