You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, April 9th 2010, 6:10pm

Browser zoom and mouse position

Hello everybody,

I need the exact relative mouse position in the flash window of krpano. I calculate this position by dividing mouse.x/width-of-the-viewport and mouse.y/height-of-the-viewport. Under normal circumstances the size of the viewport doesn't change and the relative position of the cursor takes values between 0 and 1. However, when using browser magnification, the size of the viewport changes and my calculations lead to wrong results.

Is there a way to read out the degree of browser magnification or to stop the krpanoviewport changing size when zooming in with the browser?

2

Monday, April 12th 2010, 11:26am

Hi,

use the krpano "mouse.x", "mouse.y" and "stagewidth","stageheight" variables,

best regards,
Klaus

3

Monday, April 12th 2010, 9:46pm

Hi Klaus,
thanks a lot. This was very helpful.

Similar threads