Sie sind nicht angemeldet.

panowerk

Anfänger

  • »panowerk« ist der Autor dieses Themas

Beiträge: 12

Wohnort: Freiburg, Germany

Beruf: Designer, photographer

  • Nachricht senden

1

Montag, 5. November 2012, 13:31

Having a layer follow a hotspot.

Hello all,

I would like to have a layer follow a hotspot's position on screen. I'm using a parent system and the layer tracks the hotspot fairly well but, since I have the layer alignment values in pixels, the position of the layer changes in relation to the background when viewed on different sized screens.

When the layer position looks good on my laptop (1440 x 900 screen size) it is not correct when I look at it on my iMac (2560 x 1440 screen size) or vice versa.

I'm thinking that I need to use screentosphere (or spheretoscreen?) but my coding skill are not that great.

I have to get the hotspots x/y position relative to the screen and then apply them to the layer using, I'm guessing, onviewchange.

If anyone can point me to an existing thread that explains it in terms that I might be able to understand (I've searched but haven't had any success finding what I need), or help me out with some instruction, it would be greatly appreciated.

Thanks in advance,

Roger

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

2

Montag, 5. November 2012, 15:45

Try ox and oy to position the plugin from the hotspot. This works for me.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

panowerk

Anfänger

  • »panowerk« ist der Autor dieses Themas

Beiträge: 12

Wohnort: Freiburg, Germany

Beruf: Designer, photographer

  • Nachricht senden

3

Montag, 5. November 2012, 16:26

Thanks for the quick reply.

I'm not sure what you mean with trying ox and oy. They are just offset x and y positions. Since the layer is parented to the hotspot, (ox & oy) and (x & y) are basically the same thing. Or am I wrong about this?

I'd like to break the parent/child relationship and determine the x/y position dynamically so that no matter the size of the screen, the layer doesn't move in relation to the spot in the image that it's describing.

I hope this makes sense and thanks again for your help.

Roger

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

4

Montag, 5. November 2012, 19:03

Do you have a link? my layers are fixed in an offset position to the hotspot..
I don't see what you mean. Did you try ox and oy?
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour