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.

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,206

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

1

Monday, July 2nd 2018, 3:54pm

screen to sphere with multiple div set up

Hi,

Maybe a stupid question, perhaps i make a stupid mistake but i have a page with 2 pano div's both have their own viewer.
I like to continuously show the mouse ath and atv in a textfield for each pano separate.

I tried but i don't get it right, sort of...
it also works outside the div.. that is not what i want.

EDIT: sorry i did put some wrong code here..
I'll make an example to show.



Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

This post has been edited 1 times, last edit by "Tuur" (Jul 3rd 2018, 11:21am)


Tuur

Sage

  • "Tuur" started this thread

Posts: 3,206

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Tuesday, July 3rd 2018, 1:06pm

Hi,

ok here an simple example of what i don't want to happen.

http://www.virtualtuur.com/krpano/screentosphere/divs/

xml
http://www.virtualtuur.com/krpano/screen…/divs/pano1.xml
http://www.virtualtuur.com/krpano/screen…/divs/pano2.xml

i like to catch the mouse ath and atv only for the pano that is 'focused' on AND also only when the mouse is over it.

How can i do that?
html etc is not my strongest point. *cry* haha..

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

3

Thursday, July 5th 2018, 3:38pm

Hi, Tuur.

I tried it with one pano. I guess it could be something like this:

1. Remove action NumDoMouse from the events.
2. Try add this JS action to XML (mind the target div id in the action):

Source code

1
2
3
<action name="set_div" type="JavaScript" autorun="onstart" >		var target_div = document.getElementById("viewer1");				target_div.addEventListener("mouseover", mouseOver, false);		target_div.addEventListener("mouseout", mouseOut, false);
		function mouseOver()		{  		   krpano.call("NumDoMouse();");		}
		function mouseOut()		{  		   krpano.call("clearinterval(time);");		}	</action>



Strange, but I got error in the console - the second viewer won't embed properly when I tried to embed two viewers. So I can't test with two viewers here...
Regards,

Alexey

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

4

Thursday, July 5th 2018, 3:40pm

Sorry, the action code went mad here in the forum 'code' insert section, see it in the attached XML
Alexey Tkachenko has attached the following file:
  • pano1.xml (1.18 kB - 2 times downloaded - latest: Jul 5th 2018, 4:21pm)
Regards,

Alexey

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

5

Thursday, July 5th 2018, 4:01pm

by the way, here are the screenshots of the error I get when trying to embed two Krpano viewers (see attached jpg files).
Alexey Tkachenko has attached the following images:
  • screen1.jpg
  • screen2.jpg
Regards,

Alexey

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,206

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

6

Thursday, July 5th 2018, 4:21pm

Hi,

thanks!
Didn't think about this mouse over and out thing.
I'll try / have a go with it.

I get no console errors in my example though.

btw: i think you forget some..
<![CDATA[

]]>

*g*

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

This post has been edited 1 times, last edit by "Tuur" (Jul 7th 2018, 11:02am)


Tuur

Sage

  • "Tuur" started this thread

Posts: 3,206

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message