I benefited from efe's comment and calculated real view height of rotated element.
There is technical explanation about solution on djjeck's answer.
You can view this question's answer with an example: http://jsfiddle.net/TqJJL/3/
Calculate real height with this code:
// initial coordinates
var A = 0;
var B = width; // default size of element
// new coordinates
A = calc(A, angle*Math.PI/180, p);
B = calc(B, angle*Math.PI/180, p);
// translate back
A += width/2;
B += width/2;
if(B < A) { var tmp = A; A = B; B = tmp; } // swap
var realHeight = B-A;
function calc(oldx, angle, p) {
var x = Math.cos(angle) * oldx;
var z = Math.sin(angle) * oldx;
return x * p / (p+z);
}