Sie sind nicht angemeldet.

1

Samstag, 19. November 2016, 19:36

bugs krpano

Hello, Klaus. I think I've found a few bugs in krpano (krpano 1.19-pr8 (build 2016-09-30))

Bug 1. I am calling action, as the parameter pass the text. The action took wrong text. In my case, missing a comma.Example.

Quellcode

1
2
3
4
5
6
7
8
...
my_func("'arg1':'value1','arg2':'value2'");
...
<action name="my_func">					
	trace(%1);
<!--  Result -'arg1':'value1''arg2':'value2' -->	
<!-- Must be -'arg1':'value1','arg2':'value2'  -->	
</action>

Where is the comma? -" 'arg1':'value1','arg2':'value2' "


Bug 2. The textfield plugin (html5) get the wrong width of the text on the mobile. Example.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<layer name="text"
	url="%FIRSTXML%/plugins/textfield.swf" 
	align="lefttop" edge="lefttop"
	x="100" 
	y="100"	
	html="Hello beautiful world"
	css="font-family:Arial; font-size:16px; color:#000000;"
	autowidth="true"
	autoheight="true"
	vcenter="true"
	wordwrap="false"
	background="true"
	keep="true"	
	onautosized="test_action();"
/>
<layer name="test_layer"
	type="container"	
	align="lefttop" edge="lefttop"
	y="100"
	width="40"
	height="40"
	bgcolor="0xff0099"
	bgalpha="1.0"
	keep="true"
/>				
<action name="test_action">	
  	calc(layer[test_layer].x, layer[text].x + layer[text].width);
</action>

As a result, the part of the text cut off.


I'm doing something wrong or it really bugs?
PS krpano 1.19-pr8 (build 2016-09-30)

2

Samstag, 26. November 2016, 16:18

Hi,
Where is the comma? -" 'arg1':'value1','arg2':'value2' "
The %1 is a kind of placeholder - there where the %1 is written the given calling parameter will be insert.

That means in your case the

Quellcode

1
trace(%1);
becomes:

Quellcode

1
trace('arg1':'value1','arg2':'value2');

and that means calling the trace action with two parameters - and the trace action itself will print/trace the both parameters without comma.

That's the reason why there is no comma in this case ;-).

About your second case with the text width - I can't reproduce your problem, when I test your code it always works as it should...
What mobile browser have you tested?

Best regards,
Klaus

3

Sonntag, 27. November 2016, 16:31

About second case with the text width - I used Google Chrome for Android 54.0.2840.85

About first case. I have js code

Quellcode

1
$.ajax({url:'script.php', dataType: 'json', method: 'POST', data: {ajax_data}...

Instead ajax_data I want to replace get parameter (%1), where the comma is lost. How, then, can be implemented in a simple way the transmission of all data without losing the comma?