Sie sind nicht angemeldet.

Zephyr

Profi

  • »Zephyr« ist der Autor dieses Themas

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

1

Sonntag, 4. September 2011, 19:44

bug with krpano 1.14 js version with PNG?

Hi I have a onclick action on a background image. The jpg version works fine, while the png version gets centered weird, and doesnt trigger the onclick...

Works:

Quellcode

1
2
3
4
5
6
<plugin 
name="video_mask" 
onclick="close_video()" 
align="topleft"  keep="true" visible="false" enabled="true" handcursor="true"
url="%SWFPATH%/images/letter-background.jpg" x="0" y="0" zorder="127" height="2000" width="2000"
 alpha="0.80" onhover="showtext('close the video', tooltip_style)" />


doesnt work:

Quellcode

1
2
3
4
5
6
<plugin 
name="video_mask" 
onclick="close_video()" 
align="topleft"  keep="true" visible="false" enabled="true" handcursor="true"
url="%SWFPATH%/images/letter-background.png" x="0" y="0" zorder="127" height="2000" width="2000"
 alpha="0.80" onhover="showtext('close the video', tooltip_style)" />

Zephyr

Profi

  • »Zephyr« ist der Autor dieses Themas

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

2

Sonntag, 4. September 2011, 20:00

I found the problem. My spacer image was 1x1. And then stretched to 2000x2000. When I changed the spacer to 100x100 and stretch it to 2000x2000 it acts normally.

3

Dienstag, 6. September 2011, 18:31

Hi,

it's a strange scaling bug in iOS 4 (with iOS 5 it is already fixed),

in krpano 1.0.8.14 I'm using CSS scaling instead of HTML scaling in more situations (which is faster because hardware-accelerated), but on iOS 4 devices the scaling has a strange bug - when the source width or height of the image that should be scaled is an odd-number then the scaling is wrong, and when it's an even-number then right,

e.g. images with 1x1, 3x3, 5x5 ... will scale wrong (on iOS4), but images with 2x2, 4x4, 6x6 ... okay,

I will release soon an update where this situation will be automatically detected and then the CSS scaling disabled for that image,

a simple and quick workaround would just using a 2x2 image instead of an 1x1 image, but 100x100 will also work because its a even-number sized image,

best regards,
Klaus