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.

panomaster

Intermediate

  • "panomaster" started this thread

Posts: 275

Location: Kobyłka, Poland

Occupation: Virtual Tours - Spherical Panoramas - Krpano developer

  • Send private message

1

Monday, March 19th 2018, 4:57pm

Autoalpha bug in krpano 1.19-pr14

I've found strange behaviour of buttons (layer and hotspots based on type="text" style) with autoalpha="true" in 1.19-pr14

Source code

1
2
3
4
5
6
7
8
9
10
11
		<layer name="btn2"
				 style="hs_btn"
				 align="center" 
				 zorder="1"
				 alpha="1"
				 autoalpha="true"
				 html="Layer button"
				 onover="tween(alpha, 1)"
				 onout="tween(alpha, 0.5)"
				 onclick="tween(alpha, 0)"
				 />


Everything is ok while removing onover/onout events. Could you check it?

Example: http://ai360.pl/projekty/bugs/autoalpha/

2

Tuesday, March 20th 2018, 5:51pm

Hi,

works exactly as specified! ;-)

Here step by step:
  1. onclick => tween alpha to 0
  2. alpha gets 0 => autoalpha sets visible to false
  3. visible=false means no element there anymore => triggers onout
  4. onout => tween alpha to 0.5
  5. alpha gets greater 0 => autoalpha sets visible to true again

If you want that the element shouldn't react to mouse events after the click, set enabled to false - e.g.

Source code

1
onclick="set(enabled,false); tween(alpha, 0);"


Best regards,
Klaus