D
daveyand
Hey Guys
I am able to detect a window resize using the following code:
window.onresize = function () {
if(document.getElementById("parent_for_video").style.display !=
"none") {
calculate_positions();
//Resize the main div
gray_div = document.getElementById("gray_div");
gray_div.style.height = h;
gray_div.style.width = w;
main_div = document.getElementById("main_div");
main_div.style.height = video_overlay_height;
main_div.style.width = video_overlay_width;
main_div.style.top = video_overlay_top;
main_div.style.right = video_overlay_right;
}//if(document.getElementById("parent_for_video").style.display !=
"none")
}//window.onresize = function ()
You should be able to see that when a resize is detected i move and
resize a couple of divs.
The thing is though i cant work out how to do this in real time. That
is the calculations only happen when i let go out the mouse. So if i
resize from massive to small the changes dont get reflected untill i
stop dragging the mouse.
I'd like to be able to resize and stuff as the mouse is dragging the
dimensions.
Hope that makes sense and someone can help
Cheers
Andy
I am able to detect a window resize using the following code:
window.onresize = function () {
if(document.getElementById("parent_for_video").style.display !=
"none") {
calculate_positions();
//Resize the main div
gray_div = document.getElementById("gray_div");
gray_div.style.height = h;
gray_div.style.width = w;
main_div = document.getElementById("main_div");
main_div.style.height = video_overlay_height;
main_div.style.width = video_overlay_width;
main_div.style.top = video_overlay_top;
main_div.style.right = video_overlay_right;
}//if(document.getElementById("parent_for_video").style.display !=
"none")
}//window.onresize = function ()
You should be able to see that when a resize is detected i move and
resize a couple of divs.
The thing is though i cant work out how to do this in real time. That
is the calculations only happen when i let go out the mouse. So if i
resize from massive to small the changes dont get reflected untill i
stop dragging the mouse.
I'd like to be able to resize and stuff as the mouse is dragging the
dimensions.
Hope that makes sense and someone can help
Cheers
Andy