Sie sind nicht angemeldet.

Mael B.

Schüler

  • »Mael B.« ist der Autor dieses Themas

Beiträge: 157

Wohnort: France, Montpellier

  • Nachricht senden

1

Donnerstag, 1. Februar 2018, 12:47

Bug with the New Combobox Plugin (combobox.xml)

Hi,

I noticed a small bug using the the New Combobox Plugin (combobox.xml) :
if combobox layer are set parent of an another layer which is too close to the border screen, the combobox does not open entirely :(

You can figure out of the problem by simply adding this code to the combobox-examples.xml (from example folder of krpano-1.19-pr14)

Quellcode

1
2
3
4
5
6
7
8
<action name="comboboxexamples" autorun="onstart">
loadscene(0);
set(layer[cbsettings].parent,top_combobox_container);
set(layer[cbscenes].parent,bottom_combobox_container);
</action>

<layer name="top_combobox_container" type="container" align="righttop"   y="0" keep="true" >  </layer>
<layer name="bottom_combobox_container" type="container" align="leftbottom" y="0"  keep="true" >  </layer>


By increasing 'y' value up to ~150 or setting to align="right" or align="left" for the container layers, the combobox open again correctly...
I assume a bug in the actions that 'find the available screen space above or below the combobox' in combobox.xml... but i'm not able to fix it.

2

Mittwoch, 25. April 2018, 19:39

hi

experiencing the same problem

did you find a fix?

Thanks

Mael B.

Schüler

  • »Mael B.« ist der Autor dieses Themas

Beiträge: 157

Wohnort: France, Montpellier

  • Nachricht senden

3

Donnerstag, 26. April 2018, 11:16

I did not really find a good fix, but I realize that removing a part of the code in 'combobox.xml', it seems to work correctly when combobox layers are set parent of an another layer.

There is the part to remove (line 420 to 442):

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
		calc(top_overflow, -ly1 + global.area.pixely + openheight/2);
		calc(bottom_overflow, ly2 - global.area.pixely + openheight/2 - global.area.pixelheight);
		if(cb.parent,
			<!-- no vertical offset inside other layers, do only a height clipping -->
			Math.max(max_overflow, top_overflow, bottom_overflow, 0);
			sub(openheight, max_overflow);
		  ,
			if(iscentered,
				if(openheight GE (global.area.pixelheight - 20),
					set(yoffset,0);
				  ,
					if(top_overflow GT 0, calc(yoffset, cb.y + top_overflow); );
					if(bottom_overflow GT 0, calc(yoffset, cb.y - bottom_overflow); );
				);
			,
				indexoftxt(isbottomalign, get(cb_edge), 'bottom');
				if(space_above GT space_below,
					if(isbottomalign LT 0, calc(yoffset, cb.y - openheight + cbheight); );
				  ,
					if(isbottomalign GE 0, calc(yoffset, cb.y - openheight + cbheight); );
				);
			);
		);


I know it is a bad fix because this removed part could probably induces other problems in other situations *unsure*

4

Sonntag, 10. Juni 2018, 20:24

Thank you *thumbup* ! it worked! Are you having trouble after removing the code?

Mael B.

Schüler

  • »Mael B.« ist der Autor dieses Themas

Beiträge: 157

Wohnort: France, Montpellier

  • Nachricht senden

5

Montag, 11. Juni 2018, 15:54

Thank you *thumbup* ! it worked! Are you having trouble after removing the code?
no trouble noticed for my usage.

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

6

Dienstag, 19. Juni 2018, 10:13

Hi)

I took a look at it and it seems that if you change the line 425

Quellcode

1
sub(openheight, max_overflow);
to

Quellcode

1
if(max_overflow LE 0, sub(openheight, max_overflow); );
it works fine.
Anyway, it seems better not to remove the whole code part (not the best practice, because it may influence some other usage cases).





Regards,

Alexey

Mael B.

Schüler

  • »Mael B.« ist der Autor dieses Themas

Beiträge: 157

Wohnort: France, Montpellier

  • Nachricht senden

7

Dienstag, 19. Juni 2018, 11:07

Anyway, it seems better not to remove the whole code part (not the best practice, because it may influence some other usage cases).
I totally agree *smile* So, thanks a lot for the correct code modification *thumbup*

Ähnliche Themen