Sie sind nicht angemeldet.

1

Sonntag, 2. August 2009, 20:48

zooming into mouse position

Is there a way to change the behavior of the zooming so that the target of the zoom is the location of the mouse rather than the center of the viewport?

This is a very intuitive way to zoom and prevents having to go through zoom,pan,zoom,pan sequences to get to desired location in a multiresolution pano.

2

Montag, 3. August 2009, 20:27

Hi,

in the current versions not, but I have already added an option to the next beta (beta 9) that allow zooming with the mouse wheel to the current mouse cursor position
(for a test version just ask per mail)

best regards,
Klaus

3

Montag, 3. August 2009, 20:49

Excellent! Thanks Klaus!

4

Montag, 16. November 2009, 17:26

Hi,

More info about the new zoomtocursor attribute for control node in krpano 1.0.8 beta9: krpano 1.0.8 beta 8

5

Dienstag, 24. November 2009, 02:13

I would just like it to "move to and center" on double-click - just like Google street view.

6

Dienstag, 24. November 2009, 06:09

Hi Richard,

Edited: a better code that allow ondoubleclick can be found here: OnDoubleClick -- MoveTo() -- ScreenToSphere()

After some search in the forum it seems there is a way to do...
Look at these post from KLAUS.
Explanation of jsmouse.swf plugin
Example to download

So a code would be:
xml file:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
<krpano version="1.0.8">

<events onclick="js(movetoscreentosphere());" />

<plugin name="jsmouse" url="jsmouse.swf" keep="true" />

<image>
    <cubestrip  url="yourpano.jpg" />
</image>

</krpano>


JavaScript to be added inside the html file:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<script type="text/javascript">
// <![CDATA[

function krpano() 
{
return document.getElementById("krpanoSWFObject");
}

function movetoscreentosphere(){

var mousex = krpano().get("mouse.x");
var mousey = krpano().get("mouse.y");
var hvs = krpano().get("screentosphere("+mousex +","+mousey +")");
var hva = hvs.split(",");

var ath = Number( hva[0] );
var atv = Number( hva[1] );

krpano().call("moveto("+ ath +","+ atv +")");
}

// ]]>
</script>


I have tried this and it works.

SAlut.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »michel« (26. November 2009, 01:30)


7

Donnerstag, 26. November 2009, 15:48

Hi Michel, that good news ! Thanks for the code :-) Do you have any examples to show of this in operation ?

8

Donnerstag, 26. November 2009, 23:31

Hi Richard,

I have just posted a link to a demo online in these thread: OnDoubleClick -- MoveTo() -- ScreenToSphere()

SAlut.

Ähnliche Themen